httpcore 1.0.5 does not work with uvicorn[standard] and pytest-httpx #906
-
Hi all, Pytest seems to be unable to start since the httpcore plugin wants to import h11, which is not used with uvicorn[standard] (instead of h11, httptools is used). Reverting to 1.0.4 resolves the problem. Setup [tool.poetry.dependencies]
python = ">=3.12,<3.13"
httpx = "0.27.0" # comes with httpcore 1.0.5
pytest-httpx = "0.30.0"
uvicorn = { version = "0.29.0", extras = ["standard"] }
pytest = "^8" When I define a simple test and try to run it, I get the following error: def test_something():
assert True
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Sounds like the dependancies are not being correctly installed, tho no reason this would be an |
Beta Was this translation helpful? Give feedback.
-
Hi Tom! Thanks for having a look. I think you're onto something, this is what is currently installed:
pip freeze
It seems like poetry is not picking up uvicorn[standard] properly since uvloop and httptools are nowhere to be found. After running |
Beta Was this translation helpful? Give feedback.
-
After some digging it turns out it was related to a recent switch to Artifactory, a private package repository (with proxy to pypi) which had some caching issues. Clearing all poetry caches resolved the issue and all extra's are installed now. |
Beta Was this translation helpful? Give feedback.
After some digging it turns out it was related to a recent switch to Artifactory, a private package repository (with proxy to pypi) which had some caching issues. Clearing all poetry caches resolved the issue and all extra's are installed now.