-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-59705: Add _thread.set_name() function #127338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
c6d324d
gh-59705: Add _thread.set_name() function
vstinner 63b5d52
Port to macOS
vstinner 9f6a8ab
Add tests
vstinner d79e7af
Try to fix macOS _get_name()
vstinner ebd9752
Truncate to 15 bytes; add error handling
vstinner a7f5651
Address review
vstinner 97ea645
Add test on non-ASCII name truncation
vstinner 78a9ab9
Add test on non-ASCII name
vstinner dcf13f4
Test long name on non-Linux platforms
vstinner 6ea7e5a
macOS is limited to 63 bytes
vstinner 46721bb
Catch UnicodeEncodeError when seting the name
vstinner 6962116
Add tests
vstinner 5d27da0
Use "replace" error handler
vstinner b713910
Address review
vstinner 5c20ea1
Use PyInterpreterState filesystem encoding
vstinner 6088b37
FreeBSD truncates to 98 bytes silently
vstinner 3c12d17
Merge branch 'main' into thread_set_name
vstinner bde935f
Fix test_threading on iOS
vstinner 0584ca3
Fix create_test(): always encode using "replace"
vstinner 7508b6c
Solaris truncates to 31 bytes
vstinner f4a9f40
Solaris always uses UTF-8
vstinner ac6d726
Add PYTHREAD_NAME_MAXLEN macro
vstinner 08e5922
Fix configure.ac if PYTHREAD_NAME_MAXLEN is not set
vstinner 681624e
Address Serhiy's review
vstinner f57339f
Solaris always use UTF-8
vstinner 3941123
Simplify tests
vstinner 2e27043
Use @unittest.skipUnless
vstinner 6ab2944
Solaris uses UTF-8
vstinner b370c49
Update Lib/test/test_threading.py
vstinner beeae59
add test on embedded null character
vstinner ae956a0
Optimize code truncating the name
vstinner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also inline
len
. It is only used here.