Project dependencies may have API risk issues
PyDeps opened this issue · 1 comments
Hi, In wechat-spider, inappropriate dependency versioning constraints can cause risks.
Below are the dependencies and version constraints that the project is using
Django==1.8.1
MySQL-python==1.2.5
requests==2.9.1
lxml==3.4.4
hiredis==0.2.0
redis==2.10.3
oss2==2.0.5
selenium==2.52.0
PyVirtualDisplay==0.1.5
python-dateutil==2.5.0
beautifulsoup4==4.4.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 Django can be changed to >=1.8,<=1.8.19.
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 Django
RedirectView.as_view
The calling methods from the all methods
item.save sys.setdefaultencoding Topic.objects.filter re.sub Word.objects.filter etree.parse link.md5.hexdigest src.split get_uniqueid register.inclusion_tag x.get list C.objects.update_or_create bs.select os.environ.setdefault last_week_datetime.self.Topic.objects.filter.count redirect django.setup zip json.dumps models.IntegerField copy res.replace os.getenv unicode models.CharField migrations.CreateModel md5 execute_from_command_line oss2.Auth Proxy.STATUS_SUCCESS.Proxy.KIND_DOWNLOAD.Proxy.objects.filter.order_by.first Scheduler os.path.dirname etree.HTMLParser paginated_object_list.has_previous join content.replace logger.exception params.pop get_link_from_url download_to_oss BeautifulSoup now.Word.objects.filter.order_by self.context.update mark_safe bucket.put_object get_wsgi_application res.pop isinstance models.TextField datetime.combine r.delete r.headers.get bs.find_all time.sleep r.close models.DateTimeField get_redis_pool Wechat.objects.filter tree.xpath scheduler.run get_redis set include logging.exception traceback.print_exc user.is_authenticated timedelta get_bucket item.delete models.AutoField redis.ConnectionPool Wechat.objects.get_or_create logging.getLogger context.get replace_all url check_wechat sys.path.append date.today models.ForeignKey f requests.get self.Topic.objects.filter.count r.content.md5.hexdigest r.lpush range exec Wechat.STATUS_DEFAULT.now.Wechat.objects.filter.order_by Proxy.objects.filter item.get bs.find os.path.realpath str oss2.Bucket admin.site.register check_proxy params.get template.Library datetime.min.time datetime.now Proxy.STATUS_SUCCESS.Proxy.KIND_DOWNLOAD.Proxy.objects.filter.order_by res.append RedirectView.as_view redis.Redis migrations.AddField yestoday_datetime.self.Topic.objects.filter.count sys.stderr.write bucket.head_object reload self.tree.xpath d.startswith paginated_object_list.has_next logging.debug vote.replace_with os.path.abspath params.iteritems StringIO Proxy.STATUS_FAIL.Proxy.KIND_DOWNLOAD.Proxy.objects.filter.delete self.check_wechat_proxies os.path.join
@yijingping
Could please help me check this issue?
May I pull a request to fix it?
Thank you very much.