-
-
Notifications
You must be signed in to change notification settings - Fork 857
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
Incompatible with httpcore 0.12.0 #1495
Conversation
Hey 👋 Indeed, I'm also getting an error about $ pip install httpx httpcore==0.12.0
$ python
>>> import httpx
>>> client = httpx.Client()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/florimond.manca/.pyenv/versions/3.8.5/lib/python3.8/site-packages/httpx/_client.py", line 605, in __init__
self._transport = self._init_transport(
File "/Users/florimond.manca/.pyenv/versions/3.8.5/lib/python3.8/site-packages/httpx/_client.py", line 652, in _init_transport
return HTTPTransport(
File "/Users/florimond.manca/.pyenv/versions/3.8.5/lib/python3.8/site-packages/httpx/_transports/default.py", line 58, in __init__
self._pool = httpcore.SyncConnectionPool(
TypeError: __init__() got an unexpected keyword argument 'retries' And then exiting the interpreter shows the exception you're mentioning that comes from Exception ignored in: <function Client.__del__ at 0x1013363a0>
Traceback (most recent call last):
File "/Users/florimond.manca/.pyenv/versions/3.8.5/lib/python3.8/site-packages/httpx/_client.py", line 1134, in __del__
self.close()
File "/Users/florimond.manca/.pyenv/versions/3.8.5/lib/python3.8/site-packages/httpx/_client.py", line 1106, in close
self._transport.close()
AttributeError: 'Client' object has no attribute '_transport' The reason is that Upgrading to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Argh, awkward. Is there any reasonable way to catch this kind of thing in tests? Testing with every combination of dependency versions specified in |
Testing against the oldest HTTPCore version as per the HTTPX requirement sounds sensible. I'm not sure about running this as part of every CI run, but maybe we could start with that. Only putting it as a task in the release job would mean we only catch these issues once the release is ready, ideally that would be before. Another option is to actually work locally with the lowest HTTPCore possible. That would mean pinning HTTPCore strictly in our |
The version 0.12.0 of httpcore is not compatible. When this version is installed, all the tests using
httpx.Client()
will fail with the following errorAttributeError: 'Client' object has no attribute '_transport'