Skip to content

Commit c422d4f

Browse files
authored
Reorganize CPython module imports in alphabetical order
If anybody plans to change this please know that it has to do with Cython's plans Deprecate cimporting names from a CPyton module directly.
1 parent e7d98e5 commit c422d4f

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

winloop/loop.pyx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,30 @@ 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 (
31+
from cpython.buffer cimport (
3632
PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE,
37-
Py_buffer, PyBytes_AsString, PyBytes_CheckExact,
33+
Py_buffer, PyBUF_WRITABLE
34+
)
35+
from cpython.bytes cimport (
36+
PyBytes_AsString, PyBytes_CheckExact,
3837
PyBytes_AsStringAndSize,
39-
Py_SIZE, PyBytes_AS_STRING, PyBUF_WRITABLE
38+
PyBytes_AS_STRING
4039
)
40+
41+
from cpython.exc cimport PyErr_CheckSignals, PyErr_Occurred
42+
43+
from cpython.object cimport PyObject, Py_SIZE
44+
4145
from cpython.pycapsule cimport PyCapsule_New, PyCapsule_GetPointer
4246

47+
# (Winloop) We need some cleaver hacky techniques for
48+
# preventing slow spawnning processes for MSVC
4349
from cpython.pystate cimport PyGILState_Ensure, PyGILState_Release, PyGILState_STATE
4450

51+
from cpython.pythread cimport PyThread_get_thread_ident
52+
53+
from cpython.ref cimport Py_INCREF, Py_DECREF, Py_XDECREF, Py_XINCREF
54+
4555
from . import _noop
4656

4757

0 commit comments

Comments
 (0)