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

Implement shutdown_default_executor() #349

Closed
agronholm opened this issue May 31, 2020 · 12 comments · Fixed by #353
Closed

Implement shutdown_default_executor() #349

agronholm opened this issue May 31, 2020 · 12 comments · Fixed by #353

Comments

@agronholm
Copy link

agronholm commented May 31, 2020

  • uvloop version: 0.14.0
  • Python version: 3.9.0b1
  • Platform: Linux
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: yes
  • Does uvloop behave differently from vanilla asyncio? How?: yes – vanilla asyncio implements this method

Python 3.9 added a new mandatory method to the AbstractEventLoop interface, named shutdown_default_executor(). This method is crucial for asyncio.run() to work. If it's absent, asyncio.run() will fail with a NotImplementedError when performing the shutdown cleanup.

Related CPython issue: https://bugs.python.org/issue34037

@aeros
Copy link
Contributor

aeros commented Jun 4, 2020

Seeing as I added loop.shutdown_default_executor() to asyncio, I wouldn't mind working on this issue. Unless someone else specifically wants to work on this, feel free to assign me and I should be able to find the time within the next couple of weeks or so.

(Note that this would be my first issue for uvloop)

@1st1
Copy link
Member

1st1 commented Jun 9, 2020

Kyle, feel free to work on this.

@aeros
Copy link
Contributor

aeros commented Jul 6, 2020

Sorry for the delay on this. I've been a bit otherwise occupied and had some local issues with installing cython in the virtual environment (due to an OS problem where libffi.so.6 was not present). I just resolved the issue earlier today and should have time to open a PR for this issue within the next week or so.

@1st1
Copy link
Member

1st1 commented Jul 6, 2020

np!

@agronholm
Copy link
Author

Really nice to have this. How soon can we expect a new uvloop release?

@1st1
Copy link
Member

1st1 commented Jul 22, 2020

I'll try to do one around 3.9 release. Sorry, i'm extremely busy these days.

@agronholm
Copy link
Author

Python 3.9.0 has been released already so it would be really nice to get this done.

@pilosus
Copy link

pilosus commented Oct 14, 2020

It would be super nice to have this fix released! Can't wait to switch over Python 3.9.0 )

@hauntsaninja
Copy link

hauntsaninja commented Nov 20, 2020

Thank you for uvloop! I'd love to see this released; if there's anything blocking the release I'd be happy to help :-)

@1st1
Copy link
Member

1st1 commented Nov 20, 2020

I'm a bit busy with releasing EdgeDB b1. We should do that in a week or two and then it will be a priority for me to release uvloop (and migrate EdgeDB itself to 3.9).

@NotoriousRebel
Copy link

Any updates?

@agronholm
Copy link
Author

EdgeDB b1 isn't out yet. I wouldn't expect anything to happen before that.

This was referenced Feb 10, 2021
mbakke pushed a commit to guix-mirror/guix that referenced this issue Jan 25, 2022
Version 0.14.0 is not compatible with Python 3.9[1]. Additionally unvendor the
copy of libuv, which was unused, but retained in the source tarball,
fix subprocess spawning and enable tests, so we know when future updates
break it.

[1] MagicStack/uvloop#349

* gnu/packages/python-web.scm (python-uvloop): Update to 0.16.0.
[source]: Add snippet to remove pre-built loop.c and vendored libuv.
[arguments]<#:phases>: Substitute /bin/sh in 'preparations phase, override
'check phase and disable failing tests.
[native-inputs]: Remove python-flake8, because it causes test failures
and add python-pytest-timeout.
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 a pull request may close this issue.

6 participants