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
gh-114490: Add check for Mach-O linkage in Lib/platform.py #114491
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 |
Could be wrong here, but this seems like a minor enough change that no news is needed. |
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.
The change itself LGTM.
I would prefer a news entry though, adding it is easy enough and does show users that something changed here.
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 |
BTW. Normally I'd ask for a test as well, but this function is mostly untested at the moment and adding a test for just the linkage on macOS feels wrong to me. |
Sounds good! I'll set it right up. |
Oh, so it would be helpful to add some tests for this function? |
I have made the requested changes; please review again |
I'm personally not that bothered by not having tests for this function, but better test coverage can help avoiding regressions in the future. AFAIK the only tests for this function are here: cpython/Lib/test/test_platform.py Lines 78 to 86 in 441affc
Tests will inherently have platform specifics in them, for other functions in |
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.
The linting job found a formatting niggle in the news entry, see the suggested change below.
With that change the PR is good to go.
Misc/NEWS.d/next/macOS/2024-01-23-11-35-26.gh-issue-114490.FrQOQ0.rst
Outdated
Show resolved
Hide resolved
I have made the requested changes; please review again |
Misc/NEWS.d/next/macOS/2024-01-23-11-35-26.gh-issue-114490.FrQOQ0.rst
Outdated
Show resolved
Hide resolved
…OQ0.rst Co-authored-by: AN Long <aisk@users.noreply.github.com>
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.
LGTM
@aidenfoxivey, thanks for your PR! |
…hon#114491) ``platform.architecture()`` now returns the format of binaries (e.g. Mach-O) instead of the default empty string. Co-authored-by: AN Long <aisk@users.noreply.github.com>
#114490