Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Dependency check on 'requests' raises dependency inconsistencies #64

@EpicWink

Description

@EpicWink

Currently, google-resumable-media depends on requests>=2.18. On import, the package checks that this dependency is valid and met. This then checks that all dependencies down the chain are also valid and met.

The issue here is that then a pkg_resources.ContextualVersionConflict is raised when a dependency of requests isn't met when calling the version-check pkg_resources.require('requests >= 2.18.0').

For example, if requests has the requirement urllib3>=1.21,<1.25, but a package further up the chain (eg sentry-sdk) had the requirement urllib3, then the latest version of urllib3 (which is v1.25) will be installed. pip then warns the user that requests requirement won't be met, but in my experience these warnings have not caused issues in the past.

Four solutions I can think of:

  • Have requests allow urllib3=1.25 (see this issue)
  • Manually require urllib3<1.25 in the application
  • Don't check for requests dependency validity at run-time
  • Ignore version inconsistencies of dependencies of requests when checking for dependency validity at run-time

Metadata

Metadata

Assignees

Labels

packagingtype: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions