Skip to content

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Jun 10, 2019

The functions sys.set_coroutine_wrapper and sys.get_coroutine_wrapper,
which were provisionally added to Python 3.5 and deprecated in Python 3.7,
are removed in Python 3.8.

uvloop doesn't use them since Python 3.7, but they remained defined
in stdlib.pxi, leading to AttributeErrors on Python 3.8+.

This makes the definition fallback to None if such functions don't exist.

Fixes #251

The functions `sys.set_coroutine_wrapper` and `sys.get_coroutine_wrapper`,
which were provisionally added to Python 3.5 and deprecated in Python 3.7,
are removed in Python 3.8.

uvloop doesn't use them since Python 3.7, but they remained defined
in stdlib.pxi, leading to AttributeErrors on Python 3.8+.

This makes the definition fallback to None if such functions don't exist.

Fixes MagicStack#251
@hroncok
Copy link
Contributor Author

hroncok commented Jun 11, 2019

Rebased.

@1st1 1st1 merged commit 72c8e2a into MagicStack:master Jun 13, 2019
@1st1
Copy link
Member

1st1 commented Jun 13, 2019

Thank you!

@hroncok hroncok deleted the py38 branch June 17, 2019 08:49
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.

sys.set_coroutine_wrapper will be removed in Python 3.8
2 participants