| |
@@ -0,0 +1,77 @@
|
| |
+ From 8e5da4e53daf03089ad83e007d378a4888fca729 Mon Sep 17 00:00:00 2001
|
| |
+ From: Anton Zhukharev <ancieg@altlinux.org>
|
| |
+ Date: Tue, 19 Dec 2023 12:41:58 +0300
|
| |
+ Subject: [PATCH] fix compatibility with cython>3
|
| |
+
|
| |
+ ---
|
| |
+ uvloop/loop.pyx | 8 ++++----
|
| |
+ 1 file changed, 4 insertions(+), 4 deletions(-)
|
| |
+
|
| |
+ diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
|
| |
+ index b0ffa8b..fb1d5e6 100644
|
| |
+ --- a/uvloop/loop.pyx
|
| |
+ +++ b/uvloop/loop.pyx
|
| |
+ @@ -1397,7 +1397,7 @@ cdef class Loop:
|
| |
+ self._debug = bool(enabled)
|
| |
+ if self.is_running():
|
| |
+ self.call_soon_threadsafe(
|
| |
+ - self._set_coroutine_debug, self, self._debug)
|
| |
+ + self._set_coroutine_debug, self._debug)
|
| |
+
|
| |
+ def is_running(self):
|
| |
+ """Return whether the event loop is currently running."""
|
| |
+ @@ -2749,8 +2749,7 @@ cdef class Loop:
|
| |
+ start_new_session=False,
|
| |
+ executable=None,
|
| |
+ pass_fds=(),
|
| |
+ - # For tests only! Do not use in your code. Ever.
|
| |
+ - __uvloop_sleep_after_fork=False):
|
| |
+ + **kwargs):
|
| |
+
|
| |
+ # TODO: Implement close_fds (might not be very important in
|
| |
+ # Python 3.5, since all FDs aren't inheritable by default.)
|
| |
+ @@ -2770,7 +2769,8 @@ cdef class Loop:
|
| |
+ if executable is not None:
|
| |
+ args[0] = executable
|
| |
+
|
| |
+ - if __uvloop_sleep_after_fork:
|
| |
+ + # For tests only! Do not use in your code. Ever.
|
| |
+ + if kwargs.get('__uvloop_sleep_after_fork'):
|
| |
+ debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK
|
| |
+
|
| |
+ waiter = self._new_future()
|
| |
+ diff --git a/pyproject.toml b/pyproject.toml
|
| |
+ index 0d6d472..daf89f7 100644
|
| |
+ --- a/pyproject.toml
|
| |
+ +++ b/pyproject.toml
|
| |
+ @@ -44,7 +44,7 @@ test = [
|
| |
+ 'pycodestyle~=2.9.0',
|
| |
+ 'pyOpenSSL~=23.0.0',
|
| |
+ 'mypy>=0.800',
|
| |
+ - 'Cython(>=0.29.36,<0.30.0)',
|
| |
+ + 'Cython>=3',
|
| |
+ ]
|
| |
+ docs = [
|
| |
+ 'Sphinx~=4.1.2',
|
| |
+ @@ -56,7 +56,7 @@ docs = [
|
| |
+ requires = [
|
| |
+ "setuptools>=60",
|
| |
+ "wheel",
|
| |
+ - "Cython(>=0.29.36,<0.30.0)",
|
| |
+ + "Cython>=3",
|
| |
+ ]
|
| |
+ build-backend = "setuptools.build_meta"
|
| |
+
|
| |
+ diff --git a/setup.py b/setup.py
|
| |
+ index 5afaee9..d692d3c 100644
|
| |
+ --- a/setup.py
|
| |
+ +++ b/setup.py
|
| |
+ @@ -21,7 +21,7 @@ from setuptools.command.build_ext import build_ext
|
| |
+ from setuptools.command.sdist import sdist
|
| |
+
|
| |
+
|
| |
+ -CYTHON_DEPENDENCY = 'Cython(>=0.29.36,<0.30.0)'
|
| |
+ +CYTHON_DEPENDENCY = 'Cython>=3'
|
| |
+ MACHINE = platform.machine()
|
| |
+ MODULES_CFLAGS = [os.getenv('UVLOOP_OPT_CFLAGS', '-O2')]
|
| |
+ _ROOT = pathlib.Path(__file__).parent
|
| |