AboveTustin
AboveTustin copied to clipboard
Project dependencies may have API risk issues
Hi, In AboveTustin, inappropriate dependency versioning constraints can cause risks.
Below are the dependencies and version constraints that the project is using
Pillow==4.3.0
requests==2.20.0
selenium==3.7.0
twitter==1.18.0
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 Pillow can be changed to ==9.2.0. The version constraint of dependency Pillow can be changed to >=2.0.0,<=9.1.1. The version constraint of dependency requests can be changed to >=0.2.1,<=0.2.3. The version constraint of dependency requests can be changed to >=0.7.0,<=2.24.0. The version constraint of dependency requests can be changed to ==2.26.0. The version constraint of dependency selenium can be changed to >=2.26.0,<=4.0.0a6.post2.
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 Pillow
PIL.Image.open
The calling methods from the requests
requests.get
The calling methods from the selenium
selenium.webdriver.support.expected_conditions.element_to_be_clickable selenium.webdriver.support.wait.WebDriverWait selenium.webdriver.support.wait.WebDriverWait.until
The calling methods from the all methods
datasource.get_data_source.refresh OAuth format dict json.loads sys.stdout.flush a.get.upper self.refresh self.loadmap datasource.get_data_source selenium.webdriver.PhantomJS.find_element_by_class_name configparser.ConfigParser.read selenium.webdriver.PhantomJS.set_page_load_timeout geomath.distance AirCraftData int math.log10 geomath.HeadingStr geomath.knot2mph float abovetustin.get time.sleep dict.get twit.statuses.update_with_media selenium.webdriver.PhantomJS.find_elements_by_xpath selenium.webdriver.support.wait.WebDriverWait.until self.browser.get_screenshot_as_png configparser.ConfigParser.has_section io.BytesIO datasource.get_map_source.clickOnAirplane configparser.ConfigParser.getint selenium.webdriver.PhantomJS.get a.time.weekday PIL.Image.open a.upper self.screenshot self.parser.time datasource.get_map_source.reload flight.replace.replace string.Template twit.statuses.update last_seen_time.time.total_seconds datasource.get_map_source Error print open parser.get.split imagefile.read selenium.webdriver.PhantomJS.set_window_size math.cos fa_api.FlightInfo configparser.ConfigParser.getboolean FlightData.refresh dict.items wait.until.click hashtags.append math.atan2 ident.strip.strip selenium.webdriver.PhantomJS self.browser.quit selenium.webdriver.PhantomJS.save_screenshot text.lower util.error map idents.append im.crop.save browser.find_elements_by_xpath.click math.atan self.browser.save_screenshot TypeError a.time.strftime geomath.mi2km self.browser.find_element_by_link_text traceback.print_exc sys.stderr.write geomath.bearing self.browser.find_element_by_xpath.click self.browser.find_element_by_xpath self.browser.find_elements_by_xpath self.raw_data.decode self._parse_aircraft_data.append flightdata.time.strftime dict.keys math.sqrt get_driver urllib.request.urlopen im.crop.crop math.asin math.sin a.get sortedlist.append configparser.ConfigParser self._parse_aircraft_data selenium.webdriver.support.wait.WebDriverWait datetime.datetime.fromtimestamp Twitter sortedlist.sort math.degrees parser.get.Template.substitute requests.get join os.system Tweet geomath.ft2m flightdata.FlightData FlightData configparser.ConfigParser.get self.parser.aircraft_data type dict.replace self.ident_desc len selenium.webdriver.support.expected_conditions.element_to_be_clickable time.time finishedalarms.append math.radians geomath.mi2nm requests.get.json self.req.read hexcode.replace.replace self.browser.find_element_by_link_text.click a.ident_desc flight.startswith
@developer Could please help me check this issue? May I pull a request to fix it? Thank you very much.