Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project dependencies may have API risk issues #48

Open
PyDeps opened this issue Oct 26, 2022 · 0 comments
Open

Project dependencies may have API risk issues #48

PyDeps opened this issue Oct 26, 2022 · 0 comments

Comments

@PyDeps
Copy link

PyDeps commented Oct 26, 2022

Hi, In MiBand2, inappropriate dependency versioning constraints can cause risks.

Below are the dependencies and version constraints that the project is using

bluepy==1.3.0
pycrypto==2.6.1

The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict.
The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.

After further analysis, in this project,
The version constraint of dependency pycrypto can be changed to >=2.6,<=2.6.1.

The above modification suggestions can reduce the dependency conflicts as much as possible,
and introduce the latest version as much as possible without calling Error in the projects.

The invocation of the current project includes all the following methods.

The calling methods from the pycrypto
Crypto.Cipher.AES.new
The calling methods from the all methods
df.set_index.set_index
pandas.to_datetime
logging.basicConfig
self.queue.get
self._auth_notif
base.MiBand2.get_heart_rate_one_time
datetime.datetime.now.replace
self._desc_fetch.write
base.MiBand2.start_get_previews_data
hex
logging.getLogger
print
char.read.hex
self.device._char_heart_measure.getHandle
base.MiBand2.get_hrdw_revision
self.waitForNotifications
format
datetime.datetime.now
self.device.start_get_previews_data
self.device._log.error
self.device._char_activity.getHandle
self.svc_1.getCharacteristics.write
Exception
Crypto.Cipher.AES.new
base.MiBand2.get_current_time
datetime.datetime.strptime
base.MiBand2.start_raw_data_realtime
self._parse_queue
self._char_activity.getDescriptors
argparse.ArgumentParser.add_argument
self._char_auth.getDescriptors
base.MiBand2._auth_previews_data_notif
self.device.queue.put
AuthenticationDelegate
svc.getCharacteristics.read
len
self._auth_previews_data_notif
self.setDelegate
self._get_from_queue
sys.exit
datetime.timedelta
self._char_fetch.getDescriptors
base.MiBand2.get_serial
self._get_from_queue.append
self._req_rdn
self.device._send_key
self.svc_heart.getCharacteristics
self.queue.put
df.set_index.describe
self._desc_activity.write
self.heart_raw_callback
self._parse_raw_accel
self.create_date_data
argparse.ArgumentParser.parse_args
struct.pack
range
os.remove
time.sleep
self.getServiceByUUID
self.heart_measure_callback
self._parse_raw_heart
self._char_fetch.write
self.svc_heart.getCharacteristics.write
open
base.MiBand2.get_revision
char_m.getDescriptors.write
self._parse_date
self._encrypt
date.weekday
pandas.DataFrame.from_csv
self.device._send_enc_rdn
self.device._char_fetch.write
self._log.info
os.path.exists
df.set_index.head
open.write
base.MiBand2.waitForNotifications
self._desc_auth.write
self.svc_1.getCharacteristics.getDescriptors
matplotlib.pyplot.show
self.svc_1.getCharacteristics
df.rolling.mean
queue.Queue
time.time
self._char_auth.write
base.MiBand2
bluepy.btle.DefaultDelegate.__init__
bluepy.btle.Peripheral.__init__
datetime.timedelta.strftime
self._send_key
svc.getCharacteristics.write
self.device.outfile.write
base.MiBand2.disconnect
Crypto.Cipher.AES.new.encrypt
self.device._char_auth.getHandle
self.device._req_rdn
bytes
self.svc_heart.getCharacteristics.getDescriptors
base.MiBand2.get_battery_info
datetime.datetime
base.MiBand2.set_current_time
self.svc_2.getCharacteristics
base.MiBand2.initialize
self.getServiceByUUID.getCharacteristics
base.MiBand2.authenticate
self._parse_battery_response
self.device._char_fetch.getHandle
char.read.encode
self._log.error
argparse.ArgumentParser
base.MiBand2.send_alert
self.getCharacteristics
df.rolling.mean.plot
struct.unpack
int
base.MiBand2.set_heart_monitor_sleep_support
char_sensor1.getDescriptors.write
str
base.MiBand2.get_steps
self._log.setLevel
base.MiBand2.setSecurityLevel
self._char_heart_ctrl.write
base.MiBand2.start_heart_rate_realtime
self.accel_raw_callback
df.set_index.rolling

@developer
Could please help me check this issue?
May I pull a request to fix it?
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant