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 |
|
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'