[issue31622] Make threading.get_ident() return an opaque type

Serhiy Storchaka report at bugs.python.org
Sun Oct 1 17:13:45 EDT 2017


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

> Currently, Python exposes "thread identifiers" as unsigned long values across multiple modules:

It happened not so long ago. In 3.6 and earlier "thread identifiers" are signed integers. See issue6532, it was massive change. This issue was deferred for long time due to the afraid of breaking the word. And it still was not tested with third-party code.

>> What happens for code that uses e.g. "%x" to format thread ids?
>It's okay for the opaque object to have a int() conversion.

What happens for C code that uses "%lu" to format thread ids?

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31622>
_______________________________________


More information about the Python-bugs-list mailing list