All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3
@ 2024-02-09 17:56 James Hilliard
  2024-02-09 17:56 ` [Buildroot] [PATCH 2/2] package/python-cython: bump to version 3.0.8 James Hilliard
  2024-02-11 21:24 ` [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3 Yann E. MORIN
  0 siblings, 2 replies; 13+ messages in thread
From: James Hilliard @ 2024-02-09 17:56 UTC (permalink / raw)
  To: buildroot; +Cc: Joseph Kogut, Giulio Benetti, James Hilliard, Asaf Kahlon

Add patches from pending upstream pull request which add cython3
compatibility.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 .../0001-Updates-for-Cython3.patch            | 631 ++++++++++++++++++
 ...ebug-has-args-difference-in-python-3.patch |  30 +
 .../0003-fix-tests-on-python-3.8.patch        |  31 +
 .../0004-fix-arg-count-for-wrap.patch         |  52 ++
 4 files changed, 744 insertions(+)
 create mode 100644 package/python-uvloop/0001-Updates-for-Cython3.patch
 create mode 100644 package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch
 create mode 100644 package/python-uvloop/0003-fix-tests-on-python-3.8.patch
 create mode 100644 package/python-uvloop/0004-fix-arg-count-for-wrap.patch

diff --git a/package/python-uvloop/0001-Updates-for-Cython3.patch b/package/python-uvloop/0001-Updates-for-Cython3.patch
new file mode 100644
index 0000000000..b7ef1091ac
--- /dev/null
+++ b/package/python-uvloop/0001-Updates-for-Cython3.patch
@@ -0,0 +1,631 @@
+From 087a2983c8022598232cb7ed0a49da334d7af9ff Mon Sep 17 00:00:00 2001
+From: Alan Brooks <12380017+alan-brooks@users.noreply.github.com>
+Date: Thu, 28 Dec 2023 12:18:15 +0000
+Subject: [PATCH] Updates for Cython3 Remove SSL depreciation warnings buillt
+ on debian 12.6 python-3.22 Cython-3.0.7 libuv-1.46.0
+
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+[Upstream status:
+https://github.com/MagicStack/uvloop/pull/587]
+---
+ Makefile                         |  2 +-
+ setup.py                         |  6 ++++--
+ tests/test_process.py            |  4 ++--
+ tests/test_tcp.py                | 19 ++++++++++++-------
+ uvloop/_testbase.py              |  4 +++-
+ uvloop/cbhandles.pyx             |  4 ++--
+ uvloop/dns.pyx                   |  4 ++--
+ uvloop/handles/basetransport.pxd |  4 ++--
+ uvloop/handles/basetransport.pyx |  4 ++--
+ uvloop/handles/handle.pyx        |  2 +-
+ uvloop/handles/pipe.pyx          |  2 +-
+ uvloop/handles/poll.pxd          |  2 +-
+ uvloop/handles/poll.pyx          |  2 +-
+ uvloop/handles/stream.pyx        | 16 ++++++++++------
+ uvloop/handles/udp.pyx           |  4 ++--
+ uvloop/includes/consts.pxi       | 25 -------------------------
+ uvloop/includes/fork_handler.h   |  6 +++++-
+ uvloop/includes/system.h         | 16 ++++++++++++++++
+ uvloop/includes/system.pxd       | 12 ++++--------
+ uvloop/includes/uv.pxd           |  6 +++---
+ uvloop/loop.pxd                  | 28 ++++++++++++++++++++++++----
+ uvloop/loop.pyx                  | 10 +++++-----
+ uvloop/sslproto.pxd              |  4 ++--
+ uvloop/sslproto.pyx              |  4 ++--
+ 24 files changed, 107 insertions(+), 83 deletions(-)
+ delete mode 100644 uvloop/includes/consts.pxi
+ create mode 100755 uvloop/includes/system.h
+
+diff --git a/Makefile b/Makefile
+index 4375e5d..6a0475a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,7 @@ _default: compile
+ 
+ 
+ clean:
+-	rm -fr dist/ doc/_build/ *.egg-info uvloop/loop.*.pyd
++	rm -fr dist/ doc/_build/ *.egg-info uvloop/loop.*.pyd uvloop/loop_d.*.pyd
+ 	rm -fr uvloop/*.c uvloop/*.html uvloop/*.so
+ 	rm -fr uvloop/handles/*.html uvloop/includes/*.html
+ 	find . -name '__pycache__' | xargs rm -rf
+diff --git a/setup.py b/setup.py
+index ba15af5..8fdf0e5 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(>=0.29.36)'
+ MACHINE = platform.machine()
+ MODULES_CFLAGS = [os.getenv('UVLOOP_OPT_CFLAGS', '-O2')]
+ _ROOT = pathlib.Path(__file__).parent
+@@ -144,7 +144,9 @@ class uvloop_build_ext(build_ext):
+             self.distribution.ext_modules[:] = cythonize(
+                 self.distribution.ext_modules,
+                 compiler_directives=directives,
+-                annotate=self.cython_annotate)
++                annotate=self.cython_annotate,
++                compile_time_env=dict(DEFAULT_FREELIST_SIZE=250, SSL_READ_MAX_SIZE=256 * 1024),
++                emit_linenums=True)
+ 
+         super().finalize_options()
+ 
+diff --git a/tests/test_process.py b/tests/test_process.py
+index bfcbba1..95e1c9e 100644
+--- a/tests/test_process.py
++++ b/tests/test_process.py
+@@ -912,7 +912,7 @@ class Test_UV_Process_Delayed(tb.UVTestCase):
+                 stdin=subprocess.PIPE,
+                 stdout=subprocess.PIPE,
+                 stderr=subprocess.PIPE,
+-                __uvloop_sleep_after_fork=True))
++                uvloop_sleep_after_fork=True))
+         self.assertIsNot(transport, None)
+         self.assertEqual(transport.get_returncode(), 0)
+         self.assertEqual(
+@@ -931,7 +931,7 @@ class Test_UV_Process_Delayed(tb.UVTestCase):
+                 stdin=None,
+                 stdout=subprocess.PIPE,
+                 stderr=subprocess.PIPE,
+-                __uvloop_sleep_after_fork=True))
++                uvloop_sleep_after_fork=True))
+         self.assertIsNot(transport, None)
+         self.assertEqual(transport.get_returncode(), 0)
+         self.assertEqual(
+diff --git a/tests/test_tcp.py b/tests/test_tcp.py
+index 812e62b..213e2d9 100644
+--- a/tests/test_tcp.py
++++ b/tests/test_tcp.py
+@@ -1630,17 +1630,22 @@ class _TestSSL(tb.SSLTestCase):
+             self.fail("unexpected call to connection_made()")
+ 
+     def test_ssl_connect_accepted_socket(self):
+-        if hasattr(ssl, 'PROTOCOL_TLS'):
+-            proto = ssl.PROTOCOL_TLS
++        if hasattr(ssl, 'PROTOCOL_TLS_SERVER'):
++            server_proto = ssl.PROTOCOL_TLS_SERVER
++            client_proto = ssl.PROTOCOL_TLS_CLIENT
+         else:
+-            proto = ssl.PROTOCOL_SSLv23
+-        server_context = ssl.SSLContext(proto)
++            if hasattr(ssl, 'PROTOCOL_TLS'):
++                client_proto = server_proto = ssl.PROTOCOL_TLS
++            else:
++                client_proto = server_proto = ssl.PROTOCOL_SSLv23
++
++        server_context = ssl.SSLContext(server_proto)
+         server_context.load_cert_chain(self.ONLYCERT, self.ONLYKEY)
+         if hasattr(server_context, 'check_hostname'):
+             server_context.check_hostname = False
+         server_context.verify_mode = ssl.CERT_NONE
+ 
+-        client_context = ssl.SSLContext(proto)
++        client_context = ssl.SSLContext(client_proto)
+         if hasattr(server_context, 'check_hostname'):
+             client_context.check_hostname = False
+         client_context.verify_mode = ssl.CERT_NONE
+@@ -2233,7 +2238,7 @@ class _TestSSL(tb.SSLTestCase):
+         sslctx.use_privatekey_file(self.ONLYKEY)
+         sslctx.use_certificate_chain_file(self.ONLYCERT)
+         client_sslctx = self._create_client_ssl_context()
+-        if hasattr(ssl, 'OP_NO_TLSv1_3'):
++        if sys.version_info < (3, 8) and hasattr(ssl, 'OP_NO_TLSv1_3'):
+             client_sslctx.options |= ssl.OP_NO_TLSv1_3
+ 
+         def server(sock):
+@@ -2592,7 +2597,7 @@ class _TestSSL(tb.SSLTestCase):
+         sslctx_openssl.use_privatekey_file(self.ONLYKEY)
+         sslctx_openssl.use_certificate_chain_file(self.ONLYCERT)
+         client_sslctx = self._create_client_ssl_context()
+-        if hasattr(ssl, 'OP_NO_TLSv1_3'):
++        if sys.version_info < (3, 8) and hasattr(ssl, 'OP_NO_TLSv1_3'):
+             client_sslctx.options |= ssl.OP_NO_TLSv1_3
+ 
+         future = None
+diff --git a/uvloop/_testbase.py b/uvloop/_testbase.py
+index c4a7595..e620e15 100644
+--- a/uvloop/_testbase.py
++++ b/uvloop/_testbase.py
+@@ -269,7 +269,9 @@ def find_free_port(start_from=50000):
+ class SSLTestCase:
+ 
+     def _create_server_ssl_context(self, certfile, keyfile=None):
+-        if hasattr(ssl, 'PROTOCOL_TLS'):
++        if hasattr(ssl, 'PROTOCOL_TLS_SERVER'):
++            sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
++        elif hasattr(ssl, 'PROTOCOL_TLS'):
+             sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS)
+         else:
+             sslcontext = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
+diff --git a/uvloop/cbhandles.pyx b/uvloop/cbhandles.pyx
+index 2914b42..8bcc5aa 100644
+--- a/uvloop/cbhandles.pyx
++++ b/uvloop/cbhandles.pyx
+@@ -76,8 +76,8 @@ cdef class Handle:
+                     self.arg1, self.arg2, self.arg3, self.arg4)
+ 
+             else:
+-                raise RuntimeError('invalid Handle.cb_type: {}'.format(
+-                    cb_type))
++                raise RuntimeError('invalid Handle.cb_type: {} {!r}/{!r}'.format(
++                    cb_type, self.args1, self.args2))
+ 
+         except (KeyboardInterrupt, SystemExit):
+             raise
+diff --git a/uvloop/dns.pyx b/uvloop/dns.pyx
+index 7aad631..09b9282 100644
+--- a/uvloop/dns.pyx
++++ b/uvloop/dns.pyx
+@@ -298,7 +298,7 @@ cdef class AddrInfo:
+             uv.uv_freeaddrinfo(self.data)  # returns void
+             self.data = NULL
+ 
+-    cdef void set_data(self, system.addrinfo *data):
++    cdef void set_data(self, system.addrinfo *data) noexcept:
+         self.data = data
+ 
+     cdef unpack(self):
+@@ -326,7 +326,7 @@ cdef class AddrInfo:
+         return result
+ 
+     @staticmethod
+-    cdef int isinstance(object other):
++    cdef int isinstance(object other) noexcept:
+         return type(other) is AddrInfo
+ 
+ 
+diff --git a/uvloop/handles/basetransport.pxd b/uvloop/handles/basetransport.pxd
+index ba356a7..8112622 100644
+--- a/uvloop/handles/basetransport.pxd
++++ b/uvloop/handles/basetransport.pxd
+@@ -47,8 +47,8 @@ cdef class UVBaseTransport(UVSocketHandle):
+     # === overloads ===
+ 
+     cdef _new_socket(self)
+-    cdef size_t _get_write_buffer_size(self)
++    cdef size_t _get_write_buffer_size(self) noexcept
+ 
+-    cdef bint _is_reading(self)
++    cdef bint _is_reading(self) noexcept
+     cdef _start_reading(self)
+     cdef _stop_reading(self)
+diff --git a/uvloop/handles/basetransport.pyx b/uvloop/handles/basetransport.pyx
+index 28b3079..a8592f2 100644
+--- a/uvloop/handles/basetransport.pyx
++++ b/uvloop/handles/basetransport.pyx
+@@ -18,7 +18,7 @@ cdef class UVBaseTransport(UVSocketHandle):
+ 
+         self._closing = 0
+ 
+-    cdef size_t _get_write_buffer_size(self):
++    cdef size_t _get_write_buffer_size(self) noexcept:
+         return 0
+ 
+     cdef inline _schedule_call_connection_made(self):
+@@ -211,7 +211,7 @@ cdef class UVBaseTransport(UVSocketHandle):
+             self._extra_info = {}
+         self._extra_info[name] = obj
+ 
+-    cdef bint _is_reading(self):
++    cdef bint _is_reading(self) noexcept:
+         raise NotImplementedError
+ 
+     cdef _start_reading(self):
+diff --git a/uvloop/handles/handle.pyx b/uvloop/handles/handle.pyx
+index 6efe375..2c96458 100644
+--- a/uvloop/handles/handle.pyx
++++ b/uvloop/handles/handle.pyx
+@@ -363,7 +363,7 @@ cdef void __uv_close_handle_cb(uv.uv_handle_t* handle) noexcept with gil:
+             Py_DECREF(h)  # Was INCREFed in UVHandle._close
+ 
+ 
+-cdef void __close_all_handles(Loop loop):
++cdef void __close_all_handles(Loop loop) noexcept:
+     uv.uv_walk(loop.uvloop,
+                __uv_walk_close_all_handles_cb,
+                <void*>loop)  # void
+diff --git a/uvloop/handles/pipe.pyx b/uvloop/handles/pipe.pyx
+index 195576c..d30a736 100644
+--- a/uvloop/handles/pipe.pyx
++++ b/uvloop/handles/pipe.pyx
+@@ -25,7 +25,7 @@ cdef __pipe_init_uv_handle(UVStream handle, Loop loop):
+ cdef __pipe_open(UVStream handle, int fd):
+     cdef int err
+     err = uv.uv_pipe_open(<uv.uv_pipe_t *>handle._handle,
+-                          <uv.uv_file>fd)
++                          <uv.uv_os_fd_t>fd)
+     if err < 0:
+         exc = convert_error(err)
+         raise exc
+diff --git a/uvloop/handles/poll.pxd b/uvloop/handles/poll.pxd
+index d07030b..c220540 100644
+--- a/uvloop/handles/poll.pxd
++++ b/uvloop/handles/poll.pxd
+@@ -10,7 +10,7 @@ cdef class UVPoll(UVHandle):
+     cdef inline _poll_start(self, int flags)
+     cdef inline _poll_stop(self)
+ 
+-    cdef int is_active(self)
++    cdef int is_active(self) noexcept
+ 
+     cdef is_reading(self)
+     cdef is_writing(self)
+diff --git a/uvloop/handles/poll.pyx b/uvloop/handles/poll.pyx
+index fca5981..c905e9b 100644
+--- a/uvloop/handles/poll.pyx
++++ b/uvloop/handles/poll.pyx
+@@ -29,7 +29,7 @@ cdef class UVPoll(UVHandle):
+         handle._init(loop, fd)
+         return handle
+ 
+-    cdef int is_active(self):
++    cdef int is_active(self) noexcept:
+         return (self.reading_handle is not None or
+                 self.writing_handle is not None)
+ 
+diff --git a/uvloop/handles/stream.pyx b/uvloop/handles/stream.pyx
+index d4e02e3..09df887 100644
+--- a/uvloop/handles/stream.pyx
++++ b/uvloop/handles/stream.pyx
+@@ -1,4 +1,8 @@
+-DEF __PREALLOCED_BUFS = 4
++cdef extern from *:
++    '''
++    enum {__PREALLOCED_BUFS = 4};
++    '''
++    const bint __PREALLOCED_BUFS
+ 
+ 
+ @cython.no_gc_clear
+@@ -279,7 +283,7 @@ cdef class UVStream(UVBaseTransport):
+     cdef inline _close_on_read_error(self):
+         self.__read_error_close = 1
+ 
+-    cdef bint _is_reading(self):
++    cdef bint _is_reading(self) noexcept:
+         return self.__reading
+ 
+     cdef _start_reading(self):
+@@ -578,7 +582,7 @@ cdef class UVStream(UVBaseTransport):
+ 
+         self._maybe_resume_protocol()
+ 
+-    cdef size_t _get_write_buffer_size(self):
++    cdef size_t _get_write_buffer_size(self) noexcept:
+         if self._handle is NULL:
+             return 0
+         return ((<uv.uv_stream_t*>self._handle).write_queue_size +
+@@ -755,7 +759,7 @@ cdef inline bint __uv_stream_on_read_common(
+     UVStream sc,
+     Loop loop,
+     ssize_t nread,
+-):
++) noexcept:
+     if sc._closed:
+         # The stream was closed, there is no reason to
+         # do any work now.
+@@ -818,7 +822,7 @@ cdef inline void __uv_stream_on_read_impl(
+     uv.uv_stream_t* stream,
+     ssize_t nread,
+     const uv.uv_buf_t* buf,
+-):
++) noexcept:
+     cdef:
+         UVStream sc = <UVStream>stream.data
+         Loop loop = sc._loop
+@@ -849,7 +853,7 @@ cdef inline void __uv_stream_on_read_impl(
+ cdef inline void __uv_stream_on_write_impl(
+     uv.uv_write_t* req,
+     int status,
+-):
++) noexcept:
+     cdef:
+         _StreamWriteContext ctx = <_StreamWriteContext> req.data
+         UVStream stream = <UVStream>ctx.stream
+diff --git a/uvloop/handles/udp.pyx b/uvloop/handles/udp.pyx
+index bbe60d5..fdd1d8b 100644
+--- a/uvloop/handles/udp.pyx
++++ b/uvloop/handles/udp.pyx
+@@ -127,12 +127,12 @@ cdef class UDPTransport(UVBaseTransport):
+             exc = convert_error(err)
+             raise exc
+ 
+-    cdef size_t _get_write_buffer_size(self):
++    cdef size_t _get_write_buffer_size(self) noexcept:
+         if self._handle is NULL:
+             return 0
+         return (<uv.uv_udp_t*>self._handle).send_queue_size
+ 
+-    cdef bint _is_reading(self):
++    cdef bint _is_reading(self) noexcept:
+         return self.__receiving
+ 
+     cdef _start_reading(self):
+diff --git a/uvloop/includes/consts.pxi b/uvloop/includes/consts.pxi
+deleted file mode 100644
+index f765053..0000000
+--- a/uvloop/includes/consts.pxi
++++ /dev/null
+@@ -1,25 +0,0 @@
+-DEF UV_STREAM_RECV_BUF_SIZE = 256000  # 250kb
+-
+-DEF FLOW_CONTROL_HIGH_WATER = 64  # KiB
+-DEF FLOW_CONTROL_HIGH_WATER_SSL_READ = 256  # KiB
+-DEF FLOW_CONTROL_HIGH_WATER_SSL_WRITE = 512  # KiB
+-
+-DEF DEFAULT_FREELIST_SIZE = 250
+-DEF DNS_PYADDR_TO_SOCKADDR_CACHE_SIZE = 2048
+-
+-DEF DEBUG_STACK_DEPTH = 10
+-
+-
+-DEF __PROCESS_DEBUG_SLEEP_AFTER_FORK = 1
+-
+-
+-DEF LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5
+-
+-
+-# Number of seconds to wait for SSL handshake to complete
+-# The default timeout matches that of Nginx.
+-DEF SSL_HANDSHAKE_TIMEOUT = 60.0
+-# Number of seconds to wait for SSL shutdown to complete
+-# The default timeout mimics lingering_time
+-DEF SSL_SHUTDOWN_TIMEOUT = 30.0
+-DEF SSL_READ_MAX_SIZE = 256 * 1024
+diff --git a/uvloop/includes/fork_handler.h b/uvloop/includes/fork_handler.h
+index 47bbe03..9d3573a 100644
+--- a/uvloop/includes/fork_handler.h
++++ b/uvloop/includes/fork_handler.h
+@@ -1,7 +1,10 @@
++#ifndef UVLOOP_FORK_HANDLER_H_
++#define UVLOOP_FORK_HANDLER_H_
++
+ volatile uint64_t MAIN_THREAD_ID = 0;
+ volatile int8_t MAIN_THREAD_ID_SET = 0;
+ 
+-typedef void (*OnForkHandler)();
++typedef void (*OnForkHandler)(void);
+ 
+ OnForkHandler __forkHandler = NULL;
+ 
+@@ -36,3 +39,4 @@ void setMainThreadID(uint64_t id) {
+     MAIN_THREAD_ID = id;
+     MAIN_THREAD_ID_SET = 1;
+ }
++#endif
+diff --git a/uvloop/includes/system.h b/uvloop/includes/system.h
+new file mode 100755
+index 0000000..e143bb5
+--- /dev/null
++++ b/uvloop/includes/system.h
+@@ -0,0 +1,16 @@
++#ifndef UVLOOP_SYSTEM_H_
++#define UVLOOP_SYSTEM_H_
++#if defined(_WIN32) || defined(MS_WINDOWS) || defined(_MSC_VER)
++#include "Winsock2.h"
++#include "ws2def.h"
++#include "includes/fork_handler.h"
++#else
++#include "arpa/inet.h"
++#include "sys/socket.h"
++#include "sys/un.h"
++#include "unistd.h"
++#include "pthread.h"
++#endif
++#endif
++
++
+diff --git a/uvloop/includes/system.pxd b/uvloop/includes/system.pxd
+index 367fedd..d1da74e 100644
+--- a/uvloop/includes/system.pxd
++++ b/uvloop/includes/system.pxd
+@@ -1,13 +1,9 @@
+ from libc.stdint cimport int8_t, uint64_t
+ 
+-cdef extern from "arpa/inet.h" nogil:
+-
+-    int ntohl(int)
+-    int htonl(int)
+-    int ntohs(int)
+-
+-
+-cdef extern from "sys/socket.h" nogil:
++cdef extern from "includes/system.h":
++    int ntohl(int) nogil
++    int htonl(int) nogil
++    int ntohs(int) nogil
+ 
+     struct sockaddr:
+         unsigned short sa_family
+diff --git a/uvloop/includes/uv.pxd b/uvloop/includes/uv.pxd
+index 8765130..ddd9738 100644
+--- a/uvloop/includes/uv.pxd
++++ b/uvloop/includes/uv.pxd
+@@ -220,7 +220,7 @@ cdef extern from "uv.h" nogil:
+         UV_LEAVE_GROUP = 0,
+         UV_JOIN_GROUP
+ 
+-    cpdef enum uv_fs_event:
++    cdef enum uv_fs_event:
+         UV_RENAME = 1,
+         UV_CHANGE = 2
+ 
+@@ -282,7 +282,7 @@ cdef extern from "uv.h" nogil:
+     int uv_loop_close(uv_loop_t* loop)
+     int uv_loop_alive(uv_loop_t* loop)
+     int uv_loop_fork(uv_loop_t* loop)
+-    int uv_backend_fd(uv_loop_t* loop)
++    uv_os_fd_t uv_backend_fd(uv_loop_t* loop)
+ 
+     void uv_update_time(uv_loop_t* loop)
+     uint64_t uv_now(const uv_loop_t*)
+@@ -378,7 +378,7 @@ cdef extern from "uv.h" nogil:
+     # Pipes
+ 
+     int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc)
+-    int uv_pipe_open(uv_pipe_t* handle, uv_file file)
++    int uv_pipe_open(uv_pipe_t* handle, uv_os_fd_t file)
+     int uv_pipe_bind(uv_pipe_t* handle, const char* name)
+ 
+     void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle,
+diff --git a/uvloop/loop.pxd b/uvloop/loop.pxd
+index 5613473..f90c704 100644
+--- a/uvloop/loop.pxd
++++ b/uvloop/loop.pxd
+@@ -1,15 +1,35 @@
+ # cython: language_level=3
+ 
++cdef extern from *:
++    '''
++    enum { UV_STREAM_RECV_BUF_SIZE = 256000,
++           SSL_READ_MAX_SIZE = 256 * 1024,  // 250kb
++          };
++    const float SSL_HANDSHAKE_TIMEOUT = 60.0; // Number of seconds to wait for SSL handshake to complete The default timeout matches that of Nginx.
++    const float SSL_SHUTDOWN_TIMEOUT  = 30.0; // Number of seconds to wait for SSL shutdown to complete The default timeout mimics lingering_time
++    '''
++    const bint UV_STREAM_RECV_BUF_SIZE
++    const bint SSL_READ_MAX_SIZE
++
++    const float SSL_HANDSHAKE_TIMEOUT
++    const float SSL_SHUTDOWN_TIMEOUT
++
++cdef enum:
++    FLOW_CONTROL_HIGH_WATER = 64  # KiB
++    FLOW_CONTROL_HIGH_WATER_SSL_READ = 256  # KiB
++    FLOW_CONTROL_HIGH_WATER_SSL_WRITE = 512  # KiB
++
++    DNS_PYADDR_TO_SOCKADDR_CACHE_SIZE = 2048
++    DEBUG_STACK_DEPTH = 10
++    __PROCESS_DEBUG_SLEEP_AFTER_FORK = 1
++    LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5
++
+ 
+ from .includes cimport uv
+ from .includes cimport system
+ 
+ from libc.stdint cimport uint64_t, uint32_t, int64_t
+ 
+-
+-include "includes/consts.pxi"
+-
+-
+ cdef extern from *:
+     ctypedef int vint "volatile int"
+ 
+diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
+index 334d8d5..53e1160 100644
+--- a/uvloop/loop.pyx
++++ b/uvloop/loop.pyx
+@@ -43,7 +43,7 @@ from cpython.pycapsule cimport PyCapsule_New, PyCapsule_GetPointer
+ from . import _noop
+ 
+ 
+-include "includes/consts.pxi"
++
+ include "includes/stdlib.pxi"
+ 
+ include "errors.pyx"
+@@ -1118,7 +1118,7 @@ cdef class Loop:
+ 
+     cdef _sock_set_reuseport(self, int fd):
+         cdef:
+-            int err
++            int err = 0
+             int reuseport_flag = 1
+ 
+         err = system.setsockopt(
+@@ -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."""
+@@ -2750,7 +2750,7 @@ cdef class Loop:
+                                executable=None,
+                                pass_fds=(),
+                                # For tests only! Do not use in your code. Ever.
+-                               __uvloop_sleep_after_fork=False):
++                               uvloop_sleep_after_fork=False):
+ 
+         # TODO: Implement close_fds (might not be very important in
+         # Python 3.5, since all FDs aren't inheritable by default.)
+@@ -2770,7 +2770,7 @@ cdef class Loop:
+         if executable is not None:
+             args[0] = executable
+ 
+-        if __uvloop_sleep_after_fork:
++        if uvloop_sleep_after_fork:
+             debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK
+ 
+         waiter = self._new_future()
+diff --git a/uvloop/sslproto.pxd b/uvloop/sslproto.pxd
+index 3da10f0..68e4d57 100644
+--- a/uvloop/sslproto.pxd
++++ b/uvloop/sslproto.pxd
+@@ -122,7 +122,7 @@ cdef class SSLProtocol:
+     # Flow control for writes from APP socket
+ 
+     cdef _control_app_writing(self, object context=*)
+-    cdef size_t _get_write_buffer_size(self)
++    cdef size_t _get_write_buffer_size(self) noexcept
+     cdef _set_write_buffer_limits(self, high=*, low=*)
+ 
+     # Flow control for reads to APP socket
+@@ -134,5 +134,5 @@ cdef class SSLProtocol:
+ 
+     cdef _control_ssl_reading(self)
+     cdef _set_read_buffer_limits(self, high=*, low=*)
+-    cdef size_t _get_read_buffer_size(self)
++    cdef size_t _get_read_buffer_size(self) noexcept
+     cdef _fatal_error(self, exc, message=*)
+diff --git a/uvloop/sslproto.pyx b/uvloop/sslproto.pyx
+index 42bb764..0a43746 100644
+--- a/uvloop/sslproto.pyx
++++ b/uvloop/sslproto.pyx
+@@ -861,7 +861,7 @@ cdef class SSLProtocol:
+                     'protocol': self,
+                 })
+ 
+-    cdef size_t _get_write_buffer_size(self):
++    cdef size_t _get_write_buffer_size(self) noexcept:
+         return self._outgoing.pending + self._write_buffer_size
+ 
+     cdef _set_write_buffer_limits(self, high=None, low=None):
+@@ -903,7 +903,7 @@ cdef class SSLProtocol:
+         self._incoming_high_water = high
+         self._incoming_low_water = low
+ 
+-    cdef size_t _get_read_buffer_size(self):
++    cdef size_t _get_read_buffer_size(self) noexcept:
+         return self._incoming.pending
+ 
+     # Flow control for writes to SSL socket
+-- 
+2.34.1
+
diff --git a/package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch b/package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch
new file mode 100644
index 0000000000..ac6170aff3
--- /dev/null
+++ b/package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch
@@ -0,0 +1,30 @@
+From 8b63801bfdb1f0cf7fde4f58e96f8628a587b186 Mon Sep 17 00:00:00 2001
+From: Alan Brooks <12380017+alan-brooks@users.noreply.github.com>
+Date: Thu, 28 Dec 2023 16:17:49 +0000
+Subject: [PATCH] _set_coroutine_debug has args difference in python 3.11
+
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+[Upstream status:
+https://github.com/MagicStack/uvloop/pull/587]
+---
+ uvloop/loop.pyx | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
+index 53e1160..5ca718e 100644
+--- a/uvloop/loop.pyx
++++ b/uvloop/loop.pyx
+@@ -1396,8 +1396,9 @@ cdef class Loop:
+     def set_debug(self, enabled):
+         self._debug = bool(enabled)
+         if self.is_running():
++            args = (self, self._debug) if sys.version_info < (3, 11) else (self._debug,)
+             self.call_soon_threadsafe(
+-                self._set_coroutine_debug, self._debug)
++                self._set_coroutine_debug, *args)
+ 
+     def is_running(self):
+         """Return whether the event loop is currently running."""
+-- 
+2.34.1
+
diff --git a/package/python-uvloop/0003-fix-tests-on-python-3.8.patch b/package/python-uvloop/0003-fix-tests-on-python-3.8.patch
new file mode 100644
index 0000000000..42f04f2241
--- /dev/null
+++ b/package/python-uvloop/0003-fix-tests-on-python-3.8.patch
@@ -0,0 +1,31 @@
+From ef5c3e5c6f331692ebcbea9e4c6aead8b2187038 Mon Sep 17 00:00:00 2001
+From: alan-brooks <12380017+alan-brooks@users.noreply.github.com>
+Date: Thu, 28 Dec 2023 19:58:11 +0000
+Subject: [PATCH] fix tests on python 3.8
+
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+[Upstream status:
+https://github.com/MagicStack/uvloop/pull/587]
+---
+ uvloop/loop.pyx | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
+index 5ca718e..75b915a 100644
+--- a/uvloop/loop.pyx
++++ b/uvloop/loop.pyx
+@@ -1396,9 +1396,8 @@ cdef class Loop:
+     def set_debug(self, enabled):
+         self._debug = bool(enabled)
+         if self.is_running():
+-            args = (self, self._debug) if sys.version_info < (3, 11) else (self._debug,)
+-            self.call_soon_threadsafe(
+-                self._set_coroutine_debug, *args)
++            args = ((self, self._debug),) if sys.version_info < (3, 11) else (self._debug,)
++            self.call_soon_threadsafe(self._set_coroutine_debug, *args)
+ 
+     def is_running(self):
+         """Return whether the event loop is currently running."""
+-- 
+2.34.1
+
diff --git a/package/python-uvloop/0004-fix-arg-count-for-wrap.patch b/package/python-uvloop/0004-fix-arg-count-for-wrap.patch
new file mode 100644
index 0000000000..fe082f4f90
--- /dev/null
+++ b/package/python-uvloop/0004-fix-arg-count-for-wrap.patch
@@ -0,0 +1,52 @@
+From afef6364c2c3100ab23c2bb2de82d2da330b258c Mon Sep 17 00:00:00 2001
+From: alan-brooks <12380017+alan-brooks@users.noreply.github.com>
+Date: Fri, 29 Dec 2023 11:24:19 +0000
+Subject: [PATCH] fix arg count for wrap()
+
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+[Upstream status:
+https://github.com/MagicStack/uvloop/pull/587]
+---
+ uvloop/loop.pxd | 2 +-
+ uvloop/loop.pyx | 5 ++---
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/uvloop/loop.pxd b/uvloop/loop.pxd
+index f90c704..d34ffeb 100644
+--- a/uvloop/loop.pxd
++++ b/uvloop/loop.pxd
+@@ -220,7 +220,7 @@ cdef class Loop:
+     cdef inline _ceval_process_signals(self)
+     cdef _invoke_signals(self, bytes data)
+ 
+-    cdef _set_coroutine_debug(self, bint enabled)
++    cpdef _set_coroutine_debug(self, bint enabled)
+ 
+     cdef _print_debug_info(self)
+ 
+diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
+index 75b915a..a3eeb60 100644
+--- a/uvloop/loop.pyx
++++ b/uvloop/loop.pyx
+@@ -1131,7 +1131,7 @@ cdef class Loop:
+         if err < 0:
+             raise convert_error(-errno.errno)
+ 
+-    cdef _set_coroutine_debug(self, bint enabled):
++    cpdef _set_coroutine_debug(self, bint enabled):
+         enabled = bool(enabled)
+         if self._coroutine_debug_set == enabled:
+             return
+@@ -1396,8 +1396,7 @@ cdef class Loop:
+     def set_debug(self, enabled):
+         self._debug = bool(enabled)
+         if self.is_running():
+-            args = ((self, self._debug),) if sys.version_info < (3, 11) else (self._debug,)
+-            self.call_soon_threadsafe(self._set_coroutine_debug, *args)
++             self.call_soon_threadsafe(self._set_coroutine_debug, self._debug)
+ 
+     def is_running(self):
+         """Return whether the event loop is currently running."""
+-- 
+2.34.1
+
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 2/2] package/python-cython: bump to version 3.0.8
  2024-02-09 17:56 [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3 James Hilliard
@ 2024-02-09 17:56 ` James Hilliard
  2024-02-11 21:30   ` Yann E. MORIN
  2024-02-11 21:24 ` [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3 Yann E. MORIN
  1 sibling, 1 reply; 13+ messages in thread
From: James Hilliard @ 2024-02-09 17:56 UTC (permalink / raw)
  To: buildroot; +Cc: Joseph Kogut, Giulio Benetti, James Hilliard, Asaf Kahlon

License hash changed due to changing links from http to https:
https://github.com/cython/cython/commit/331d9d824ee5f0c539310332215ebd6ed3257325

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/python-cython/python-cython.hash | 6 +++---
 package/python-cython/python-cython.mk   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/python-cython/python-cython.hash b/package/python-cython/python-cython.hash
index 08ad8f6d84..55e4a6f203 100644
--- a/package/python-cython/python-cython.hash
+++ b/package/python-cython/python-cython.hash
@@ -1,6 +1,6 @@
 # md5, sha256 from https://pypi.org/pypi/cython/json
-md5  a4d0f9fbc9c137f1a88937cd40e8c5ee  Cython-0.29.36.tar.gz
-sha256  41c0cfd2d754e383c9eeb95effc9aa4ab847d0c9747077ddd7c0dcb68c3bc01f  Cython-0.29.36.tar.gz
+md5  9f7baaa983e1bd06eaeb4fa0adfc77e5  Cython-3.0.8.tar.gz
+sha256  8333423d8fd5765e7cceea3a9985dd1e0a5dfeb2734629e1a2ed2d6233d39de6  Cython-3.0.8.tar.gz
 # Locally computed sha256 checksums
-sha256  a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9  LICENSE.txt
+sha256  9568a2b155e66ac3e0ba1fd80b52b827b9460e6cf6f233125e7cbca8e206ddc3  LICENSE.txt
 sha256  e1eb1c49a8508e8173dac30157e4a6439a44ad8846194746c424fbc3fc2b95d7  COPYING.txt
diff --git a/package/python-cython/python-cython.mk b/package/python-cython/python-cython.mk
index 47e105c065..d76bfb766d 100644
--- a/package/python-cython/python-cython.mk
+++ b/package/python-cython/python-cython.mk
@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-PYTHON_CYTHON_VERSION = 0.29.36
+PYTHON_CYTHON_VERSION = 3.0.8
 PYTHON_CYTHON_SOURCE = Cython-$(PYTHON_CYTHON_VERSION).tar.gz
-PYTHON_CYTHON_SITE = https://files.pythonhosted.org/packages/38/db/df0e99d6c5fe19ee5c981d22aad557be4bdeed3ecfae25d47b84b07f0f98
+PYTHON_CYTHON_SITE = https://files.pythonhosted.org/packages/68/09/ffb61f29b8e3d207c444032b21328327d753e274ea081bc74e009827cc81
 PYTHON_CYTHON_SETUP_TYPE = setuptools
 PYTHON_CYTHON_LICENSE = Apache-2.0
 PYTHON_CYTHON_LICENSE_FILES = COPYING.txt LICENSE.txt
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3
  2024-02-09 17:56 [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3 James Hilliard
  2024-02-09 17:56 ` [Buildroot] [PATCH 2/2] package/python-cython: bump to version 3.0.8 James Hilliard
@ 2024-02-11 21:24 ` Yann E. MORIN
  2024-02-11 21:39   ` James Hilliard
  1 sibling, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2024-02-11 21:24 UTC (permalink / raw)
  To: James Hilliard; +Cc: Joseph Kogut, Giulio Benetti, Asaf Kahlon, buildroot

James, All,

On 2024-02-09 10:56 -0700, James Hilliard spake thusly:
> Add patches from pending upstream pull request which add cython3
> compatibility.

We are a little bit cautious at applying random patches that have not
yet been at least reviewd by upstream. In this case, there has not been
any upstream activity since the last release, and not muc before that
either...

We have no in-tree user of uvloop, so I wonder whether it makes snse to
keep it, espcially since it mau be blocking the bumps of other packages
(like cython 3.x being required by whats-its-name).

Plus, see below...

> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
>  .../0001-Updates-for-Cython3.patch            | 631 ++++++++++++++++++
>  ...ebug-has-args-difference-in-python-3.patch |  30 +
>  .../0003-fix-tests-on-python-3.8.patch        |  31 +
>  .../0004-fix-arg-count-for-wrap.patch         |  52 ++
>  4 files changed, 744 insertions(+)
>  create mode 100644 package/python-uvloop/0001-Updates-for-Cython3.patch
>  create mode 100644 package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch
>  create mode 100644 package/python-uvloop/0003-fix-tests-on-python-3.8.patch
>  create mode 100644 package/python-uvloop/0004-fix-arg-count-for-wrap.patch
> 
> diff --git a/package/python-uvloop/0001-Updates-for-Cython3.patch b/package/python-uvloop/0001-Updates-for-Cython3.patch
> new file mode 100644
> index 0000000000..b7ef1091ac
> --- /dev/null
> +++ b/package/python-uvloop/0001-Updates-for-Cython3.patch
> @@ -0,0 +1,631 @@
> +From 087a2983c8022598232cb7ed0a49da334d7af9ff Mon Sep 17 00:00:00 2001
> +From: Alan Brooks <12380017+alan-brooks@users.noreply.github.com>
> +Date: Thu, 28 Dec 2023 12:18:15 +0000
> +Subject: [PATCH] Updates for Cython3 Remove SSL depreciation warnings buillt
> + on debian 12.6 python-3.22 Cython-3.0.7 libuv-1.46.0
> +
> +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> +[Upstream status:
> +https://github.com/MagicStack/uvloop/pull/587]

    $ ./utils/docker-run make check-package
    package/python-uvloop/0001-Updates-for-Cython3.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation)
    package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation)
    package/python-uvloop/0003-fix-tests-on-python-3.8.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation)
    package/python-uvloop/0004-fix-arg-count-for-wrap.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation)

Runing check-package is really a trivial thing to do locally before
sending patches, and we've been advertising it for long enough now...

Regards,
Yann E. MORIN.

> +---
> + Makefile                         |  2 +-
> + setup.py                         |  6 ++++--
> + tests/test_process.py            |  4 ++--
> + tests/test_tcp.py                | 19 ++++++++++++-------
> + uvloop/_testbase.py              |  4 +++-
> + uvloop/cbhandles.pyx             |  4 ++--
> + uvloop/dns.pyx                   |  4 ++--
> + uvloop/handles/basetransport.pxd |  4 ++--
> + uvloop/handles/basetransport.pyx |  4 ++--
> + uvloop/handles/handle.pyx        |  2 +-
> + uvloop/handles/pipe.pyx          |  2 +-
> + uvloop/handles/poll.pxd          |  2 +-
> + uvloop/handles/poll.pyx          |  2 +-
> + uvloop/handles/stream.pyx        | 16 ++++++++++------
> + uvloop/handles/udp.pyx           |  4 ++--
> + uvloop/includes/consts.pxi       | 25 -------------------------
> + uvloop/includes/fork_handler.h   |  6 +++++-
> + uvloop/includes/system.h         | 16 ++++++++++++++++
> + uvloop/includes/system.pxd       | 12 ++++--------
> + uvloop/includes/uv.pxd           |  6 +++---
> + uvloop/loop.pxd                  | 28 ++++++++++++++++++++++++----
> + uvloop/loop.pyx                  | 10 +++++-----
> + uvloop/sslproto.pxd              |  4 ++--
> + uvloop/sslproto.pyx              |  4 ++--
> + 24 files changed, 107 insertions(+), 83 deletions(-)
> + delete mode 100644 uvloop/includes/consts.pxi
> + create mode 100755 uvloop/includes/system.h
> +
> +diff --git a/Makefile b/Makefile
> +index 4375e5d..6a0475a 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -9,7 +9,7 @@ _default: compile
> + 
> + 
> + clean:
> +-	rm -fr dist/ doc/_build/ *.egg-info uvloop/loop.*.pyd
> ++	rm -fr dist/ doc/_build/ *.egg-info uvloop/loop.*.pyd uvloop/loop_d.*.pyd
> + 	rm -fr uvloop/*.c uvloop/*.html uvloop/*.so
> + 	rm -fr uvloop/handles/*.html uvloop/includes/*.html
> + 	find . -name '__pycache__' | xargs rm -rf
> +diff --git a/setup.py b/setup.py
> +index ba15af5..8fdf0e5 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(>=0.29.36)'
> + MACHINE = platform.machine()
> + MODULES_CFLAGS = [os.getenv('UVLOOP_OPT_CFLAGS', '-O2')]
> + _ROOT = pathlib.Path(__file__).parent
> +@@ -144,7 +144,9 @@ class uvloop_build_ext(build_ext):
> +             self.distribution.ext_modules[:] = cythonize(
> +                 self.distribution.ext_modules,
> +                 compiler_directives=directives,
> +-                annotate=self.cython_annotate)
> ++                annotate=self.cython_annotate,
> ++                compile_time_env=dict(DEFAULT_FREELIST_SIZE=250, SSL_READ_MAX_SIZE=256 * 1024),
> ++                emit_linenums=True)
> + 
> +         super().finalize_options()
> + 
> +diff --git a/tests/test_process.py b/tests/test_process.py
> +index bfcbba1..95e1c9e 100644
> +--- a/tests/test_process.py
> ++++ b/tests/test_process.py
> +@@ -912,7 +912,7 @@ class Test_UV_Process_Delayed(tb.UVTestCase):
> +                 stdin=subprocess.PIPE,
> +                 stdout=subprocess.PIPE,
> +                 stderr=subprocess.PIPE,
> +-                __uvloop_sleep_after_fork=True))
> ++                uvloop_sleep_after_fork=True))
> +         self.assertIsNot(transport, None)
> +         self.assertEqual(transport.get_returncode(), 0)
> +         self.assertEqual(
> +@@ -931,7 +931,7 @@ class Test_UV_Process_Delayed(tb.UVTestCase):
> +                 stdin=None,
> +                 stdout=subprocess.PIPE,
> +                 stderr=subprocess.PIPE,
> +-                __uvloop_sleep_after_fork=True))
> ++                uvloop_sleep_after_fork=True))
> +         self.assertIsNot(transport, None)
> +         self.assertEqual(transport.get_returncode(), 0)
> +         self.assertEqual(
> +diff --git a/tests/test_tcp.py b/tests/test_tcp.py
> +index 812e62b..213e2d9 100644
> +--- a/tests/test_tcp.py
> ++++ b/tests/test_tcp.py
> +@@ -1630,17 +1630,22 @@ class _TestSSL(tb.SSLTestCase):
> +             self.fail("unexpected call to connection_made()")
> + 
> +     def test_ssl_connect_accepted_socket(self):
> +-        if hasattr(ssl, 'PROTOCOL_TLS'):
> +-            proto = ssl.PROTOCOL_TLS
> ++        if hasattr(ssl, 'PROTOCOL_TLS_SERVER'):
> ++            server_proto = ssl.PROTOCOL_TLS_SERVER
> ++            client_proto = ssl.PROTOCOL_TLS_CLIENT
> +         else:
> +-            proto = ssl.PROTOCOL_SSLv23
> +-        server_context = ssl.SSLContext(proto)
> ++            if hasattr(ssl, 'PROTOCOL_TLS'):
> ++                client_proto = server_proto = ssl.PROTOCOL_TLS
> ++            else:
> ++                client_proto = server_proto = ssl.PROTOCOL_SSLv23
> ++
> ++        server_context = ssl.SSLContext(server_proto)
> +         server_context.load_cert_chain(self.ONLYCERT, self.ONLYKEY)
> +         if hasattr(server_context, 'check_hostname'):
> +             server_context.check_hostname = False
> +         server_context.verify_mode = ssl.CERT_NONE
> + 
> +-        client_context = ssl.SSLContext(proto)
> ++        client_context = ssl.SSLContext(client_proto)
> +         if hasattr(server_context, 'check_hostname'):
> +             client_context.check_hostname = False
> +         client_context.verify_mode = ssl.CERT_NONE
> +@@ -2233,7 +2238,7 @@ class _TestSSL(tb.SSLTestCase):
> +         sslctx.use_privatekey_file(self.ONLYKEY)
> +         sslctx.use_certificate_chain_file(self.ONLYCERT)
> +         client_sslctx = self._create_client_ssl_context()
> +-        if hasattr(ssl, 'OP_NO_TLSv1_3'):
> ++        if sys.version_info < (3, 8) and hasattr(ssl, 'OP_NO_TLSv1_3'):
> +             client_sslctx.options |= ssl.OP_NO_TLSv1_3
> + 
> +         def server(sock):
> +@@ -2592,7 +2597,7 @@ class _TestSSL(tb.SSLTestCase):
> +         sslctx_openssl.use_privatekey_file(self.ONLYKEY)
> +         sslctx_openssl.use_certificate_chain_file(self.ONLYCERT)
> +         client_sslctx = self._create_client_ssl_context()
> +-        if hasattr(ssl, 'OP_NO_TLSv1_3'):
> ++        if sys.version_info < (3, 8) and hasattr(ssl, 'OP_NO_TLSv1_3'):
> +             client_sslctx.options |= ssl.OP_NO_TLSv1_3
> + 
> +         future = None
> +diff --git a/uvloop/_testbase.py b/uvloop/_testbase.py
> +index c4a7595..e620e15 100644
> +--- a/uvloop/_testbase.py
> ++++ b/uvloop/_testbase.py
> +@@ -269,7 +269,9 @@ def find_free_port(start_from=50000):
> + class SSLTestCase:
> + 
> +     def _create_server_ssl_context(self, certfile, keyfile=None):
> +-        if hasattr(ssl, 'PROTOCOL_TLS'):
> ++        if hasattr(ssl, 'PROTOCOL_TLS_SERVER'):
> ++            sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
> ++        elif hasattr(ssl, 'PROTOCOL_TLS'):
> +             sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS)
> +         else:
> +             sslcontext = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
> +diff --git a/uvloop/cbhandles.pyx b/uvloop/cbhandles.pyx
> +index 2914b42..8bcc5aa 100644
> +--- a/uvloop/cbhandles.pyx
> ++++ b/uvloop/cbhandles.pyx
> +@@ -76,8 +76,8 @@ cdef class Handle:
> +                     self.arg1, self.arg2, self.arg3, self.arg4)
> + 
> +             else:
> +-                raise RuntimeError('invalid Handle.cb_type: {}'.format(
> +-                    cb_type))
> ++                raise RuntimeError('invalid Handle.cb_type: {} {!r}/{!r}'.format(
> ++                    cb_type, self.args1, self.args2))
> + 
> +         except (KeyboardInterrupt, SystemExit):
> +             raise
> +diff --git a/uvloop/dns.pyx b/uvloop/dns.pyx
> +index 7aad631..09b9282 100644
> +--- a/uvloop/dns.pyx
> ++++ b/uvloop/dns.pyx
> +@@ -298,7 +298,7 @@ cdef class AddrInfo:
> +             uv.uv_freeaddrinfo(self.data)  # returns void
> +             self.data = NULL
> + 
> +-    cdef void set_data(self, system.addrinfo *data):
> ++    cdef void set_data(self, system.addrinfo *data) noexcept:
> +         self.data = data
> + 
> +     cdef unpack(self):
> +@@ -326,7 +326,7 @@ cdef class AddrInfo:
> +         return result
> + 
> +     @staticmethod
> +-    cdef int isinstance(object other):
> ++    cdef int isinstance(object other) noexcept:
> +         return type(other) is AddrInfo
> + 
> + 
> +diff --git a/uvloop/handles/basetransport.pxd b/uvloop/handles/basetransport.pxd
> +index ba356a7..8112622 100644
> +--- a/uvloop/handles/basetransport.pxd
> ++++ b/uvloop/handles/basetransport.pxd
> +@@ -47,8 +47,8 @@ cdef class UVBaseTransport(UVSocketHandle):
> +     # === overloads ===
> + 
> +     cdef _new_socket(self)
> +-    cdef size_t _get_write_buffer_size(self)
> ++    cdef size_t _get_write_buffer_size(self) noexcept
> + 
> +-    cdef bint _is_reading(self)
> ++    cdef bint _is_reading(self) noexcept
> +     cdef _start_reading(self)
> +     cdef _stop_reading(self)
> +diff --git a/uvloop/handles/basetransport.pyx b/uvloop/handles/basetransport.pyx
> +index 28b3079..a8592f2 100644
> +--- a/uvloop/handles/basetransport.pyx
> ++++ b/uvloop/handles/basetransport.pyx
> +@@ -18,7 +18,7 @@ cdef class UVBaseTransport(UVSocketHandle):
> + 
> +         self._closing = 0
> + 
> +-    cdef size_t _get_write_buffer_size(self):
> ++    cdef size_t _get_write_buffer_size(self) noexcept:
> +         return 0
> + 
> +     cdef inline _schedule_call_connection_made(self):
> +@@ -211,7 +211,7 @@ cdef class UVBaseTransport(UVSocketHandle):
> +             self._extra_info = {}
> +         self._extra_info[name] = obj
> + 
> +-    cdef bint _is_reading(self):
> ++    cdef bint _is_reading(self) noexcept:
> +         raise NotImplementedError
> + 
> +     cdef _start_reading(self):
> +diff --git a/uvloop/handles/handle.pyx b/uvloop/handles/handle.pyx
> +index 6efe375..2c96458 100644
> +--- a/uvloop/handles/handle.pyx
> ++++ b/uvloop/handles/handle.pyx
> +@@ -363,7 +363,7 @@ cdef void __uv_close_handle_cb(uv.uv_handle_t* handle) noexcept with gil:
> +             Py_DECREF(h)  # Was INCREFed in UVHandle._close
> + 
> + 
> +-cdef void __close_all_handles(Loop loop):
> ++cdef void __close_all_handles(Loop loop) noexcept:
> +     uv.uv_walk(loop.uvloop,
> +                __uv_walk_close_all_handles_cb,
> +                <void*>loop)  # void
> +diff --git a/uvloop/handles/pipe.pyx b/uvloop/handles/pipe.pyx
> +index 195576c..d30a736 100644
> +--- a/uvloop/handles/pipe.pyx
> ++++ b/uvloop/handles/pipe.pyx
> +@@ -25,7 +25,7 @@ cdef __pipe_init_uv_handle(UVStream handle, Loop loop):
> + cdef __pipe_open(UVStream handle, int fd):
> +     cdef int err
> +     err = uv.uv_pipe_open(<uv.uv_pipe_t *>handle._handle,
> +-                          <uv.uv_file>fd)
> ++                          <uv.uv_os_fd_t>fd)
> +     if err < 0:
> +         exc = convert_error(err)
> +         raise exc
> +diff --git a/uvloop/handles/poll.pxd b/uvloop/handles/poll.pxd
> +index d07030b..c220540 100644
> +--- a/uvloop/handles/poll.pxd
> ++++ b/uvloop/handles/poll.pxd
> +@@ -10,7 +10,7 @@ cdef class UVPoll(UVHandle):
> +     cdef inline _poll_start(self, int flags)
> +     cdef inline _poll_stop(self)
> + 
> +-    cdef int is_active(self)
> ++    cdef int is_active(self) noexcept
> + 
> +     cdef is_reading(self)
> +     cdef is_writing(self)
> +diff --git a/uvloop/handles/poll.pyx b/uvloop/handles/poll.pyx
> +index fca5981..c905e9b 100644
> +--- a/uvloop/handles/poll.pyx
> ++++ b/uvloop/handles/poll.pyx
> +@@ -29,7 +29,7 @@ cdef class UVPoll(UVHandle):
> +         handle._init(loop, fd)
> +         return handle
> + 
> +-    cdef int is_active(self):
> ++    cdef int is_active(self) noexcept:
> +         return (self.reading_handle is not None or
> +                 self.writing_handle is not None)
> + 
> +diff --git a/uvloop/handles/stream.pyx b/uvloop/handles/stream.pyx
> +index d4e02e3..09df887 100644
> +--- a/uvloop/handles/stream.pyx
> ++++ b/uvloop/handles/stream.pyx
> +@@ -1,4 +1,8 @@
> +-DEF __PREALLOCED_BUFS = 4
> ++cdef extern from *:
> ++    '''
> ++    enum {__PREALLOCED_BUFS = 4};
> ++    '''
> ++    const bint __PREALLOCED_BUFS
> + 
> + 
> + @cython.no_gc_clear
> +@@ -279,7 +283,7 @@ cdef class UVStream(UVBaseTransport):
> +     cdef inline _close_on_read_error(self):
> +         self.__read_error_close = 1
> + 
> +-    cdef bint _is_reading(self):
> ++    cdef bint _is_reading(self) noexcept:
> +         return self.__reading
> + 
> +     cdef _start_reading(self):
> +@@ -578,7 +582,7 @@ cdef class UVStream(UVBaseTransport):
> + 
> +         self._maybe_resume_protocol()
> + 
> +-    cdef size_t _get_write_buffer_size(self):
> ++    cdef size_t _get_write_buffer_size(self) noexcept:
> +         if self._handle is NULL:
> +             return 0
> +         return ((<uv.uv_stream_t*>self._handle).write_queue_size +
> +@@ -755,7 +759,7 @@ cdef inline bint __uv_stream_on_read_common(
> +     UVStream sc,
> +     Loop loop,
> +     ssize_t nread,
> +-):
> ++) noexcept:
> +     if sc._closed:
> +         # The stream was closed, there is no reason to
> +         # do any work now.
> +@@ -818,7 +822,7 @@ cdef inline void __uv_stream_on_read_impl(
> +     uv.uv_stream_t* stream,
> +     ssize_t nread,
> +     const uv.uv_buf_t* buf,
> +-):
> ++) noexcept:
> +     cdef:
> +         UVStream sc = <UVStream>stream.data
> +         Loop loop = sc._loop
> +@@ -849,7 +853,7 @@ cdef inline void __uv_stream_on_read_impl(
> + cdef inline void __uv_stream_on_write_impl(
> +     uv.uv_write_t* req,
> +     int status,
> +-):
> ++) noexcept:
> +     cdef:
> +         _StreamWriteContext ctx = <_StreamWriteContext> req.data
> +         UVStream stream = <UVStream>ctx.stream
> +diff --git a/uvloop/handles/udp.pyx b/uvloop/handles/udp.pyx
> +index bbe60d5..fdd1d8b 100644
> +--- a/uvloop/handles/udp.pyx
> ++++ b/uvloop/handles/udp.pyx
> +@@ -127,12 +127,12 @@ cdef class UDPTransport(UVBaseTransport):
> +             exc = convert_error(err)
> +             raise exc
> + 
> +-    cdef size_t _get_write_buffer_size(self):
> ++    cdef size_t _get_write_buffer_size(self) noexcept:
> +         if self._handle is NULL:
> +             return 0
> +         return (<uv.uv_udp_t*>self._handle).send_queue_size
> + 
> +-    cdef bint _is_reading(self):
> ++    cdef bint _is_reading(self) noexcept:
> +         return self.__receiving
> + 
> +     cdef _start_reading(self):
> +diff --git a/uvloop/includes/consts.pxi b/uvloop/includes/consts.pxi
> +deleted file mode 100644
> +index f765053..0000000
> +--- a/uvloop/includes/consts.pxi
> ++++ /dev/null
> +@@ -1,25 +0,0 @@
> +-DEF UV_STREAM_RECV_BUF_SIZE = 256000  # 250kb
> +-
> +-DEF FLOW_CONTROL_HIGH_WATER = 64  # KiB
> +-DEF FLOW_CONTROL_HIGH_WATER_SSL_READ = 256  # KiB
> +-DEF FLOW_CONTROL_HIGH_WATER_SSL_WRITE = 512  # KiB
> +-
> +-DEF DEFAULT_FREELIST_SIZE = 250
> +-DEF DNS_PYADDR_TO_SOCKADDR_CACHE_SIZE = 2048
> +-
> +-DEF DEBUG_STACK_DEPTH = 10
> +-
> +-
> +-DEF __PROCESS_DEBUG_SLEEP_AFTER_FORK = 1
> +-
> +-
> +-DEF LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5
> +-
> +-
> +-# Number of seconds to wait for SSL handshake to complete
> +-# The default timeout matches that of Nginx.
> +-DEF SSL_HANDSHAKE_TIMEOUT = 60.0
> +-# Number of seconds to wait for SSL shutdown to complete
> +-# The default timeout mimics lingering_time
> +-DEF SSL_SHUTDOWN_TIMEOUT = 30.0
> +-DEF SSL_READ_MAX_SIZE = 256 * 1024
> +diff --git a/uvloop/includes/fork_handler.h b/uvloop/includes/fork_handler.h
> +index 47bbe03..9d3573a 100644
> +--- a/uvloop/includes/fork_handler.h
> ++++ b/uvloop/includes/fork_handler.h
> +@@ -1,7 +1,10 @@
> ++#ifndef UVLOOP_FORK_HANDLER_H_
> ++#define UVLOOP_FORK_HANDLER_H_
> ++
> + volatile uint64_t MAIN_THREAD_ID = 0;
> + volatile int8_t MAIN_THREAD_ID_SET = 0;
> + 
> +-typedef void (*OnForkHandler)();
> ++typedef void (*OnForkHandler)(void);
> + 
> + OnForkHandler __forkHandler = NULL;
> + 
> +@@ -36,3 +39,4 @@ void setMainThreadID(uint64_t id) {
> +     MAIN_THREAD_ID = id;
> +     MAIN_THREAD_ID_SET = 1;
> + }
> ++#endif
> +diff --git a/uvloop/includes/system.h b/uvloop/includes/system.h
> +new file mode 100755
> +index 0000000..e143bb5
> +--- /dev/null
> ++++ b/uvloop/includes/system.h
> +@@ -0,0 +1,16 @@
> ++#ifndef UVLOOP_SYSTEM_H_
> ++#define UVLOOP_SYSTEM_H_
> ++#if defined(_WIN32) || defined(MS_WINDOWS) || defined(_MSC_VER)
> ++#include "Winsock2.h"
> ++#include "ws2def.h"
> ++#include "includes/fork_handler.h"
> ++#else
> ++#include "arpa/inet.h"
> ++#include "sys/socket.h"
> ++#include "sys/un.h"
> ++#include "unistd.h"
> ++#include "pthread.h"
> ++#endif
> ++#endif
> ++
> ++
> +diff --git a/uvloop/includes/system.pxd b/uvloop/includes/system.pxd
> +index 367fedd..d1da74e 100644
> +--- a/uvloop/includes/system.pxd
> ++++ b/uvloop/includes/system.pxd
> +@@ -1,13 +1,9 @@
> + from libc.stdint cimport int8_t, uint64_t
> + 
> +-cdef extern from "arpa/inet.h" nogil:
> +-
> +-    int ntohl(int)
> +-    int htonl(int)
> +-    int ntohs(int)
> +-
> +-
> +-cdef extern from "sys/socket.h" nogil:
> ++cdef extern from "includes/system.h":
> ++    int ntohl(int) nogil
> ++    int htonl(int) nogil
> ++    int ntohs(int) nogil
> + 
> +     struct sockaddr:
> +         unsigned short sa_family
> +diff --git a/uvloop/includes/uv.pxd b/uvloop/includes/uv.pxd
> +index 8765130..ddd9738 100644
> +--- a/uvloop/includes/uv.pxd
> ++++ b/uvloop/includes/uv.pxd
> +@@ -220,7 +220,7 @@ cdef extern from "uv.h" nogil:
> +         UV_LEAVE_GROUP = 0,
> +         UV_JOIN_GROUP
> + 
> +-    cpdef enum uv_fs_event:
> ++    cdef enum uv_fs_event:
> +         UV_RENAME = 1,
> +         UV_CHANGE = 2
> + 
> +@@ -282,7 +282,7 @@ cdef extern from "uv.h" nogil:
> +     int uv_loop_close(uv_loop_t* loop)
> +     int uv_loop_alive(uv_loop_t* loop)
> +     int uv_loop_fork(uv_loop_t* loop)
> +-    int uv_backend_fd(uv_loop_t* loop)
> ++    uv_os_fd_t uv_backend_fd(uv_loop_t* loop)
> + 
> +     void uv_update_time(uv_loop_t* loop)
> +     uint64_t uv_now(const uv_loop_t*)
> +@@ -378,7 +378,7 @@ cdef extern from "uv.h" nogil:
> +     # Pipes
> + 
> +     int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc)
> +-    int uv_pipe_open(uv_pipe_t* handle, uv_file file)
> ++    int uv_pipe_open(uv_pipe_t* handle, uv_os_fd_t file)
> +     int uv_pipe_bind(uv_pipe_t* handle, const char* name)
> + 
> +     void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle,
> +diff --git a/uvloop/loop.pxd b/uvloop/loop.pxd
> +index 5613473..f90c704 100644
> +--- a/uvloop/loop.pxd
> ++++ b/uvloop/loop.pxd
> +@@ -1,15 +1,35 @@
> + # cython: language_level=3
> + 
> ++cdef extern from *:
> ++    '''
> ++    enum { UV_STREAM_RECV_BUF_SIZE = 256000,
> ++           SSL_READ_MAX_SIZE = 256 * 1024,  // 250kb
> ++          };
> ++    const float SSL_HANDSHAKE_TIMEOUT = 60.0; // Number of seconds to wait for SSL handshake to complete The default timeout matches that of Nginx.
> ++    const float SSL_SHUTDOWN_TIMEOUT  = 30.0; // Number of seconds to wait for SSL shutdown to complete The default timeout mimics lingering_time
> ++    '''
> ++    const bint UV_STREAM_RECV_BUF_SIZE
> ++    const bint SSL_READ_MAX_SIZE
> ++
> ++    const float SSL_HANDSHAKE_TIMEOUT
> ++    const float SSL_SHUTDOWN_TIMEOUT
> ++
> ++cdef enum:
> ++    FLOW_CONTROL_HIGH_WATER = 64  # KiB
> ++    FLOW_CONTROL_HIGH_WATER_SSL_READ = 256  # KiB
> ++    FLOW_CONTROL_HIGH_WATER_SSL_WRITE = 512  # KiB
> ++
> ++    DNS_PYADDR_TO_SOCKADDR_CACHE_SIZE = 2048
> ++    DEBUG_STACK_DEPTH = 10
> ++    __PROCESS_DEBUG_SLEEP_AFTER_FORK = 1
> ++    LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5
> ++
> + 
> + from .includes cimport uv
> + from .includes cimport system
> + 
> + from libc.stdint cimport uint64_t, uint32_t, int64_t
> + 
> +-
> +-include "includes/consts.pxi"
> +-
> +-
> + cdef extern from *:
> +     ctypedef int vint "volatile int"
> + 
> +diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
> +index 334d8d5..53e1160 100644
> +--- a/uvloop/loop.pyx
> ++++ b/uvloop/loop.pyx
> +@@ -43,7 +43,7 @@ from cpython.pycapsule cimport PyCapsule_New, PyCapsule_GetPointer
> + from . import _noop
> + 
> + 
> +-include "includes/consts.pxi"
> ++
> + include "includes/stdlib.pxi"
> + 
> + include "errors.pyx"
> +@@ -1118,7 +1118,7 @@ cdef class Loop:
> + 
> +     cdef _sock_set_reuseport(self, int fd):
> +         cdef:
> +-            int err
> ++            int err = 0
> +             int reuseport_flag = 1
> + 
> +         err = system.setsockopt(
> +@@ -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."""
> +@@ -2750,7 +2750,7 @@ cdef class Loop:
> +                                executable=None,
> +                                pass_fds=(),
> +                                # For tests only! Do not use in your code. Ever.
> +-                               __uvloop_sleep_after_fork=False):
> ++                               uvloop_sleep_after_fork=False):
> + 
> +         # TODO: Implement close_fds (might not be very important in
> +         # Python 3.5, since all FDs aren't inheritable by default.)
> +@@ -2770,7 +2770,7 @@ cdef class Loop:
> +         if executable is not None:
> +             args[0] = executable
> + 
> +-        if __uvloop_sleep_after_fork:
> ++        if uvloop_sleep_after_fork:
> +             debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK
> + 
> +         waiter = self._new_future()
> +diff --git a/uvloop/sslproto.pxd b/uvloop/sslproto.pxd
> +index 3da10f0..68e4d57 100644
> +--- a/uvloop/sslproto.pxd
> ++++ b/uvloop/sslproto.pxd
> +@@ -122,7 +122,7 @@ cdef class SSLProtocol:
> +     # Flow control for writes from APP socket
> + 
> +     cdef _control_app_writing(self, object context=*)
> +-    cdef size_t _get_write_buffer_size(self)
> ++    cdef size_t _get_write_buffer_size(self) noexcept
> +     cdef _set_write_buffer_limits(self, high=*, low=*)
> + 
> +     # Flow control for reads to APP socket
> +@@ -134,5 +134,5 @@ cdef class SSLProtocol:
> + 
> +     cdef _control_ssl_reading(self)
> +     cdef _set_read_buffer_limits(self, high=*, low=*)
> +-    cdef size_t _get_read_buffer_size(self)
> ++    cdef size_t _get_read_buffer_size(self) noexcept
> +     cdef _fatal_error(self, exc, message=*)
> +diff --git a/uvloop/sslproto.pyx b/uvloop/sslproto.pyx
> +index 42bb764..0a43746 100644
> +--- a/uvloop/sslproto.pyx
> ++++ b/uvloop/sslproto.pyx
> +@@ -861,7 +861,7 @@ cdef class SSLProtocol:
> +                     'protocol': self,
> +                 })
> + 
> +-    cdef size_t _get_write_buffer_size(self):
> ++    cdef size_t _get_write_buffer_size(self) noexcept:
> +         return self._outgoing.pending + self._write_buffer_size
> + 
> +     cdef _set_write_buffer_limits(self, high=None, low=None):
> +@@ -903,7 +903,7 @@ cdef class SSLProtocol:
> +         self._incoming_high_water = high
> +         self._incoming_low_water = low
> + 
> +-    cdef size_t _get_read_buffer_size(self):
> ++    cdef size_t _get_read_buffer_size(self) noexcept:
> +         return self._incoming.pending
> + 
> +     # Flow control for writes to SSL socket
> +-- 
> +2.34.1
> +
> diff --git a/package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch b/package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch
> new file mode 100644
> index 0000000000..ac6170aff3
> --- /dev/null
> +++ b/package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch
> @@ -0,0 +1,30 @@
> +From 8b63801bfdb1f0cf7fde4f58e96f8628a587b186 Mon Sep 17 00:00:00 2001
> +From: Alan Brooks <12380017+alan-brooks@users.noreply.github.com>
> +Date: Thu, 28 Dec 2023 16:17:49 +0000
> +Subject: [PATCH] _set_coroutine_debug has args difference in python 3.11
> +
> +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> +[Upstream status:
> +https://github.com/MagicStack/uvloop/pull/587]
> +---
> + uvloop/loop.pyx | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
> +index 53e1160..5ca718e 100644
> +--- a/uvloop/loop.pyx
> ++++ b/uvloop/loop.pyx
> +@@ -1396,8 +1396,9 @@ cdef class Loop:
> +     def set_debug(self, enabled):
> +         self._debug = bool(enabled)
> +         if self.is_running():
> ++            args = (self, self._debug) if sys.version_info < (3, 11) else (self._debug,)
> +             self.call_soon_threadsafe(
> +-                self._set_coroutine_debug, self._debug)
> ++                self._set_coroutine_debug, *args)
> + 
> +     def is_running(self):
> +         """Return whether the event loop is currently running."""
> +-- 
> +2.34.1
> +
> diff --git a/package/python-uvloop/0003-fix-tests-on-python-3.8.patch b/package/python-uvloop/0003-fix-tests-on-python-3.8.patch
> new file mode 100644
> index 0000000000..42f04f2241
> --- /dev/null
> +++ b/package/python-uvloop/0003-fix-tests-on-python-3.8.patch
> @@ -0,0 +1,31 @@
> +From ef5c3e5c6f331692ebcbea9e4c6aead8b2187038 Mon Sep 17 00:00:00 2001
> +From: alan-brooks <12380017+alan-brooks@users.noreply.github.com>
> +Date: Thu, 28 Dec 2023 19:58:11 +0000
> +Subject: [PATCH] fix tests on python 3.8
> +
> +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> +[Upstream status:
> +https://github.com/MagicStack/uvloop/pull/587]
> +---
> + uvloop/loop.pyx | 5 ++---
> + 1 file changed, 2 insertions(+), 3 deletions(-)
> +
> +diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
> +index 5ca718e..75b915a 100644
> +--- a/uvloop/loop.pyx
> ++++ b/uvloop/loop.pyx
> +@@ -1396,9 +1396,8 @@ cdef class Loop:
> +     def set_debug(self, enabled):
> +         self._debug = bool(enabled)
> +         if self.is_running():
> +-            args = (self, self._debug) if sys.version_info < (3, 11) else (self._debug,)
> +-            self.call_soon_threadsafe(
> +-                self._set_coroutine_debug, *args)
> ++            args = ((self, self._debug),) if sys.version_info < (3, 11) else (self._debug,)
> ++            self.call_soon_threadsafe(self._set_coroutine_debug, *args)
> + 
> +     def is_running(self):
> +         """Return whether the event loop is currently running."""
> +-- 
> +2.34.1
> +
> diff --git a/package/python-uvloop/0004-fix-arg-count-for-wrap.patch b/package/python-uvloop/0004-fix-arg-count-for-wrap.patch
> new file mode 100644
> index 0000000000..fe082f4f90
> --- /dev/null
> +++ b/package/python-uvloop/0004-fix-arg-count-for-wrap.patch
> @@ -0,0 +1,52 @@
> +From afef6364c2c3100ab23c2bb2de82d2da330b258c Mon Sep 17 00:00:00 2001
> +From: alan-brooks <12380017+alan-brooks@users.noreply.github.com>
> +Date: Fri, 29 Dec 2023 11:24:19 +0000
> +Subject: [PATCH] fix arg count for wrap()
> +
> +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> +[Upstream status:
> +https://github.com/MagicStack/uvloop/pull/587]
> +---
> + uvloop/loop.pxd | 2 +-
> + uvloop/loop.pyx | 5 ++---
> + 2 files changed, 3 insertions(+), 4 deletions(-)
> +
> +diff --git a/uvloop/loop.pxd b/uvloop/loop.pxd
> +index f90c704..d34ffeb 100644
> +--- a/uvloop/loop.pxd
> ++++ b/uvloop/loop.pxd
> +@@ -220,7 +220,7 @@ cdef class Loop:
> +     cdef inline _ceval_process_signals(self)
> +     cdef _invoke_signals(self, bytes data)
> + 
> +-    cdef _set_coroutine_debug(self, bint enabled)
> ++    cpdef _set_coroutine_debug(self, bint enabled)
> + 
> +     cdef _print_debug_info(self)
> + 
> +diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
> +index 75b915a..a3eeb60 100644
> +--- a/uvloop/loop.pyx
> ++++ b/uvloop/loop.pyx
> +@@ -1131,7 +1131,7 @@ cdef class Loop:
> +         if err < 0:
> +             raise convert_error(-errno.errno)
> + 
> +-    cdef _set_coroutine_debug(self, bint enabled):
> ++    cpdef _set_coroutine_debug(self, bint enabled):
> +         enabled = bool(enabled)
> +         if self._coroutine_debug_set == enabled:
> +             return
> +@@ -1396,8 +1396,7 @@ cdef class Loop:
> +     def set_debug(self, enabled):
> +         self._debug = bool(enabled)
> +         if self.is_running():
> +-            args = ((self, self._debug),) if sys.version_info < (3, 11) else (self._debug,)
> +-            self.call_soon_threadsafe(self._set_coroutine_debug, *args)
> ++             self.call_soon_threadsafe(self._set_coroutine_debug, self._debug)
> + 
> +     def is_running(self):
> +         """Return whether the event loop is currently running."""
> +-- 
> +2.34.1
> +
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 2/2] package/python-cython: bump to version 3.0.8
  2024-02-09 17:56 ` [Buildroot] [PATCH 2/2] package/python-cython: bump to version 3.0.8 James Hilliard
@ 2024-02-11 21:30   ` Yann E. MORIN
  2024-02-12  0:46     ` James Hilliard
  0 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2024-02-11 21:30 UTC (permalink / raw)
  To: James Hilliard; +Cc: Joseph Kogut, Giulio Benetti, Asaf Kahlon, buildroot

James, All,

On 2024-02-09 10:56 -0700, James Hilliard spake thusly:
> License hash changed due to changing links from http to https:
> https://github.com/cython/cython/commit/331d9d824ee5f0c539310332215ebd6ed3257325

Thanks for the simple and sufficient explanation. 👍

> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
[--SNIP--]
> diff --git a/package/python-cython/python-cython.mk b/package/python-cython/python-cython.mk
> index 47e105c065..d76bfb766d 100644
> --- a/package/python-cython/python-cython.mk
> +++ b/package/python-cython/python-cython.mk
> @@ -4,9 +4,9 @@
>  #
>  ################################################################################
>  
> -PYTHON_CYTHON_VERSION = 0.29.36
> +PYTHON_CYTHON_VERSION = 3.0.8

Given there was an earlier discussion about how the cython bump was
causing some issues with various packages, I would have expected at
least a post-commit summarising what tests were done to ensure the bump
was OK.

Also, as those same discussions hinted at, cython 0.29 seems to still be
in active development (or at least active maintenance), so the commit
log should have also explained why it was decided to go with a full bump
to 3.0.x rather than intriducing a cython3 package and installing both
in parallel. Or that it was not possiblr to do so becaus they can't be
installed in parallel.

Could you respin this series, fixing the check-package issues in patch
1, and extending the commit log pqtch 2 to better assess the situation,
please?

Regards,
Yann E. MORIN.

>  PYTHON_CYTHON_SOURCE = Cython-$(PYTHON_CYTHON_VERSION).tar.gz
> -PYTHON_CYTHON_SITE = https://files.pythonhosted.org/packages/38/db/df0e99d6c5fe19ee5c981d22aad557be4bdeed3ecfae25d47b84b07f0f98
> +PYTHON_CYTHON_SITE = https://files.pythonhosted.org/packages/68/09/ffb61f29b8e3d207c444032b21328327d753e274ea081bc74e009827cc81
>  PYTHON_CYTHON_SETUP_TYPE = setuptools
>  PYTHON_CYTHON_LICENSE = Apache-2.0
>  PYTHON_CYTHON_LICENSE_FILES = COPYING.txt LICENSE.txt
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3
  2024-02-11 21:24 ` [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3 Yann E. MORIN
@ 2024-02-11 21:39   ` James Hilliard
  2024-02-11 21:57     ` Yann E. MORIN
  0 siblings, 1 reply; 13+ messages in thread
From: James Hilliard @ 2024-02-11 21:39 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Joseph Kogut, Giulio Benetti, Asaf Kahlon, buildroot

On Sun, Feb 11, 2024 at 2:24 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> James, All,
>
> On 2024-02-09 10:56 -0700, James Hilliard spake thusly:
> > Add patches from pending upstream pull request which add cython3
> > compatibility.
>
> We are a little bit cautious at applying random patches that have not
> yet been at least reviewd by upstream. In this case, there has not been
> any upstream activity since the last release, and not muc before that
> either...

Well these patches are being used by gentoo so they are not entirely
untested in the real world.

>
> We have no in-tree user of uvloop, so I wonder whether it makes snse to
> keep it, espcially since it mau be blocking the bumps of other packages
> (like cython 3.x being required by whats-its-name).

That's not entirely true, it's a common optional dependency for packages
like python-uvicorn for example.

>
> Plus, see below...
>
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > ---
> >  .../0001-Updates-for-Cython3.patch            | 631 ++++++++++++++++++
> >  ...ebug-has-args-difference-in-python-3.patch |  30 +
> >  .../0003-fix-tests-on-python-3.8.patch        |  31 +
> >  .../0004-fix-arg-count-for-wrap.patch         |  52 ++
> >  4 files changed, 744 insertions(+)
> >  create mode 100644 package/python-uvloop/0001-Updates-for-Cython3.patch
> >  create mode 100644 package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch
> >  create mode 100644 package/python-uvloop/0003-fix-tests-on-python-3.8.patch
> >  create mode 100644 package/python-uvloop/0004-fix-arg-count-for-wrap.patch
> >
> > diff --git a/package/python-uvloop/0001-Updates-for-Cython3.patch b/package/python-uvloop/0001-Updates-for-Cython3.patch
> > new file mode 100644
> > index 0000000000..b7ef1091ac
> > --- /dev/null
> > +++ b/package/python-uvloop/0001-Updates-for-Cython3.patch
> > @@ -0,0 +1,631 @@
> > +From 087a2983c8022598232cb7ed0a49da334d7af9ff Mon Sep 17 00:00:00 2001
> > +From: Alan Brooks <12380017+alan-brooks@users.noreply.github.com>
> > +Date: Thu, 28 Dec 2023 12:18:15 +0000
> > +Subject: [PATCH] Updates for Cython3 Remove SSL depreciation warnings buillt
> > + on debian 12.6 python-3.22 Cython-3.0.7 libuv-1.46.0
> > +
> > +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > +[Upstream status:
> > +https://github.com/MagicStack/uvloop/pull/587]
>
>     $ ./utils/docker-run make check-package
>     package/python-uvloop/0001-Updates-for-Cython3.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation)
>     package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation)
>     package/python-uvloop/0003-fix-tests-on-python-3.8.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation)
>     package/python-uvloop/0004-fix-arg-count-for-wrap.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation)
>
> Runing check-package is really a trivial thing to do locally before
> sending patches, and we've been advertising it for long enough now...

Oh, must have forgotten to do that, I usually do run that for anything that's
not a version bump.

I'll fix and resend.

>
> Regards,
> Yann E. MORIN.
>
> > +---
> > + Makefile                         |  2 +-
> > + setup.py                         |  6 ++++--
> > + tests/test_process.py            |  4 ++--
> > + tests/test_tcp.py                | 19 ++++++++++++-------
> > + uvloop/_testbase.py              |  4 +++-
> > + uvloop/cbhandles.pyx             |  4 ++--
> > + uvloop/dns.pyx                   |  4 ++--
> > + uvloop/handles/basetransport.pxd |  4 ++--
> > + uvloop/handles/basetransport.pyx |  4 ++--
> > + uvloop/handles/handle.pyx        |  2 +-
> > + uvloop/handles/pipe.pyx          |  2 +-
> > + uvloop/handles/poll.pxd          |  2 +-
> > + uvloop/handles/poll.pyx          |  2 +-
> > + uvloop/handles/stream.pyx        | 16 ++++++++++------
> > + uvloop/handles/udp.pyx           |  4 ++--
> > + uvloop/includes/consts.pxi       | 25 -------------------------
> > + uvloop/includes/fork_handler.h   |  6 +++++-
> > + uvloop/includes/system.h         | 16 ++++++++++++++++
> > + uvloop/includes/system.pxd       | 12 ++++--------
> > + uvloop/includes/uv.pxd           |  6 +++---
> > + uvloop/loop.pxd                  | 28 ++++++++++++++++++++++++----
> > + uvloop/loop.pyx                  | 10 +++++-----
> > + uvloop/sslproto.pxd              |  4 ++--
> > + uvloop/sslproto.pyx              |  4 ++--
> > + 24 files changed, 107 insertions(+), 83 deletions(-)
> > + delete mode 100644 uvloop/includes/consts.pxi
> > + create mode 100755 uvloop/includes/system.h
> > +
> > +diff --git a/Makefile b/Makefile
> > +index 4375e5d..6a0475a 100644
> > +--- a/Makefile
> > ++++ b/Makefile
> > +@@ -9,7 +9,7 @@ _default: compile
> > +
> > +
> > + clean:
> > +-    rm -fr dist/ doc/_build/ *.egg-info uvloop/loop.*.pyd
> > ++    rm -fr dist/ doc/_build/ *.egg-info uvloop/loop.*.pyd uvloop/loop_d.*.pyd
> > +     rm -fr uvloop/*.c uvloop/*.html uvloop/*.so
> > +     rm -fr uvloop/handles/*.html uvloop/includes/*.html
> > +     find . -name '__pycache__' | xargs rm -rf
> > +diff --git a/setup.py b/setup.py
> > +index ba15af5..8fdf0e5 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(>=0.29.36)'
> > + MACHINE = platform.machine()
> > + MODULES_CFLAGS = [os.getenv('UVLOOP_OPT_CFLAGS', '-O2')]
> > + _ROOT = pathlib.Path(__file__).parent
> > +@@ -144,7 +144,9 @@ class uvloop_build_ext(build_ext):
> > +             self.distribution.ext_modules[:] = cythonize(
> > +                 self.distribution.ext_modules,
> > +                 compiler_directives=directives,
> > +-                annotate=self.cython_annotate)
> > ++                annotate=self.cython_annotate,
> > ++                compile_time_env=dict(DEFAULT_FREELIST_SIZE=250, SSL_READ_MAX_SIZE=256 * 1024),
> > ++                emit_linenums=True)
> > +
> > +         super().finalize_options()
> > +
> > +diff --git a/tests/test_process.py b/tests/test_process.py
> > +index bfcbba1..95e1c9e 100644
> > +--- a/tests/test_process.py
> > ++++ b/tests/test_process.py
> > +@@ -912,7 +912,7 @@ class Test_UV_Process_Delayed(tb.UVTestCase):
> > +                 stdin=subprocess.PIPE,
> > +                 stdout=subprocess.PIPE,
> > +                 stderr=subprocess.PIPE,
> > +-                __uvloop_sleep_after_fork=True))
> > ++                uvloop_sleep_after_fork=True))
> > +         self.assertIsNot(transport, None)
> > +         self.assertEqual(transport.get_returncode(), 0)
> > +         self.assertEqual(
> > +@@ -931,7 +931,7 @@ class Test_UV_Process_Delayed(tb.UVTestCase):
> > +                 stdin=None,
> > +                 stdout=subprocess.PIPE,
> > +                 stderr=subprocess.PIPE,
> > +-                __uvloop_sleep_after_fork=True))
> > ++                uvloop_sleep_after_fork=True))
> > +         self.assertIsNot(transport, None)
> > +         self.assertEqual(transport.get_returncode(), 0)
> > +         self.assertEqual(
> > +diff --git a/tests/test_tcp.py b/tests/test_tcp.py
> > +index 812e62b..213e2d9 100644
> > +--- a/tests/test_tcp.py
> > ++++ b/tests/test_tcp.py
> > +@@ -1630,17 +1630,22 @@ class _TestSSL(tb.SSLTestCase):
> > +             self.fail("unexpected call to connection_made()")
> > +
> > +     def test_ssl_connect_accepted_socket(self):
> > +-        if hasattr(ssl, 'PROTOCOL_TLS'):
> > +-            proto = ssl.PROTOCOL_TLS
> > ++        if hasattr(ssl, 'PROTOCOL_TLS_SERVER'):
> > ++            server_proto = ssl.PROTOCOL_TLS_SERVER
> > ++            client_proto = ssl.PROTOCOL_TLS_CLIENT
> > +         else:
> > +-            proto = ssl.PROTOCOL_SSLv23
> > +-        server_context = ssl.SSLContext(proto)
> > ++            if hasattr(ssl, 'PROTOCOL_TLS'):
> > ++                client_proto = server_proto = ssl.PROTOCOL_TLS
> > ++            else:
> > ++                client_proto = server_proto = ssl.PROTOCOL_SSLv23
> > ++
> > ++        server_context = ssl.SSLContext(server_proto)
> > +         server_context.load_cert_chain(self.ONLYCERT, self.ONLYKEY)
> > +         if hasattr(server_context, 'check_hostname'):
> > +             server_context.check_hostname = False
> > +         server_context.verify_mode = ssl.CERT_NONE
> > +
> > +-        client_context = ssl.SSLContext(proto)
> > ++        client_context = ssl.SSLContext(client_proto)
> > +         if hasattr(server_context, 'check_hostname'):
> > +             client_context.check_hostname = False
> > +         client_context.verify_mode = ssl.CERT_NONE
> > +@@ -2233,7 +2238,7 @@ class _TestSSL(tb.SSLTestCase):
> > +         sslctx.use_privatekey_file(self.ONLYKEY)
> > +         sslctx.use_certificate_chain_file(self.ONLYCERT)
> > +         client_sslctx = self._create_client_ssl_context()
> > +-        if hasattr(ssl, 'OP_NO_TLSv1_3'):
> > ++        if sys.version_info < (3, 8) and hasattr(ssl, 'OP_NO_TLSv1_3'):
> > +             client_sslctx.options |= ssl.OP_NO_TLSv1_3
> > +
> > +         def server(sock):
> > +@@ -2592,7 +2597,7 @@ class _TestSSL(tb.SSLTestCase):
> > +         sslctx_openssl.use_privatekey_file(self.ONLYKEY)
> > +         sslctx_openssl.use_certificate_chain_file(self.ONLYCERT)
> > +         client_sslctx = self._create_client_ssl_context()
> > +-        if hasattr(ssl, 'OP_NO_TLSv1_3'):
> > ++        if sys.version_info < (3, 8) and hasattr(ssl, 'OP_NO_TLSv1_3'):
> > +             client_sslctx.options |= ssl.OP_NO_TLSv1_3
> > +
> > +         future = None
> > +diff --git a/uvloop/_testbase.py b/uvloop/_testbase.py
> > +index c4a7595..e620e15 100644
> > +--- a/uvloop/_testbase.py
> > ++++ b/uvloop/_testbase.py
> > +@@ -269,7 +269,9 @@ def find_free_port(start_from=50000):
> > + class SSLTestCase:
> > +
> > +     def _create_server_ssl_context(self, certfile, keyfile=None):
> > +-        if hasattr(ssl, 'PROTOCOL_TLS'):
> > ++        if hasattr(ssl, 'PROTOCOL_TLS_SERVER'):
> > ++            sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
> > ++        elif hasattr(ssl, 'PROTOCOL_TLS'):
> > +             sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS)
> > +         else:
> > +             sslcontext = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
> > +diff --git a/uvloop/cbhandles.pyx b/uvloop/cbhandles.pyx
> > +index 2914b42..8bcc5aa 100644
> > +--- a/uvloop/cbhandles.pyx
> > ++++ b/uvloop/cbhandles.pyx
> > +@@ -76,8 +76,8 @@ cdef class Handle:
> > +                     self.arg1, self.arg2, self.arg3, self.arg4)
> > +
> > +             else:
> > +-                raise RuntimeError('invalid Handle.cb_type: {}'.format(
> > +-                    cb_type))
> > ++                raise RuntimeError('invalid Handle.cb_type: {} {!r}/{!r}'.format(
> > ++                    cb_type, self.args1, self.args2))
> > +
> > +         except (KeyboardInterrupt, SystemExit):
> > +             raise
> > +diff --git a/uvloop/dns.pyx b/uvloop/dns.pyx
> > +index 7aad631..09b9282 100644
> > +--- a/uvloop/dns.pyx
> > ++++ b/uvloop/dns.pyx
> > +@@ -298,7 +298,7 @@ cdef class AddrInfo:
> > +             uv.uv_freeaddrinfo(self.data)  # returns void
> > +             self.data = NULL
> > +
> > +-    cdef void set_data(self, system.addrinfo *data):
> > ++    cdef void set_data(self, system.addrinfo *data) noexcept:
> > +         self.data = data
> > +
> > +     cdef unpack(self):
> > +@@ -326,7 +326,7 @@ cdef class AddrInfo:
> > +         return result
> > +
> > +     @staticmethod
> > +-    cdef int isinstance(object other):
> > ++    cdef int isinstance(object other) noexcept:
> > +         return type(other) is AddrInfo
> > +
> > +
> > +diff --git a/uvloop/handles/basetransport.pxd b/uvloop/handles/basetransport.pxd
> > +index ba356a7..8112622 100644
> > +--- a/uvloop/handles/basetransport.pxd
> > ++++ b/uvloop/handles/basetransport.pxd
> > +@@ -47,8 +47,8 @@ cdef class UVBaseTransport(UVSocketHandle):
> > +     # === overloads ===
> > +
> > +     cdef _new_socket(self)
> > +-    cdef size_t _get_write_buffer_size(self)
> > ++    cdef size_t _get_write_buffer_size(self) noexcept
> > +
> > +-    cdef bint _is_reading(self)
> > ++    cdef bint _is_reading(self) noexcept
> > +     cdef _start_reading(self)
> > +     cdef _stop_reading(self)
> > +diff --git a/uvloop/handles/basetransport.pyx b/uvloop/handles/basetransport.pyx
> > +index 28b3079..a8592f2 100644
> > +--- a/uvloop/handles/basetransport.pyx
> > ++++ b/uvloop/handles/basetransport.pyx
> > +@@ -18,7 +18,7 @@ cdef class UVBaseTransport(UVSocketHandle):
> > +
> > +         self._closing = 0
> > +
> > +-    cdef size_t _get_write_buffer_size(self):
> > ++    cdef size_t _get_write_buffer_size(self) noexcept:
> > +         return 0
> > +
> > +     cdef inline _schedule_call_connection_made(self):
> > +@@ -211,7 +211,7 @@ cdef class UVBaseTransport(UVSocketHandle):
> > +             self._extra_info = {}
> > +         self._extra_info[name] = obj
> > +
> > +-    cdef bint _is_reading(self):
> > ++    cdef bint _is_reading(self) noexcept:
> > +         raise NotImplementedError
> > +
> > +     cdef _start_reading(self):
> > +diff --git a/uvloop/handles/handle.pyx b/uvloop/handles/handle.pyx
> > +index 6efe375..2c96458 100644
> > +--- a/uvloop/handles/handle.pyx
> > ++++ b/uvloop/handles/handle.pyx
> > +@@ -363,7 +363,7 @@ cdef void __uv_close_handle_cb(uv.uv_handle_t* handle) noexcept with gil:
> > +             Py_DECREF(h)  # Was INCREFed in UVHandle._close
> > +
> > +
> > +-cdef void __close_all_handles(Loop loop):
> > ++cdef void __close_all_handles(Loop loop) noexcept:
> > +     uv.uv_walk(loop.uvloop,
> > +                __uv_walk_close_all_handles_cb,
> > +                <void*>loop)  # void
> > +diff --git a/uvloop/handles/pipe.pyx b/uvloop/handles/pipe.pyx
> > +index 195576c..d30a736 100644
> > +--- a/uvloop/handles/pipe.pyx
> > ++++ b/uvloop/handles/pipe.pyx
> > +@@ -25,7 +25,7 @@ cdef __pipe_init_uv_handle(UVStream handle, Loop loop):
> > + cdef __pipe_open(UVStream handle, int fd):
> > +     cdef int err
> > +     err = uv.uv_pipe_open(<uv.uv_pipe_t *>handle._handle,
> > +-                          <uv.uv_file>fd)
> > ++                          <uv.uv_os_fd_t>fd)
> > +     if err < 0:
> > +         exc = convert_error(err)
> > +         raise exc
> > +diff --git a/uvloop/handles/poll.pxd b/uvloop/handles/poll.pxd
> > +index d07030b..c220540 100644
> > +--- a/uvloop/handles/poll.pxd
> > ++++ b/uvloop/handles/poll.pxd
> > +@@ -10,7 +10,7 @@ cdef class UVPoll(UVHandle):
> > +     cdef inline _poll_start(self, int flags)
> > +     cdef inline _poll_stop(self)
> > +
> > +-    cdef int is_active(self)
> > ++    cdef int is_active(self) noexcept
> > +
> > +     cdef is_reading(self)
> > +     cdef is_writing(self)
> > +diff --git a/uvloop/handles/poll.pyx b/uvloop/handles/poll.pyx
> > +index fca5981..c905e9b 100644
> > +--- a/uvloop/handles/poll.pyx
> > ++++ b/uvloop/handles/poll.pyx
> > +@@ -29,7 +29,7 @@ cdef class UVPoll(UVHandle):
> > +         handle._init(loop, fd)
> > +         return handle
> > +
> > +-    cdef int is_active(self):
> > ++    cdef int is_active(self) noexcept:
> > +         return (self.reading_handle is not None or
> > +                 self.writing_handle is not None)
> > +
> > +diff --git a/uvloop/handles/stream.pyx b/uvloop/handles/stream.pyx
> > +index d4e02e3..09df887 100644
> > +--- a/uvloop/handles/stream.pyx
> > ++++ b/uvloop/handles/stream.pyx
> > +@@ -1,4 +1,8 @@
> > +-DEF __PREALLOCED_BUFS = 4
> > ++cdef extern from *:
> > ++    '''
> > ++    enum {__PREALLOCED_BUFS = 4};
> > ++    '''
> > ++    const bint __PREALLOCED_BUFS
> > +
> > +
> > + @cython.no_gc_clear
> > +@@ -279,7 +283,7 @@ cdef class UVStream(UVBaseTransport):
> > +     cdef inline _close_on_read_error(self):
> > +         self.__read_error_close = 1
> > +
> > +-    cdef bint _is_reading(self):
> > ++    cdef bint _is_reading(self) noexcept:
> > +         return self.__reading
> > +
> > +     cdef _start_reading(self):
> > +@@ -578,7 +582,7 @@ cdef class UVStream(UVBaseTransport):
> > +
> > +         self._maybe_resume_protocol()
> > +
> > +-    cdef size_t _get_write_buffer_size(self):
> > ++    cdef size_t _get_write_buffer_size(self) noexcept:
> > +         if self._handle is NULL:
> > +             return 0
> > +         return ((<uv.uv_stream_t*>self._handle).write_queue_size +
> > +@@ -755,7 +759,7 @@ cdef inline bint __uv_stream_on_read_common(
> > +     UVStream sc,
> > +     Loop loop,
> > +     ssize_t nread,
> > +-):
> > ++) noexcept:
> > +     if sc._closed:
> > +         # The stream was closed, there is no reason to
> > +         # do any work now.
> > +@@ -818,7 +822,7 @@ cdef inline void __uv_stream_on_read_impl(
> > +     uv.uv_stream_t* stream,
> > +     ssize_t nread,
> > +     const uv.uv_buf_t* buf,
> > +-):
> > ++) noexcept:
> > +     cdef:
> > +         UVStream sc = <UVStream>stream.data
> > +         Loop loop = sc._loop
> > +@@ -849,7 +853,7 @@ cdef inline void __uv_stream_on_read_impl(
> > + cdef inline void __uv_stream_on_write_impl(
> > +     uv.uv_write_t* req,
> > +     int status,
> > +-):
> > ++) noexcept:
> > +     cdef:
> > +         _StreamWriteContext ctx = <_StreamWriteContext> req.data
> > +         UVStream stream = <UVStream>ctx.stream
> > +diff --git a/uvloop/handles/udp.pyx b/uvloop/handles/udp.pyx
> > +index bbe60d5..fdd1d8b 100644
> > +--- a/uvloop/handles/udp.pyx
> > ++++ b/uvloop/handles/udp.pyx
> > +@@ -127,12 +127,12 @@ cdef class UDPTransport(UVBaseTransport):
> > +             exc = convert_error(err)
> > +             raise exc
> > +
> > +-    cdef size_t _get_write_buffer_size(self):
> > ++    cdef size_t _get_write_buffer_size(self) noexcept:
> > +         if self._handle is NULL:
> > +             return 0
> > +         return (<uv.uv_udp_t*>self._handle).send_queue_size
> > +
> > +-    cdef bint _is_reading(self):
> > ++    cdef bint _is_reading(self) noexcept:
> > +         return self.__receiving
> > +
> > +     cdef _start_reading(self):
> > +diff --git a/uvloop/includes/consts.pxi b/uvloop/includes/consts.pxi
> > +deleted file mode 100644
> > +index f765053..0000000
> > +--- a/uvloop/includes/consts.pxi
> > ++++ /dev/null
> > +@@ -1,25 +0,0 @@
> > +-DEF UV_STREAM_RECV_BUF_SIZE = 256000  # 250kb
> > +-
> > +-DEF FLOW_CONTROL_HIGH_WATER = 64  # KiB
> > +-DEF FLOW_CONTROL_HIGH_WATER_SSL_READ = 256  # KiB
> > +-DEF FLOW_CONTROL_HIGH_WATER_SSL_WRITE = 512  # KiB
> > +-
> > +-DEF DEFAULT_FREELIST_SIZE = 250
> > +-DEF DNS_PYADDR_TO_SOCKADDR_CACHE_SIZE = 2048
> > +-
> > +-DEF DEBUG_STACK_DEPTH = 10
> > +-
> > +-
> > +-DEF __PROCESS_DEBUG_SLEEP_AFTER_FORK = 1
> > +-
> > +-
> > +-DEF LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5
> > +-
> > +-
> > +-# Number of seconds to wait for SSL handshake to complete
> > +-# The default timeout matches that of Nginx.
> > +-DEF SSL_HANDSHAKE_TIMEOUT = 60.0
> > +-# Number of seconds to wait for SSL shutdown to complete
> > +-# The default timeout mimics lingering_time
> > +-DEF SSL_SHUTDOWN_TIMEOUT = 30.0
> > +-DEF SSL_READ_MAX_SIZE = 256 * 1024
> > +diff --git a/uvloop/includes/fork_handler.h b/uvloop/includes/fork_handler.h
> > +index 47bbe03..9d3573a 100644
> > +--- a/uvloop/includes/fork_handler.h
> > ++++ b/uvloop/includes/fork_handler.h
> > +@@ -1,7 +1,10 @@
> > ++#ifndef UVLOOP_FORK_HANDLER_H_
> > ++#define UVLOOP_FORK_HANDLER_H_
> > ++
> > + volatile uint64_t MAIN_THREAD_ID = 0;
> > + volatile int8_t MAIN_THREAD_ID_SET = 0;
> > +
> > +-typedef void (*OnForkHandler)();
> > ++typedef void (*OnForkHandler)(void);
> > +
> > + OnForkHandler __forkHandler = NULL;
> > +
> > +@@ -36,3 +39,4 @@ void setMainThreadID(uint64_t id) {
> > +     MAIN_THREAD_ID = id;
> > +     MAIN_THREAD_ID_SET = 1;
> > + }
> > ++#endif
> > +diff --git a/uvloop/includes/system.h b/uvloop/includes/system.h
> > +new file mode 100755
> > +index 0000000..e143bb5
> > +--- /dev/null
> > ++++ b/uvloop/includes/system.h
> > +@@ -0,0 +1,16 @@
> > ++#ifndef UVLOOP_SYSTEM_H_
> > ++#define UVLOOP_SYSTEM_H_
> > ++#if defined(_WIN32) || defined(MS_WINDOWS) || defined(_MSC_VER)
> > ++#include "Winsock2.h"
> > ++#include "ws2def.h"
> > ++#include "includes/fork_handler.h"
> > ++#else
> > ++#include "arpa/inet.h"
> > ++#include "sys/socket.h"
> > ++#include "sys/un.h"
> > ++#include "unistd.h"
> > ++#include "pthread.h"
> > ++#endif
> > ++#endif
> > ++
> > ++
> > +diff --git a/uvloop/includes/system.pxd b/uvloop/includes/system.pxd
> > +index 367fedd..d1da74e 100644
> > +--- a/uvloop/includes/system.pxd
> > ++++ b/uvloop/includes/system.pxd
> > +@@ -1,13 +1,9 @@
> > + from libc.stdint cimport int8_t, uint64_t
> > +
> > +-cdef extern from "arpa/inet.h" nogil:
> > +-
> > +-    int ntohl(int)
> > +-    int htonl(int)
> > +-    int ntohs(int)
> > +-
> > +-
> > +-cdef extern from "sys/socket.h" nogil:
> > ++cdef extern from "includes/system.h":
> > ++    int ntohl(int) nogil
> > ++    int htonl(int) nogil
> > ++    int ntohs(int) nogil
> > +
> > +     struct sockaddr:
> > +         unsigned short sa_family
> > +diff --git a/uvloop/includes/uv.pxd b/uvloop/includes/uv.pxd
> > +index 8765130..ddd9738 100644
> > +--- a/uvloop/includes/uv.pxd
> > ++++ b/uvloop/includes/uv.pxd
> > +@@ -220,7 +220,7 @@ cdef extern from "uv.h" nogil:
> > +         UV_LEAVE_GROUP = 0,
> > +         UV_JOIN_GROUP
> > +
> > +-    cpdef enum uv_fs_event:
> > ++    cdef enum uv_fs_event:
> > +         UV_RENAME = 1,
> > +         UV_CHANGE = 2
> > +
> > +@@ -282,7 +282,7 @@ cdef extern from "uv.h" nogil:
> > +     int uv_loop_close(uv_loop_t* loop)
> > +     int uv_loop_alive(uv_loop_t* loop)
> > +     int uv_loop_fork(uv_loop_t* loop)
> > +-    int uv_backend_fd(uv_loop_t* loop)
> > ++    uv_os_fd_t uv_backend_fd(uv_loop_t* loop)
> > +
> > +     void uv_update_time(uv_loop_t* loop)
> > +     uint64_t uv_now(const uv_loop_t*)
> > +@@ -378,7 +378,7 @@ cdef extern from "uv.h" nogil:
> > +     # Pipes
> > +
> > +     int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc)
> > +-    int uv_pipe_open(uv_pipe_t* handle, uv_file file)
> > ++    int uv_pipe_open(uv_pipe_t* handle, uv_os_fd_t file)
> > +     int uv_pipe_bind(uv_pipe_t* handle, const char* name)
> > +
> > +     void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle,
> > +diff --git a/uvloop/loop.pxd b/uvloop/loop.pxd
> > +index 5613473..f90c704 100644
> > +--- a/uvloop/loop.pxd
> > ++++ b/uvloop/loop.pxd
> > +@@ -1,15 +1,35 @@
> > + # cython: language_level=3
> > +
> > ++cdef extern from *:
> > ++    '''
> > ++    enum { UV_STREAM_RECV_BUF_SIZE = 256000,
> > ++           SSL_READ_MAX_SIZE = 256 * 1024,  // 250kb
> > ++          };
> > ++    const float SSL_HANDSHAKE_TIMEOUT = 60.0; // Number of seconds to wait for SSL handshake to complete The default timeout matches that of Nginx.
> > ++    const float SSL_SHUTDOWN_TIMEOUT  = 30.0; // Number of seconds to wait for SSL shutdown to complete The default timeout mimics lingering_time
> > ++    '''
> > ++    const bint UV_STREAM_RECV_BUF_SIZE
> > ++    const bint SSL_READ_MAX_SIZE
> > ++
> > ++    const float SSL_HANDSHAKE_TIMEOUT
> > ++    const float SSL_SHUTDOWN_TIMEOUT
> > ++
> > ++cdef enum:
> > ++    FLOW_CONTROL_HIGH_WATER = 64  # KiB
> > ++    FLOW_CONTROL_HIGH_WATER_SSL_READ = 256  # KiB
> > ++    FLOW_CONTROL_HIGH_WATER_SSL_WRITE = 512  # KiB
> > ++
> > ++    DNS_PYADDR_TO_SOCKADDR_CACHE_SIZE = 2048
> > ++    DEBUG_STACK_DEPTH = 10
> > ++    __PROCESS_DEBUG_SLEEP_AFTER_FORK = 1
> > ++    LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5
> > ++
> > +
> > + from .includes cimport uv
> > + from .includes cimport system
> > +
> > + from libc.stdint cimport uint64_t, uint32_t, int64_t
> > +
> > +-
> > +-include "includes/consts.pxi"
> > +-
> > +-
> > + cdef extern from *:
> > +     ctypedef int vint "volatile int"
> > +
> > +diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
> > +index 334d8d5..53e1160 100644
> > +--- a/uvloop/loop.pyx
> > ++++ b/uvloop/loop.pyx
> > +@@ -43,7 +43,7 @@ from cpython.pycapsule cimport PyCapsule_New, PyCapsule_GetPointer
> > + from . import _noop
> > +
> > +
> > +-include "includes/consts.pxi"
> > ++
> > + include "includes/stdlib.pxi"
> > +
> > + include "errors.pyx"
> > +@@ -1118,7 +1118,7 @@ cdef class Loop:
> > +
> > +     cdef _sock_set_reuseport(self, int fd):
> > +         cdef:
> > +-            int err
> > ++            int err = 0
> > +             int reuseport_flag = 1
> > +
> > +         err = system.setsockopt(
> > +@@ -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."""
> > +@@ -2750,7 +2750,7 @@ cdef class Loop:
> > +                                executable=None,
> > +                                pass_fds=(),
> > +                                # For tests only! Do not use in your code. Ever.
> > +-                               __uvloop_sleep_after_fork=False):
> > ++                               uvloop_sleep_after_fork=False):
> > +
> > +         # TODO: Implement close_fds (might not be very important in
> > +         # Python 3.5, since all FDs aren't inheritable by default.)
> > +@@ -2770,7 +2770,7 @@ cdef class Loop:
> > +         if executable is not None:
> > +             args[0] = executable
> > +
> > +-        if __uvloop_sleep_after_fork:
> > ++        if uvloop_sleep_after_fork:
> > +             debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK
> > +
> > +         waiter = self._new_future()
> > +diff --git a/uvloop/sslproto.pxd b/uvloop/sslproto.pxd
> > +index 3da10f0..68e4d57 100644
> > +--- a/uvloop/sslproto.pxd
> > ++++ b/uvloop/sslproto.pxd
> > +@@ -122,7 +122,7 @@ cdef class SSLProtocol:
> > +     # Flow control for writes from APP socket
> > +
> > +     cdef _control_app_writing(self, object context=*)
> > +-    cdef size_t _get_write_buffer_size(self)
> > ++    cdef size_t _get_write_buffer_size(self) noexcept
> > +     cdef _set_write_buffer_limits(self, high=*, low=*)
> > +
> > +     # Flow control for reads to APP socket
> > +@@ -134,5 +134,5 @@ cdef class SSLProtocol:
> > +
> > +     cdef _control_ssl_reading(self)
> > +     cdef _set_read_buffer_limits(self, high=*, low=*)
> > +-    cdef size_t _get_read_buffer_size(self)
> > ++    cdef size_t _get_read_buffer_size(self) noexcept
> > +     cdef _fatal_error(self, exc, message=*)
> > +diff --git a/uvloop/sslproto.pyx b/uvloop/sslproto.pyx
> > +index 42bb764..0a43746 100644
> > +--- a/uvloop/sslproto.pyx
> > ++++ b/uvloop/sslproto.pyx
> > +@@ -861,7 +861,7 @@ cdef class SSLProtocol:
> > +                     'protocol': self,
> > +                 })
> > +
> > +-    cdef size_t _get_write_buffer_size(self):
> > ++    cdef size_t _get_write_buffer_size(self) noexcept:
> > +         return self._outgoing.pending + self._write_buffer_size
> > +
> > +     cdef _set_write_buffer_limits(self, high=None, low=None):
> > +@@ -903,7 +903,7 @@ cdef class SSLProtocol:
> > +         self._incoming_high_water = high
> > +         self._incoming_low_water = low
> > +
> > +-    cdef size_t _get_read_buffer_size(self):
> > ++    cdef size_t _get_read_buffer_size(self) noexcept:
> > +         return self._incoming.pending
> > +
> > +     # Flow control for writes to SSL socket
> > +--
> > +2.34.1
> > +
> > diff --git a/package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch b/package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch
> > new file mode 100644
> > index 0000000000..ac6170aff3
> > --- /dev/null
> > +++ b/package/python-uvloop/0002-_set_coroutine_debug-has-args-difference-in-python-3.patch
> > @@ -0,0 +1,30 @@
> > +From 8b63801bfdb1f0cf7fde4f58e96f8628a587b186 Mon Sep 17 00:00:00 2001
> > +From: Alan Brooks <12380017+alan-brooks@users.noreply.github.com>
> > +Date: Thu, 28 Dec 2023 16:17:49 +0000
> > +Subject: [PATCH] _set_coroutine_debug has args difference in python 3.11
> > +
> > +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > +[Upstream status:
> > +https://github.com/MagicStack/uvloop/pull/587]
> > +---
> > + uvloop/loop.pyx | 3 ++-
> > + 1 file changed, 2 insertions(+), 1 deletion(-)
> > +
> > +diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
> > +index 53e1160..5ca718e 100644
> > +--- a/uvloop/loop.pyx
> > ++++ b/uvloop/loop.pyx
> > +@@ -1396,8 +1396,9 @@ cdef class Loop:
> > +     def set_debug(self, enabled):
> > +         self._debug = bool(enabled)
> > +         if self.is_running():
> > ++            args = (self, self._debug) if sys.version_info < (3, 11) else (self._debug,)
> > +             self.call_soon_threadsafe(
> > +-                self._set_coroutine_debug, self._debug)
> > ++                self._set_coroutine_debug, *args)
> > +
> > +     def is_running(self):
> > +         """Return whether the event loop is currently running."""
> > +--
> > +2.34.1
> > +
> > diff --git a/package/python-uvloop/0003-fix-tests-on-python-3.8.patch b/package/python-uvloop/0003-fix-tests-on-python-3.8.patch
> > new file mode 100644
> > index 0000000000..42f04f2241
> > --- /dev/null
> > +++ b/package/python-uvloop/0003-fix-tests-on-python-3.8.patch
> > @@ -0,0 +1,31 @@
> > +From ef5c3e5c6f331692ebcbea9e4c6aead8b2187038 Mon Sep 17 00:00:00 2001
> > +From: alan-brooks <12380017+alan-brooks@users.noreply.github.com>
> > +Date: Thu, 28 Dec 2023 19:58:11 +0000
> > +Subject: [PATCH] fix tests on python 3.8
> > +
> > +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > +[Upstream status:
> > +https://github.com/MagicStack/uvloop/pull/587]
> > +---
> > + uvloop/loop.pyx | 5 ++---
> > + 1 file changed, 2 insertions(+), 3 deletions(-)
> > +
> > +diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
> > +index 5ca718e..75b915a 100644
> > +--- a/uvloop/loop.pyx
> > ++++ b/uvloop/loop.pyx
> > +@@ -1396,9 +1396,8 @@ cdef class Loop:
> > +     def set_debug(self, enabled):
> > +         self._debug = bool(enabled)
> > +         if self.is_running():
> > +-            args = (self, self._debug) if sys.version_info < (3, 11) else (self._debug,)
> > +-            self.call_soon_threadsafe(
> > +-                self._set_coroutine_debug, *args)
> > ++            args = ((self, self._debug),) if sys.version_info < (3, 11) else (self._debug,)
> > ++            self.call_soon_threadsafe(self._set_coroutine_debug, *args)
> > +
> > +     def is_running(self):
> > +         """Return whether the event loop is currently running."""
> > +--
> > +2.34.1
> > +
> > diff --git a/package/python-uvloop/0004-fix-arg-count-for-wrap.patch b/package/python-uvloop/0004-fix-arg-count-for-wrap.patch
> > new file mode 100644
> > index 0000000000..fe082f4f90
> > --- /dev/null
> > +++ b/package/python-uvloop/0004-fix-arg-count-for-wrap.patch
> > @@ -0,0 +1,52 @@
> > +From afef6364c2c3100ab23c2bb2de82d2da330b258c Mon Sep 17 00:00:00 2001
> > +From: alan-brooks <12380017+alan-brooks@users.noreply.github.com>
> > +Date: Fri, 29 Dec 2023 11:24:19 +0000
> > +Subject: [PATCH] fix arg count for wrap()
> > +
> > +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > +[Upstream status:
> > +https://github.com/MagicStack/uvloop/pull/587]
> > +---
> > + uvloop/loop.pxd | 2 +-
> > + uvloop/loop.pyx | 5 ++---
> > + 2 files changed, 3 insertions(+), 4 deletions(-)
> > +
> > +diff --git a/uvloop/loop.pxd b/uvloop/loop.pxd
> > +index f90c704..d34ffeb 100644
> > +--- a/uvloop/loop.pxd
> > ++++ b/uvloop/loop.pxd
> > +@@ -220,7 +220,7 @@ cdef class Loop:
> > +     cdef inline _ceval_process_signals(self)
> > +     cdef _invoke_signals(self, bytes data)
> > +
> > +-    cdef _set_coroutine_debug(self, bint enabled)
> > ++    cpdef _set_coroutine_debug(self, bint enabled)
> > +
> > +     cdef _print_debug_info(self)
> > +
> > +diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
> > +index 75b915a..a3eeb60 100644
> > +--- a/uvloop/loop.pyx
> > ++++ b/uvloop/loop.pyx
> > +@@ -1131,7 +1131,7 @@ cdef class Loop:
> > +         if err < 0:
> > +             raise convert_error(-errno.errno)
> > +
> > +-    cdef _set_coroutine_debug(self, bint enabled):
> > ++    cpdef _set_coroutine_debug(self, bint enabled):
> > +         enabled = bool(enabled)
> > +         if self._coroutine_debug_set == enabled:
> > +             return
> > +@@ -1396,8 +1396,7 @@ cdef class Loop:
> > +     def set_debug(self, enabled):
> > +         self._debug = bool(enabled)
> > +         if self.is_running():
> > +-            args = ((self, self._debug),) if sys.version_info < (3, 11) else (self._debug,)
> > +-            self.call_soon_threadsafe(self._set_coroutine_debug, *args)
> > ++             self.call_soon_threadsafe(self._set_coroutine_debug, self._debug)
> > +
> > +     def is_running(self):
> > +         """Return whether the event loop is currently running."""
> > +--
> > +2.34.1
> > +
> > --
> > 2.34.1
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3
  2024-02-11 21:39   ` James Hilliard
@ 2024-02-11 21:57     ` Yann E. MORIN
  2024-02-12  0:13       ` Marcus Hoffmann via buildroot
  0 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2024-02-11 21:57 UTC (permalink / raw)
  To: James Hilliard; +Cc: Joseph Kogut, Giulio Benetti, Asaf Kahlon, buildroot

James, All,

On 2024-02-11 14:39 -0700, James Hilliard spake thusly:
> On Sun, Feb 11, 2024 at 2:24 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > On 2024-02-09 10:56 -0700, James Hilliard spake thusly:
> > > Add patches from pending upstream pull request which add cython3
> > > compatibility.
> > We are a little bit cautious at applying random patches that have not
> > yet been at least reviewd by upstream. In this case, there has not been
> > any upstream activity since the last release, and not muc before that
> > either...
> Well these patches are being used by gentoo so they are not entirely
> untested in the real world.

It's not that they are tested or not. It is about whether they'll have a
chance to be accepted upstream, or whether we'll have to carry and
maintain them forever in Buildroot.

Maybe it's time that someone pings upstream about that PR?

> > We have no in-tree user of uvloop, so I wonder whether it makes snse to
> > keep it, espcially since it mau be blocking the bumps of other packages
> > (like cython 3.x being required by whats-its-name).
> That's not entirely true, it's a common optional dependency for packages
> like python-uvicorn for example.

    $ git grep -i -E python.uvloop

would turn only python-uvloop itself, and its runtime test. If it
is only optional, and prevents us from updating unless we apply
non-upstreamable patches, then I'd argue we should drop it.

[--SNIP--]
> I'll fix and resend.

Thanks.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3
  2024-02-11 21:57     ` Yann E. MORIN
@ 2024-02-12  0:13       ` Marcus Hoffmann via buildroot
  2024-02-12  0:51         ` James Hilliard
  0 siblings, 1 reply; 13+ messages in thread
From: Marcus Hoffmann via buildroot @ 2024-02-12  0:13 UTC (permalink / raw)
  To: Yann E. MORIN, James Hilliard
  Cc: Joseph Kogut, Giulio Benetti, Asaf Kahlon, buildroot

Hi Yann, James,

On 11.02.24 22:57, Yann E. MORIN wrote:
> James, All,
> 
> On 2024-02-11 14:39 -0700, James Hilliard spake thusly:
>> On Sun, Feb 11, 2024 at 2:24 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>>> On 2024-02-09 10:56 -0700, James Hilliard spake thusly:
>>>> Add patches from pending upstream pull request which add cython3
>>>> compatibility.
>>> We are a little bit cautious at applying random patches that have not
>>> yet been at least reviewd by upstream. In this case, there has not been
>>> any upstream activity since the last release, and not muc before that
>>> either...
>> Well these patches are being used by gentoo so they are not entirely
>> untested in the real world.
> 
> It's not that they are tested or not. It is about whether they'll have a
> chance to be accepted upstream, or whether we'll have to carry and
> maintain them forever in Buildroot.
> 
> Maybe it's time that someone pings upstream about that PR?
> 
>>> We have no in-tree user of uvloop, so I wonder whether it makes snse to
>>> keep it, espcially since it mau be blocking the bumps of other packages
>>> (like cython 3.x being required by whats-its-name).
>> That's not entirely true, it's a common optional dependency for packages
>> like python-uvicorn for example.
> 
>      $ git grep -i -E python.uvloop
> 
> would turn only python-uvloop itself, and its runtime test. If it
> is only optional, and prevents us from updating unless we apply
> non-upstreamable patches, then I'd argue we should drop it.

It's an optional dependency, but a recommended one, see the install 
instructions for uvivorn: 
https://github.com/encode/uvicorn?tab=readme-ov-file#quickstart

It's a faster drop-in replacement for the python async event loop, but 
only compatible with CPython, not i.e. pypy, so usually projects don't 
declare a hard dependency on it.

I found a hopefully better solution to our cython problems though: see 
the python-msgpack thread.

In short: if we continue to use the sdists from pypi, cython is not a 
real build dependency and we can just remove it from pyptoject.toml 
instead of trying to provide the correct version that's never going to 
be invoked.

> 
> [--SNIP--]
>> I'll fix and resend.
> 
> Thanks.
> 
> Regards,
> Yann E. MORIN.
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 2/2] package/python-cython: bump to version 3.0.8
  2024-02-11 21:30   ` Yann E. MORIN
@ 2024-02-12  0:46     ` James Hilliard
  0 siblings, 0 replies; 13+ messages in thread
From: James Hilliard @ 2024-02-12  0:46 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Joseph Kogut, Giulio Benetti, Asaf Kahlon, buildroot

On Sun, Feb 11, 2024 at 2:30 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> James, All,
>
> On 2024-02-09 10:56 -0700, James Hilliard spake thusly:
> > License hash changed due to changing links from http to https:
> > https://github.com/cython/cython/commit/331d9d824ee5f0c539310332215ebd6ed3257325
>
> Thanks for the simple and sufficient explanation. 👍
>
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > ---
> [--SNIP--]
> > diff --git a/package/python-cython/python-cython.mk b/package/python-cython/python-cython.mk
> > index 47e105c065..d76bfb766d 100644
> > --- a/package/python-cython/python-cython.mk
> > +++ b/package/python-cython/python-cython.mk
> > @@ -4,9 +4,9 @@
> >  #
> >  ################################################################################
> >
> > -PYTHON_CYTHON_VERSION = 0.29.36
> > +PYTHON_CYTHON_VERSION = 3.0.8
>
> Given there was an earlier discussion about how the cython bump was
> causing some issues with various packages, I would have expected at
> least a post-commit summarising what tests were done to ensure the bump
> was OK.

Yeah, there was some more breakage that needed fixing, I had to bump
some packages(numpy/scipy) and tweak a few things to get everything
building with cython 3.

>
> Also, as those same discussions hinted at, cython 0.29 seems to still be
> in active development (or at least active maintenance), so the commit
> log should have also explained why it was decided to go with a full bump
> to 3.0.x rather than intriducing a cython3 package and installing both
> in parallel. Or that it was not possiblr to do so becaus they can't be
> installed in parallel.

I'm not aware of any way to install both at the same time since they
share the same namespace essentially.

>
> Could you respin this series, fixing the check-package issues in patch
> 1, and extending the commit log pqtch 2 to better assess the situation,
> please?

Added more details in v3:
https://patchwork.ozlabs.org/project/buildroot/patch/20240212004101.614670-5-james.hilliard1@gmail.com/

>
> Regards,
> Yann E. MORIN.
>
> >  PYTHON_CYTHON_SOURCE = Cython-$(PYTHON_CYTHON_VERSION).tar.gz
> > -PYTHON_CYTHON_SITE = https://files.pythonhosted.org/packages/38/db/df0e99d6c5fe19ee5c981d22aad557be4bdeed3ecfae25d47b84b07f0f98
> > +PYTHON_CYTHON_SITE = https://files.pythonhosted.org/packages/68/09/ffb61f29b8e3d207c444032b21328327d753e274ea081bc74e009827cc81
> >  PYTHON_CYTHON_SETUP_TYPE = setuptools
> >  PYTHON_CYTHON_LICENSE = Apache-2.0
> >  PYTHON_CYTHON_LICENSE_FILES = COPYING.txt LICENSE.txt
> > --
> > 2.34.1
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3
  2024-02-12  0:13       ` Marcus Hoffmann via buildroot
@ 2024-02-12  0:51         ` James Hilliard
  2024-02-12 19:50           ` Arnout Vandecappelle via buildroot
  0 siblings, 1 reply; 13+ messages in thread
From: James Hilliard @ 2024-02-12  0:51 UTC (permalink / raw)
  To: Marcus Hoffmann
  Cc: Joseph Kogut, Giulio Benetti, Yann E. MORIN, Asaf Kahlon, buildroot

On Sun, Feb 11, 2024 at 5:13 PM Marcus Hoffmann <buildroot@bubu1.eu> wrote:
>
> Hi Yann, James,
>
> On 11.02.24 22:57, Yann E. MORIN wrote:
> > James, All,
> >
> > On 2024-02-11 14:39 -0700, James Hilliard spake thusly:
> >> On Sun, Feb 11, 2024 at 2:24 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> >>> On 2024-02-09 10:56 -0700, James Hilliard spake thusly:
> >>>> Add patches from pending upstream pull request which add cython3
> >>>> compatibility.
> >>> We are a little bit cautious at applying random patches that have not
> >>> yet been at least reviewd by upstream. In this case, there has not been
> >>> any upstream activity since the last release, and not muc before that
> >>> either...
> >> Well these patches are being used by gentoo so they are not entirely
> >> untested in the real world.
> >
> > It's not that they are tested or not. It is about whether they'll have a
> > chance to be accepted upstream, or whether we'll have to carry and
> > maintain them forever in Buildroot.
> >
> > Maybe it's time that someone pings upstream about that PR?

Ok, I pinged one of the maintainers:
https://github.com/MagicStack/uvloop/pull/587#issuecomment-1937896616

> >
> >>> We have no in-tree user of uvloop, so I wonder whether it makes snse to
> >>> keep it, espcially since it mau be blocking the bumps of other packages
> >>> (like cython 3.x being required by whats-its-name).
> >> That's not entirely true, it's a common optional dependency for packages
> >> like python-uvicorn for example.
> >
> >      $ git grep -i -E python.uvloop
> >
> > would turn only python-uvloop itself, and its runtime test. If it
> > is only optional, and prevents us from updating unless we apply
> > non-upstreamable patches, then I'd argue we should drop it.
>
> It's an optional dependency, but a recommended one, see the install
> instructions for uvivorn:
> https://github.com/encode/uvicorn?tab=readme-ov-file#quickstart
>
> It's a faster drop-in replacement for the python async event loop, but
> only compatible with CPython, not i.e. pypy, so usually projects don't
> declare a hard dependency on it.
>
> I found a hopefully better solution to our cython problems though: see
> the python-msgpack thread.
>
> In short: if we continue to use the sdists from pypi, cython is not a
> real build dependency and we can just remove it from pyptoject.toml
> instead of trying to provide the correct version that's never going to
> be invoked.

We can probably just pass --skip-dependency-check as a build arg or
something like that I suppose.

>
> >
> > [--SNIP--]
> >> I'll fix and resend.
> >
> > Thanks.
> >
> > Regards,
> > Yann E. MORIN.
> >
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3
  2024-02-12  0:51         ` James Hilliard
@ 2024-02-12 19:50           ` Arnout Vandecappelle via buildroot
  2024-02-12 21:09             ` James Hilliard
  0 siblings, 1 reply; 13+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-02-12 19:50 UTC (permalink / raw)
  To: James Hilliard, Marcus Hoffmann
  Cc: Joseph Kogut, Giulio Benetti, Yann E. MORIN, Asaf Kahlon, buildroot



On 12/02/2024 01:51, James Hilliard wrote:
> On Sun, Feb 11, 2024 at 5:13 PM Marcus Hoffmann <buildroot@bubu1.eu> wrote:
[snip]>> In short: if we continue to use the sdists from pypi, cython is not a
>> real build dependency and we can just remove it from pyptoject.toml
>> instead of trying to provide the correct version that's never going to
>> be invoked.
> 
> We can probably just pass --skip-dependency-check as a build arg or
> something like that I suppose.

  That skips _all_ dependency checks, and we usually want to check dependencies. 
Unless the dependency check will require host packages for runtime dependencies? 
But if that were the case we'd already have a lot of useless host-python-foo 
packages I expect...

  Regards,
  Arnout

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3
  2024-02-12 19:50           ` Arnout Vandecappelle via buildroot
@ 2024-02-12 21:09             ` James Hilliard
  2024-02-12 21:53               ` Arnout Vandecappelle via buildroot
  0 siblings, 1 reply; 13+ messages in thread
From: James Hilliard @ 2024-02-12 21:09 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: Joseph Kogut, Asaf Kahlon, Marcus Hoffmann, buildroot,
	Giulio Benetti, Yann E. MORIN

On Mon, Feb 12, 2024 at 12:50 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 12/02/2024 01:51, James Hilliard wrote:
> > On Sun, Feb 11, 2024 at 5:13 PM Marcus Hoffmann <buildroot@bubu1.eu> wrote:
> [snip]>> In short: if we continue to use the sdists from pypi, cython is not a
> >> real build dependency and we can just remove it from pyptoject.toml
> >> instead of trying to provide the correct version that's never going to
> >> be invoked.
> >
> > We can probably just pass --skip-dependency-check as a build arg or
> > something like that I suppose.
>
>   That skips _all_ dependency checks, and we usually want to check dependencies.
> Unless the dependency check will require host packages for runtime dependencies?
> But if that were the case we'd already have a lot of useless host-python-foo
> packages I expect...

Yeah, so runtime dependencies are basically not checked at all since we don't
generally have buildroot target python packages which depend on other buildroot
target python packages, they merely select their dependencies which allows for
their dependencies to be built parallel but prevents any sort of target package
dependency validation.

I think that --skip-dependency-check flag just disables pep517 build dependency
checks which would be those host-python-foo build dependencies that some have.

>
>   Regards,
>   Arnout
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3
  2024-02-12 21:09             ` James Hilliard
@ 2024-02-12 21:53               ` Arnout Vandecappelle via buildroot
  2024-02-12 22:11                 ` James Hilliard
  0 siblings, 1 reply; 13+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-02-12 21:53 UTC (permalink / raw)
  To: James Hilliard
  Cc: Joseph Kogut, Asaf Kahlon, Marcus Hoffmann, buildroot,
	Giulio Benetti, Yann E. MORIN



On 12/02/2024 22:09, James Hilliard wrote:
> On Mon, Feb 12, 2024 at 12:50 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>>
>>
>>
>> On 12/02/2024 01:51, James Hilliard wrote:
>>> On Sun, Feb 11, 2024 at 5:13 PM Marcus Hoffmann <buildroot@bubu1.eu> wrote:
>> [snip]>> In short: if we continue to use the sdists from pypi, cython is not a
>>>> real build dependency and we can just remove it from pyptoject.toml
>>>> instead of trying to provide the correct version that's never going to
>>>> be invoked.
>>>
>>> We can probably just pass --skip-dependency-check as a build arg or
>>> something like that I suppose.
>>
>>    That skips _all_ dependency checks, and we usually want to check dependencies.
>> Unless the dependency check will require host packages for runtime dependencies?
>> But if that were the case we'd already have a lot of useless host-python-foo
>> packages I expect...
> 
> Yeah, so runtime dependencies are basically not checked at all since we don't
> generally have buildroot target python packages which depend on other buildroot
> target python packages, they merely select their dependencies which allows for
> their dependencies to be built parallel but prevents any sort of target package
> dependency validation.
> 
> I think that --skip-dependency-check flag just disables pep517 build dependency
> checks which would be those host-python-foo build dependencies that some have.

  Oh, and a missing build dependency (that is actually used) would actually 
trigger a build error, so indeed it sounds like the pep517 build dependency 
check is quite redundant.

  Regards,
  Arnout
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3
  2024-02-12 21:53               ` Arnout Vandecappelle via buildroot
@ 2024-02-12 22:11                 ` James Hilliard
  0 siblings, 0 replies; 13+ messages in thread
From: James Hilliard @ 2024-02-12 22:11 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: Joseph Kogut, Asaf Kahlon, Marcus Hoffmann, buildroot,
	Giulio Benetti, Yann E. MORIN

On Mon, Feb 12, 2024 at 2:53 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 12/02/2024 22:09, James Hilliard wrote:
> > On Mon, Feb 12, 2024 at 12:50 PM Arnout Vandecappelle <arnout@mind.be> wrote:
> >>
> >>
> >>
> >> On 12/02/2024 01:51, James Hilliard wrote:
> >>> On Sun, Feb 11, 2024 at 5:13 PM Marcus Hoffmann <buildroot@bubu1.eu> wrote:
> >> [snip]>> In short: if we continue to use the sdists from pypi, cython is not a
> >>>> real build dependency and we can just remove it from pyptoject.toml
> >>>> instead of trying to provide the correct version that's never going to
> >>>> be invoked.
> >>>
> >>> We can probably just pass --skip-dependency-check as a build arg or
> >>> something like that I suppose.
> >>
> >>    That skips _all_ dependency checks, and we usually want to check dependencies.
> >> Unless the dependency check will require host packages for runtime dependencies?
> >> But if that were the case we'd already have a lot of useless host-python-foo
> >> packages I expect...
> >
> > Yeah, so runtime dependencies are basically not checked at all since we don't
> > generally have buildroot target python packages which depend on other buildroot
> > target python packages, they merely select their dependencies which allows for
> > their dependencies to be built parallel but prevents any sort of target package
> > dependency validation.
> >
> > I think that --skip-dependency-check flag just disables pep517 build dependency
> > checks which would be those host-python-foo build dependencies that some have.
>
>   Oh, and a missing build dependency (that is actually used) would actually
> trigger a build error, so indeed it sounds like the pep517 build dependency
> check is quite redundant.

Probably a good idea to only use that flag for packages where we want to
bypass a build dependency.

>
>   Regards,
>   Arnout
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-02-12 22:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 17:56 [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3 James Hilliard
2024-02-09 17:56 ` [Buildroot] [PATCH 2/2] package/python-cython: bump to version 3.0.8 James Hilliard
2024-02-11 21:30   ` Yann E. MORIN
2024-02-12  0:46     ` James Hilliard
2024-02-11 21:24 ` [Buildroot] [PATCH 1/2] package/python-uvloop: add support for cython3 Yann E. MORIN
2024-02-11 21:39   ` James Hilliard
2024-02-11 21:57     ` Yann E. MORIN
2024-02-12  0:13       ` Marcus Hoffmann via buildroot
2024-02-12  0:51         ` James Hilliard
2024-02-12 19:50           ` Arnout Vandecappelle via buildroot
2024-02-12 21:09             ` James Hilliard
2024-02-12 21:53               ` Arnout Vandecappelle via buildroot
2024-02-12 22:11                 ` James Hilliard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.