Skip to content
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

Bump pytest-asyncio from 0.15.1 to 0.18.2 #1411

Closed
wants to merge 17 commits into from
Closed

Conversation

Kludex
Copy link
Sponsor Member

@Kludex Kludex commented Mar 19, 2022

Replaces #1408

This PR adds the asyncio_mode=auto option as well. Which means that @pytest.mark.asyncio markers can be removed.

Previous approach raised errors, which I don't have the time to solve. In any case, this PR just bumps pytest-asyncio, and adds the configuration that is needed to match the behavior we had on 0.15.1.

Both approaches fail with the same error. 😞

@euri10 euri10 self-assigned this Mar 22, 2022
@euri10
Copy link
Member

euri10 commented Mar 22, 2022

I'm game looking at this

@euri10
Copy link
Member

euri10 commented Mar 23, 2022

ok I spent 2h and I'm nowhere close to understand what the f** happens on windows, those warnings about unclosed resources are insanely hard to debug

@euri10
Copy link
Member

euri10 commented Mar 27, 2022

the thing I really dont get is why it fails with anyio ??
E KeyError: 'anyio._backends._asyncio'

@euri10
Copy link
Member

euri10 commented Mar 27, 2022

I think the root issue may be that on windows the closing of the ssl context is too slow but I'm not yet entirely sure

requirements.txt Outdated Show resolved Hide resolved
@agronholm
Copy link

I recall there was a bug regarding unclosed sockets in asyncio that was fixed in later versions of CPython. I do wonder why you're only hitting it now though.

@euri10
Copy link
Member

euri10 commented Apr 6, 2022

I recall there was a bug regarding unclosed sockets in asyncio that was fixed in later versions of CPython. I do wonder why you're only hitting it now though.

and only on windows, and it differs between 3.8 and 3.9
will try to find that report @agronholm but if you find it before dont hesitate :)

@Kludex
Copy link
Sponsor Member Author

Kludex commented Apr 6, 2022

Hmmm... The 3.8 versions are different between those two OS: windows is using 3.8.10, ubuntu is using 3.8.12.

@agronholm
Copy link

I've just ignored those in the AnyIO test suite: https://github.com/agronholm/anyio/blob/master/pyproject.toml#L41

@Kludex
Copy link
Sponsor Member Author

Kludex commented Apr 6, 2022

There's no 3.8.12 for Windows yet...

@euri10
Copy link
Member

euri10 commented Apr 6, 2022

I've just ignored those in the AnyIO test suite: https://github.com/agronholm/anyio/blob/master/pyproject.toml#L41

probably the smart move, I'd like though to do that only on windows since we have zero issues on macos and linux

@Kludex Kludex added this to the Version 0.18.0 milestone Apr 23, 2022
@Kludex
Copy link
Sponsor Member Author

Kludex commented Apr 23, 2022

Let's drop pytest-asyncio and use only anyio, as we already have this dependency via httpx.

@Kludex Kludex closed this Apr 23, 2022
@Kludex Kludex removed this from the Version 0.18.0 milestone Apr 23, 2022
@Kludex Kludex deleted the bump/pytest-asyncio branch October 2, 2022 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants