-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Synced docs and docstring for sysconfig.get_platform
#135530
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
base: main
Are you sure you want to change the base?
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Thanks for the catch! It seems that still there are some possible return values of Moreover, improving On the other hand, general rewording can be more useful. Some links to related previous PRs and commits: |
This comment was marked as duplicate.
This comment was marked as duplicate.
a6537bc
to
7ab7580
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
@efimov-mikhail thanks for your swift response, I also thought that the phrasing "macOs can return" as well as "Examples of returned values" was implicitly assuming that an exhaustive list is not necessary. But did not know if this was intentional or not. I agree that exhaustive is better. I've added what I think is an exhaustive list + the tests for the >=11 macOS releases. Maybe this is a redundancy. I lack expertise on many aspects of the platform and sysconfig logic, so I may be missing something here. |
Thanks for the changes. IMO, now it looks better. But I'm also not an expert here. We probably should wait for someone with greater expertise. |
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.
Thanks for the PR. But I don't think it is a good idea to attempt to provide an exhaustive list here. As already noted in the paragraph above in sysconfig.rst
:
This is used mainly to distinguish platform-specific build directories and platform-specific built distributions
By implication, the exact values are not intended to be parsed. They are just configuration-unique values.
I would support changing the wording for macOS and to replace the macOS list with a few more modern examples, like:
Examples of macOS returned values:
- macosx-10.13-x86_64
- macosx-11-universal2
- macosx-15.5-arm64
Perhaps @zooba has an opinion on updates to the list of Windows values.
Also note that reST markup requires a blank line before the start of a list. The changes here disturb that. (See the doc preview)
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
This comment was marked as duplicate.
This comment was marked as duplicate.
Thanks @ned-deily I have made the requested changes; please review again |
Thanks for making the requested changes! @ned-deily: please review the changes made to this pull request. |
Examples of returned values: | ||
Returned values: | ||
|
||
Examples of Linux returned values: |
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.
Repeating "returned values" doesn't look very nice, IMO.
- win-amd64 (64-bit Windows on AMD64, aka x86_64, Intel64, and EM64T) | ||
- win-arm64 (64-bit Windows on ARM64, aka AArch64) | ||
- win32 (all others - specifically, sys.platform is returned) | ||
- win-arm32 (32-bit Windows on ARM) |
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.
Maybe it's better to have examples for each platform, and remove win-arm32
here.
arm64
macos return tosysconfig.get_platform
get_platform
π Documentation preview π: https://cpython-previews--135530.org.readthedocs.build/