gh-119132: Update sys.version to identify free-threaded or not.#119134
gh-119132: Update sys.version to identify free-threaded or not.#119134corona10 merged 13 commits intopython:mainfrom
Conversation
|
Could we maybe leave out "default" for the normal build? It doesn't really add value: The tests on GitHub don't include "(default)" either. Maybe even like this: This could even work for |
|
You still need to update this: Lines 1156 to 1161 in 81c3130 |
|
Currently this test is failing: cpython/Lib/test/test_platform.py Line 129 in 81c3130 Do you have an opinion on not including "default"? |
Hey, I am under testing. Would you like to leave a comment once I convert the PR into the official PR? |
|
Old regex: ([\w.+]+)\s*\(#?([^,]+)(?:,\s*([\w ]*)(?:,\s*([\w :]*))?)?\)\s*\[([^\]]+)\]?New regex: ([\w.+]+)\s*\(#?([^,]+)(?:,\s*([\w ]*)(?:,\s*([\w :]*))?)(?:,\s*(free-threading))?\)*\s*\[([^\]]+)\]?Unmatched string: |
Co-authored-by: Nice Zombies <[email protected]>
Co-authored-by: Nice Zombies <[email protected]>
|
@nineteendo Thanks for the comment Still issue (nah I am really bad at regex) |
|
I proposed a similar idea last August, but it was rejected at that time: #108239 |
|
I suggest to mention The "(...)" part of sys.version is the Git information, I would prefer to not touch it. If we change sys.version, I would prefer to "add a new field" in sys.version. For example, add The drawback of changing |
|
Then we need to discuss with @hugovk |
|
You accidentally added -([\w.+]+)\s*\(#?([^,]+)(?:,\s*([\w ]*)(?:,\s*([\w :]*))?)?(?:,\s*(free-threading))?\)*\s*\[([^\]]+)\]?
+([\w.+]+)\s*\(#?([^,]+)(?:,\s*([\w ]*)(?:,\s*([\w :]*))?)?(?:,\s*(free-threading))?\)\s*\[([^\]]+)\]?But I would prefer a new field as well. |
|
@Yhg1s What do you think about backporting it into the 3.13 since it will help the free-threading ecosystem? |
vstinner
left a comment
There was a problem hiding this comment.
LGTM, but see my comment on regex.
Co-authored-by: Victor Stinner <[email protected]>
|
Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…pythongh-119134) (cherry picked from commit c141d43) Co-authored-by: Donghee Na <[email protected]>
|
GH-119153 is a backport of this pull request to the 3.13 branch. |
|
Sorry, I haven't been paying close attention, but was there a decision not to tweak It seems that since it's a named tuple there'd be little problem adding a new field which distinguishes the two builds. Something like: |
build information is not part of version_info. the version string is meant for humans and includes other detailed things that are also not in version_info such as compiler details. there's the https://docs.python.org/3.13/library/sys.html#sys._is_gil_enabled may-change-in-the-future API for people wanting to know the current status of the GIL regardless of build type. |
|
Thanks. Just checking. As long as there is somewhere to query the status at run-time without parsing a human-readable string. |
Uh oh!
There was an error while loading. Please reload this page.