Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Project dependencies may have API risk issues #837

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

Project dependencies may have API risk issues #837

PyDeps opened this issue Oct 25, 2022 · 0 comments

Comments

@PyDeps
Copy link

PyDeps commented Oct 25, 2022

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

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

beautifulsoup4==4.5.3
bs4==0.0.1
requests==2.18.4
Pillow
wrapcache==1.0.8
ntplib==0.3.3
sklearn
opencv-python
keras==2.2.4
tensorflow==1.14.0
matplotlib>=3.0.2
numpy>=1.14.6
scipy>=1.1.0
selenium==3.11.0
fake-useragent==0.1.11

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 beautifulsoup4 can be changed to >=4.10.0,<=4.11.1.
The version constraint of dependency requests can be changed to >=2.4.0,<=2.15.1.
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 keras can be changed to >=2.0.0,<=2.1.6.
The version constraint of dependency keras can be changed to >=2.3.0,<=2.3.1.
The version constraint of dependency scipy can be changed to >=0.12.0,<=1.7.3.

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 beautifulsoup4
bs4.BeautifulSoup
The calling methods from the requests
requests.packages.urllib3.disable_warnings
requests.post
requests.Session
requests.get
The calling methods from the Pillow
PIL.Image.open
The calling methods from the keras
keras.layers.BatchNormalization
keras.layers.GlobalAveragePooling2D
keras.preprocessing.image.ImageDataGenerator.flow
keras.applications.VGG16
keras.layers.Dropout
keras.callbacks.ReduceLROnPlateau
keras.optimizers.RMSprop
keras.layers.Conv2D
keras.layers.Dense
keras.models.load_model
keras.preprocessing.image.ImageDataGenerator
The calling methods from the scipy
scipy.fftpack.dct
The calling methods from the all methods
pretreat
recv_data.http_code_re.re.search.group
inter.LoginAysnSuggest.loginAysnSuggest
phash
os.path.isdir
inter.AutoSubmitOrderRequest.autoSubmitOrderRequest.sendAutoSubmitOrderRequest
requests.get
select.sendGetPassengerDTOs
open_cdn_file
selenium.webdriver.Chrome.get_cookies
bs4.BeautifulSoup
smtplib.SMTP_SSL
collections.OrderedDict
confirmSingleForQueueAsysResult.get.get
getLogFile
input
smtplib.SMTP.sendmail
proxy
post.str.replace
self.proxy_list.append
str.encode.hashlib.sha256.digest.base64.b64encode.decode.get
int
inter.SubmitOrderRequest.submitOrderRequest.sendSubmitOrderRequest
self.sendGetPassengerDTOs
keras.layers.BatchNormalization
self.passengerTicketStrList.rstrip
str.encode.hashlib.sha256.digest.base64.b64encode.decode
keras.layers.Conv2D
ntplib.NTPClient
verify.pretreatment.get_text
receiver.split
ChechFaceRsp.get.get
train_y.argmax.argmax
self.httpClint.send
http.send.get
agency.cdn_utils.filterCdn
successRateRsp.get.get.get
request_alg_id
session.httpClint.send.find
checkOrderInfoRep.get.get
init.login.GoLogin
agency.agency_tools.proxy
result.read.split
getTodayDateStr
urls.get
session.httpClint.send
self.loadTextModel
threading.Thread.setDaemon
data.get.replace
sortCdn
smtplib.SMTP.quit
self.getUserName
round
sendServerChan
s.getPassengerTicketStrListAndOldPassengerStr.get
init.select_ticket_info.select.main
cv2.resize
inter.QueryOrderWaitTime.queryOrderWaitTime
self.baseLogin
verify.localVerifyCode.Verify.verify
inter.GetSuccessRate.getSuccessRate.sendSuccessRate
smtplib.SMTP.connect
text_list.append
cdn.replace
datetime.datetime.now
result.replace.replace
session.call_login
self.s.close
inter.GetQueueCountAsync.getQueueCountAsync
inter.GetRepeatSubmitToken.getRepeatSubmitToken
loginConfRsp.get.get
TickerConfig.PUSHBEAR_CONF.strip
keras.applications.VGG16
config.TicketEnmu.ticket.WAIT_ORDER_SUCCESS.format
self.call_login
myException.UserPasswordException.UserPasswordException
random.randint
requests.Session
socket.socket.connect
tensorflow.get_default_graph
myException.PassengerUserException.PassengerUserException
dict
socket.setdefaulttimeout
numpy.savez
cdnThread.append
config.TicketEnmu.ticket.QUERY_IN_BLACK_LIST.format
img.write
inter.GetPassCodeNewOrderAndLogin.getPassCodeNewOrderAndLogin1
inter.CheckRandCodeAnsyn.checkRandCodeAnsyn
self.initNoComplete
copy.copy
self.connect_socket
select
self._s.cookies.clear
list
preprocess_input
getTmpDir
config.emailConf.sendEmail
inter.ConfirmSingleForQueue.confirmSingleForQueue
time.strftime
select.getPassengerTicketStrListAndOldPassengerStr
self.getPassengerTicketStr.replace
config.configCommon.getNowTimestamp
time.strptime
messages.find
request_device_id
eval.split
verify.localVerifyCode.Verify
inter.GetQueueCount.getQueueCount.sendGetQueueCount
keras.preprocessing.image.ImageDataGenerator.flow
train_y.argmax.sum
agency.agency_tools.proxy.setProxy
self._s.cookies.set
imgs.reshape.append
self.textModel.predict
station_dates.index
numpy.unique
_set_user_agent
oldPassengerStr.append
re.findall
enumerate
collections.OrderedDict.items
PATH
i.info.split
bs4.BeautifulSoup.findAll
re.findall.replace
platform.system
passengerTicketStr.rstrip
os.listdir
session.httpClint.send.split
str.encode
socketUtils
result.replace.replace.replace
self.queryMyOrderNoComplete
os.path.abspath
numpy.packbits.mean
_encode_data_str_v2
verify.mlearn_for_image.preprocess_input
predict
self.get_status_code
loginAysnSuggestRsp.get.get
self.session.httpClint.send.get
codexy
keras.models.load_model.save
os.path.exists
config.TicketEnmu.ticket.split
re.compile
numpy.sqrt
inter.GetPassengerDTOs.getPassengerDTOs.getPassengerTicketStrListAndOldPassengerStr
email.header.Header
inter.SubmitOrderRequest.submitOrderRequestByAfterNate.sendSubmitOrderRequest
socket.socket
threading.Thread.start
copy.deepcopy.format
cv2.imdecode
time
random.random
get_text
self.cancelNoCompleteMyOrder
to_station.encode.encode
datetime.datetime.now.strftime
self.filter_proxy
inter.GetQueueCountAsync.getQueueCountAsync.sendGetQueueCountAsync
self.check_is_need_train
labels.argmax.argmax
autoSynchroTime
argparse.ArgumentParser.parse_args
verify.pretreatment._get_imgs
train_y.argmax.max
logging.getLogger
super
config.urlConf.urls.format
self.station_dates.time.strptime.time.asctime.str.split
_encode_string
PIL.Image.open.show
keras.callbacks.ReduceLROnPlateau
autoSubmitOrderRequestResult.get.get
init.select_ticket_info.select
myUrllib.httpUtils.HTTPClient.send
inter.LiftTicketInit.liftTicketInit.reqLiftTicketInit
label.argmax.argmax
station_ticket.get.get
myUrllib.httpUtils.HTTPClient
inter.GetQueueCount.queryQueueByAfterNate.sendQueryQueueByAfterNate
fresult.split.split
self.setHeadersReferer
i.split
self.login.auth
pathlib.Path
open.truncate
cdn_list.append
os.makedirs
logging.getLogger.addHandler
predict.argmax
learn
inter.SubmitOrderRequest.submitOrderRequest
str.encode.hashlib.sha256.digest
argparse.ArgumentParser.add_argument
inter.ConfirmHB.confirmHB
fake_useragent.UserAgent
_get_imgs
email.mime.text.MIMEText
logging.FileHandler
numpy.fromstring
selenium.webdriver.Chrome.get
sortCdn.append
self._s.headers.clear
cdn.append
result.read.split.strip
base64.b64decode
datetime.timedelta
select.station_table
str.find
self.setHeadersUserAgent
keras.models.Sequential
parser_arguments
self.result.split
self.setHeaders
inter.ConfirmHB.confirmHB.sendChechFace
numpy.median
smtplib.SMTP.login
self.get_rep_body
_get_hash_code_params
f.read
base64_to_image
requests.packages.urllib3.disable_warnings
numpy.array
keras.models.load_model.evaluate
inter.AutoSubmitOrderRequest.autoSubmitOrderRequest
str.split
socketUtils.send
tensorflow.get_default_graph.as_default
myException.ticketNumOutException.ticketNumOutException
self.getTicketInfoForPassengerForm.get
session.httpClint.send.get
config.TicketEnmu.ticket.CANCEL_ORDER_SUCCESS.format
numpy.load
httpClint.send.get
setDateStr
result.read.split.strip.split
config.TicketEnmu.ticket.WAIT_ORDER_CONTINUE.format
inter.PassengerInitApi.passengerInitApi
print
PIL.Image.open
self._s.request
inter.LoginConf.loginConf
self.station_table
os.popen
self.proxy_filter_list.append
post.str.replace.replace.replace
requests.post
self.resetHeaders
queryOrderWaitTimeResult.get.get
TickerConfig.PASSENGER_TICKER_STR.get
self.cdnList.pop
copy.deepcopy.get
self.loadImgModel
time.asctime
threading.Thread
base64.b64encode
post.str.replace.replace.replace.replace
func
datetime.datetime.strptime
time.sleep
r.content.hashlib.md5.hexdigest
seat_conf.items
self.setHeadersHost
_set_header_default
sorted
myException.ticketConfigException.ticketConfigException
inter.PassengerInitApi.passengerInitApi.sendPassengerInitApi
cdn_t.start
inter.Query.query
isAnotherDay
inter.QueryOrderWaitTime.queryOrderWaitTime.sendQueryOrderWaitTime
collections.OrderedDict.get
CDNProxy
texts.append
keras.models.load_model
sum
operator.itemgetter
i.strip
keras.layers.Dropout
self.getPassengerTicketStr
successRateRsp.get.get
cv2.cvtColor
proxy.get_filter_proxy
result.read
config.urlConf.urls.get
eval
logging.getLogger.removeHandler
self.session.httpClint.send
random.uniform
copy.deepcopy
i.replace
train_y.max.mean
time.time
str.encode.hashlib.sha256.digest.base64.b64encode.decode.group
inter.ChechFace.chechFace
numpy.packbits
keras.models.load_model.predict
open.close
sys.version.split
submitOrderRequestRsp.get.get
wrapcache.set
selenium.webdriver.Chrome
wrapcache.get
agency.cdn_utils.open_cdn_file
cv2.imread
fp.write
inter.LiftTicketInit.liftTicketInit
q.sendQuery.get
time.strptime.time.asctime.str.split
argparse.ArgumentParser
keras.models.load_model.fit_generator
config.TicketEnmu.ticket.LOGIN_SESSION_FAIL.format
open.writelines
s.liftTicketInit.reqLiftTicketInit
config.logger.log
x.astype.astype
keras.models.load_model.summary
_predict
isinstance
from_station.encode.encode
str
sendEmail
self.get_filter_proxy.findAll
datetime.date.today.strftime
config.TicketEnmu.ticket.QUEUE_WARNING_MSG.format
func.levels
time.localtime
ticket_data.find
os.path.isfile
imgs.reshape.reshape
super.__init__
passengerTicketStrList.append
keras.preprocessing.image.ImageDataGenerator
filterCdn
results.append
keras.models.load_model.compile
inter.ChechFace.chechFace.sendChechFace
selenium.webdriver.ChromeOptions
config.serverchanConf.sendServerChan
str.encode.hashlib.sha256.digest.base64.b64encode.decode.replace
inter.ConfirmSingleForQueue.confirmSingleForQueue.sendConfirmSingleForQueue
PATH.pathlib.Path.mkdir
json.loads
self.initS
inter.ConfirmSingleForQueueAsys.confirmSingleForQueueAsys.sendConfirmSingleForQueueAsys
inter.Query.query.sendQuery
open.seek
len
config.configCommon.checkSleepTime
download_image
datetime.datetime.strftime
inter.GetQueueCount.getQueueCount
keras.layers.Dense
hashlib.sha256
datetime.datetime
cdn_j.join
logging.getLogger.setLevel
station_dates.remove
config.TicketEnmu.ticket.find
self.httpClint.send.get
get_imgs
smtplib.SMTP
TickerConfig.SERVER_CHAN_CONF.strip
getCacheDir
Ofset.replace.split
post.append
inter.ConfirmSingleForQueueAsys.confirmSingleForQueueAsys
join
self.session.call_login
predict.max
self.get_filter_proxy
self.proxy.setProxy
logging.FileHandler.setFormatter
self.get_ticket_info
Ofset.replace.replace
open.write
inter.GetPassengerDTOs.getPassengerDTOs
inter.CheckOrderInfo.checkOrderInfo
tickers.append
config.TicketEnmu.ticket.CANCEL_ORDER_FAIL.format
selenium.webdriver.ChromeOptions.add_argument
logging.Formatter
filter
download_images
range
config.TicketEnmu.ticket.WAIT_ORDER_NUM.format
unittest.main
cookies.append
session.httpClint.set_cookies
seat_conf.iteritems
inter.GetRandCode.getRandCode
format
post.str.replace.replace
myException.ticketIsExitsException.ticketIsExitsException
config.getCookie.getDrvicesID
getVCodeDir
getWorkDir
self.session.httpClint.del_cookies
urllib.unquote
maxDate.datetime.timedelta.today.strftime
self._s.cookies.values
urllib.parse.unquote
inter.SubmitOrderRequest.submitOrderRequestByAfterNate
self.imgModel.predict
open
keras.optimizers.RMSprop
os.path.join
os.path.dirname
self.httpClint.set_cookies
inter.GetSuccessRate.getSuccessRate
self.RepeatSubmitToken.sendGetRepeatSubmitToken
datetime.date.today
self.login.go_login
inter.CheckOrderInfo.checkOrderInfo.sendCheckOrderInfo
self.data_apr
re.search
response.content.decode
email.mime.text.MIMEText.as_string
config.configCommon.getLogDir
load_data
config.TicketEnmu.ticket.WAIT_ORDER_FAIL.format
float
codeImgUrlRsp.split.split
kwarg.items
c.get
keras.layers.GlobalAveragePooling2D
open.readlines
self._s.headers.update
self.codeCheck
inter.GetQueueCount.queryQueueByAfterNate
query
ticket_data.split
json.dumps
self.get_cookie
passengerInitApiRsp.get.get
scipy.fftpack.dct
copy.copy.format
self.data_par
codeImgUrlRsp.split.split.eval.get
sendPushBear
re.search.group
initdc_result.token_name.re.search.group
hashlib.md5
get_text.mean
inter.CheckUser.checkUser
self.auth
map

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant