Skip to content

sys.set_coroutine_wrapper is removed in Python 3.8#253

Merged
1st1 merged 1 commit into
MagicStack:masterfrom
hroncok:py38
Jun 13, 2019
Merged

sys.set_coroutine_wrapper is removed in Python 3.8#253
1st1 merged 1 commit into
MagicStack:masterfrom
hroncok:py38

Conversation

@hroncok

@hroncok hroncok commented Jun 10, 2019

Copy link
Copy Markdown
Contributor

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

hroncok commented Jun 11, 2019

Copy link
Copy Markdown
Contributor Author

Rebased.

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

1st1 commented Jun 13, 2019

Copy link
Copy Markdown
Member

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