Hi, your project spring-cloud-gateway-rce requires "requests==2.18.4" in its dependency. After analyzing the source code, we found that the following versions of requests can also be suitable without affecting your project, i.e., requests 2.18.2, 2.18.3. Therefore, we suggest to loosen the dependency on requests from "requests==2.18.4" to "requests>=2.18.2,<=2.18.4" to avoid any possible conflict for importing more packages or for downstream projects that may use spring-cloud-gateway-rce.
May I pull a request to further loosen the dependency on requests?
By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?
We also give our detailed analysis as follows for your reference:
Your project spring-cloud-gateway-rce directly uses 3 APIs from package requests.
requests.api.get, requests.api.post, requests.api.delete
Beginning from the 3 APIs above, 17 functions are then indirectly called, including 14 requests's internal APIs and 3 outsider APIs. The specific call graph is listed as follows (neglecting some repeated function occurrences).
[/k3rwin/spring-cloud-gateway-rce]
+--requests.api.get
| +--requests.api.request
| | +--requests.sessions.Session.__init__
| | | +--requests.utils.default_headers
| | | | +--requests.structures.CaseInsensitiveDict.__init__
| | | | +--requests.utils.default_user_agent
| | | +--requests.hooks.default_hooks
| | | +--requests.cookies.cookiejar_from_dict
| | | | +--requests.cookies.RequestsCookieJar.__init__
| | | | +--requests.cookies.RequestsCookieJar.set_cookie
| | | | +--requests.cookies.create_cookie
| | | +--requests.sessions.Session.mount
| | | +--requests.adapters.HTTPAdapter.__init__
| | | | +--urllib3.util.retry.Retry
| | | | +--urllib3.util.retry.Retry.from_int
| | | | +--requests.adapters.BaseAdapter.__init__
| | | | +--requests.adapters.HTTPAdapter.init_poolmanager
| | | | | +--urllib3.poolmanager.PoolManager
+--requests.api.post
| +--requests.api.request
+--requests.api.delete
| +--requests.api.request
We scan requests's versions and observe that during its evolution between any version from [2.18.2, 2.18.3] and 2.18.4, the changing functions (diffs being listed below) have none intersection with any function or API we mentioned above (either directly or indirectly called by this project).
diff: 2.18.4(original) 2.18.2
['requests.utils.check_header_validity', 'requests.sessions.SessionRedirectMixin.get_redirect_target', 'requests.models.Response', 'requests.sessions.SessionRedirectMixin', 'requests.__init__.check_compatibility', 'requests.help.info', 'requests.adapters.HTTPAdapter.send', 'requests.models.Response.__init__', 'requests.adapters.HTTPAdapter']
diff: 2.18.4(original) 2.18.3
['requests.utils.check_header_validity']
As for other packages, the APIs of urllib3 are called by requests in the call graph and the dependencies on these packages also stay the same in our suggested versions, thus avoiding any outside conflict.
Therefore, we believe that it is quite safe to loose your dependency on requests from "requests==2.18.4" to "requests>=2.18.2,<=2.18.4". This will improve the applicability of spring-cloud-gateway-rce and reduce the possibility of any further dependency conflict with other projects.