-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Open
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixes
Description
It seems that pthread_setname_np()
only works with ASCII names here.
>>> import _thread
>>> _thread.set_name('€')
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
_thread.set_name('€')
~~~~~~~~~~~~~~~~^^^^^
OSError: [Errno 22] Invalid argument
In addition to making the test more lenient, we can make _thread.set_name()
more tolerant to such restriction -- use ASCII encoding with the "replace" or "ignore" error handler as a fallback.
cc @vstinner
Linked PRs
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixes
Projects
Status
No status