Skip to content

Commit 9c37930

Browse files
committed
Drop Python 3.6 support for thread ident
Python 3.6 uses `long` for thread ident, while 3.7 uses `unsigned long`.
1 parent cdab9d3 commit 9c37930

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

uvloop/loop.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ cdef class Loop:
218218
cdef inline _is_main_thread(self):
219219
cdef uint64_t main_thread_id = system.MAIN_THREAD_ID
220220
if system.MAIN_THREAD_ID_SET == 0:
221-
main_thread_id = <uint64_t><int64_t>threading_main_thread().ident
221+
main_thread_id = <uint64_t>threading_main_thread().ident
222222
system.setMainThreadID(main_thread_id)
223223
return main_thread_id == PyThread_get_thread_ident()
224224

@@ -711,7 +711,7 @@ cdef class Loop:
711711
return
712712

713713
cdef uint64_t thread_id
714-
thread_id = <uint64_t><int64_t>PyThread_get_thread_ident()
714+
thread_id = <uint64_t>PyThread_get_thread_ident()
715715

716716
if thread_id != self._thread_id:
717717
raise RuntimeError(

0 commit comments

Comments
 (0)