From 9c37930e6faf6803349a7b199b249caf0076b3ea Mon Sep 17 00:00:00 2001 From: Fantix King Date: Fri, 9 Sep 2022 15:36:10 -0400 Subject: [PATCH] Drop Python 3.6 support for thread ident Python 3.6 uses `long` for thread ident, while 3.7 uses `unsigned long`. --- uvloop/loop.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx index ef2ac47..edb58d9 100644 --- a/uvloop/loop.pyx +++ b/uvloop/loop.pyx @@ -218,7 +218,7 @@ cdef class Loop: cdef inline _is_main_thread(self): cdef uint64_t main_thread_id = system.MAIN_THREAD_ID if system.MAIN_THREAD_ID_SET == 0: - main_thread_id = threading_main_thread().ident + main_thread_id = threading_main_thread().ident system.setMainThreadID(main_thread_id) return main_thread_id == PyThread_get_thread_ident() @@ -711,7 +711,7 @@ cdef class Loop: return cdef uint64_t thread_id - thread_id = PyThread_get_thread_ident() + thread_id = PyThread_get_thread_ident() if thread_id != self._thread_id: raise RuntimeError(