Skip to content

Commit 0e08802

Browse files
authored
C-Imports from CPython module alone is deprecated And Py_Buffer is built-in
1 parent a4a432e commit 0e08802

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

uvloop/loop.pyx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,19 @@ from libc.stdint cimport uint64_t
2828
from libc.string cimport memset, strerror, memcpy
2929
from libc cimport errno
3030

31-
from cpython cimport PyObject
32-
from cpython cimport PyErr_CheckSignals, PyErr_Occurred
33-
from cpython cimport PyThread_get_thread_ident
34-
from cpython cimport Py_INCREF, Py_DECREF, Py_XDECREF, Py_XINCREF
35-
from cpython cimport (
36-
PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE,
37-
Py_buffer, PyBytes_AsString, PyBytes_CheckExact,
38-
PyBytes_AsStringAndSize,
39-
Py_SIZE, PyBytes_AS_STRING, PyBUF_WRITABLE
31+
from cpython.bytes cimport PyBytes_AsString, PyBytes_CheckExact, PyBytes_AsStringAndSize, PyBytes_AS_STRING
32+
from cpython.buffer cimport (
33+
PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_WRITABLE
4034
)
35+
36+
from cpython.exc cimport PyErr_CheckSignals, PyErr_Occurred
37+
from cpython.object cimport PyObject, Py_SIZE
38+
4139
from cpython.pycapsule cimport PyCapsule_New, PyCapsule_GetPointer
4240

41+
from cpython.pythread cimport PyThread_get_thread_ident
42+
from cpython.ref cimport Py_INCREF, Py_DECREF, Py_XDECREF, Py_XINCREF
43+
4344
from . import _noop
4445

4546

0 commit comments

Comments
 (0)