Skip to content

Cannot install requests transport because qgl requires out of date urllib3 1.x #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
divad opened this issue Oct 4, 2023 · 5 comments
Closed
Labels
type: chore Changes to the build process or auxiliary tools and libraries such as documentation generation

Comments

@divad
Copy link

divad commented Oct 4, 2023

gql has an optional requests transport. This works with the latest requests versions. gql however specifies an old version (1.x) of urllib3 in order to install the requests transport. Why? As far as I can tell gql doesn't directly use urllib3 itself, so it should not be concerned with restricting the version of it. Other packages require urllib3 >=2.0, such as https://pypi.org/project/types-requests/. As such, gql cannot be used in a project which uses these libraries, restricting usage of gql.

Can gql remove this restriction so we can install it in an environment with urllib3 2.x please?

@leszekhanusz
Copy link
Collaborator

That restriction was added in PR #413 as an emergency response when the tests began to fail when requests released version 2.30 which allowed urllib3 2.x to be used (note that it still allows urllib3 1.x)

If you upgrade urllib3 to 2.x in your python env and then try to run the tests following the CONTRIBUTING.md file you'll see there are a lot of tests failing.

There are two reasons:

@leszekhanusz leszekhanusz added the status: blocked Issues outside of ggl control, caused by dependencies or something else label Oct 4, 2023
@divad
Copy link
Author

divad commented Oct 4, 2023

I assume vcrpy is being used by gql itself for tests? Looks that way.
botocore is a different transport.

So... perhaps instead the urllib3 1.x restriction could be applied only to botocore and when using gql to run tests? That way when somebody installs gql[requests] they will be able to use urllib3 2.x ? If somebody tries to install gql[botocore] or gql[all] it could then restrict to urllib3 <2 ?

@divad
Copy link
Author

divad commented Oct 4, 2023

In fact, since as you say vcrpy supports urllib3 (https://github.com/kevin1024/vcrpy/releases/tag/v4.4.0) except for older pythons, maybe we could restrict gql's need for urllib3 1.x in the same way?

@leszekhanusz
Copy link
Collaborator

You're right, I'll see what I can do.

@leszekhanusz leszekhanusz added type: chore Changes to the build process or auxiliary tools and libraries such as documentation generation and removed status: blocked Issues outside of ggl control, caused by dependencies or something else labels Oct 4, 2023
@leszekhanusz
Copy link
Collaborator

It should now work with pre-release 3.5.0b6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore Changes to the build process or auxiliary tools and libraries such as documentation generation
Projects
None yet
Development

No branches or pull requests

2 participants