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
sys.set_coroutine_wrapper will be removed in Python 3.8 #251
Comments
No, we don't need it. We'll have to fix the compatibility with 3.8 at some point though. |
AFAIK It's only used conditionally in here: Lines 1055 to 1087 in 46c5e9e
|
My Cython knowledge is limited here. I wanted to do something like: from cpython.version cimport PY_VERSION_HEX
...
IF PY_VERSION_HEX > 0x03080000:
cdef sys_set_coroutine_wrapper = sys.set_coroutine_wrapper
cdef sys_get_coroutine_wrapper = sys.get_coroutine_wrapper But apparently, Cython determines this On the other hand, cdefs are not possible in regular from cpython.version cimport PY_VERSION_HEX
...
if PY_VERSION_HEX < 0x03080000:
cdef sys_set_coroutine_wrapper = sys.set_coroutine_wrapper
cdef sys_get_coroutine_wrapper = sys.get_coroutine_wrapper Gets to:
Id like to make an actual C EDIT: Trying with: cdef sys_set_coroutine_wrapper = getattr(sys, 'set_coroutine_wrapper', None)
cdef sys_get_coroutine_wrapper = getattr(sys, 'get_coroutine_wrapper', None) |
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
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
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 #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/uvloop#251
PYTHONASYNCIODEBUG
in env?: yesThe function "sys.set_coroutine_wrapper", which was provisionally added to Python 3.5 and deprecated in Python 3.7, will be removed in Python 3.8. If uvloop needs it, now is the last chance to make the case for it.
When compiled with Python 3.8.0b1, uvloop fails to import:
The text was updated successfully, but these errors were encountered: