Closed oschwald closed 6 months ago
Hi @oschwald, I spent ages trying to debug that problem and eventually gave up moving to httpx
as the main client for testing Mocket.
See https://github.com/mindflayer/python-mocket/pull/181 and https://github.com/aio-libs/aiohttp/issues/4587
Ah, that is too bad. I don't know if it is realistic for us to switch off of aiohttp
, but I suppose we could just avoid using https
in the tests. I initially thought that given the error message, maybe we were not awaiting something.
I did see the 2020 aiohttp
issue while looking into this, but I figured that it was unrelated as it was marked as fixed. I missed the discussion in #181 though. Maybe a warning or something in the docs would help.
Definitely not worth it, but for Mocket I really needed a stable client as the main one for testing. That issue was driving me crazy, and it really seemed something only affecting aiohttp
, up to the point when I started considering alternatives, especially after I realised it was plenty of projects hit by the same problem.
Thanks to @ento this issue is finally solved. I'll release a new version ASAP.
Awesome. Thanks!
Here is the new version with the fix: https://pypi.org/project/mocket/3.12.3/
While debugging failures on our test suite with Python 3.11, I noticed that the async example in the docs fail in the same way with Python 3.11 after changing the URL to HTTPS:
This fails with:
It works fine if the URL is just
http://httpbin.org/ip
.