Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-114490: Add check for Mach-O linkage in Lib/platform.py#114491

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ronaldoussoren merged 7 commits intopython:mainfromaidenfoxivey:fix-issue-114490
Jan 26, 2024
Merged

gh-114490: Add check for Mach-O linkage in Lib/platform.py#114491

ronaldoussoren merged 7 commits intopython:mainfromaidenfoxivey:fix-issue-114490
Jan 26, 2024

Conversation

@aidenfoxivey
Copy link

@aidenfoxiveyaidenfoxivey commentedJan 23, 2024
edited by bedevere-appbot
Loading

@ghost
Copy link

ghost commentedJan 23, 2024
edited by ghost
Loading

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply theskip news label instead.

@aidenfoxivey
Copy link
Author

Could be wrong here, but this seems like a minor enough change that no news is needed.

Copy link
Contributor

@ronaldoussorenronaldoussoren left a 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.

@bedevere-app
Copy link

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 phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@ronaldoussoren
Copy link
Contributor

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.

@aidenfoxivey
Copy link
Author

The change itself LGTM.

I would prefer a news entry though, adding it is easy enough and does show users that something changed here.

Sounds good! I'll set it right up.

@aidenfoxivey
Copy link
Author

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.

Oh, so it would be helpful to add some tests for this function?

@aidenfoxivey
Copy link
Author

I have made the requested changes; please review again

@ronaldoussoren
Copy link
Contributor

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.

Oh, so it would be helpful to add some tests for this function?

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:

deftest_architecture(self):
res=platform.architecture()
@os_helper.skip_unless_symlink
@support.requires_subprocess()
deftest_architecture_via_symlink(self):# issue3762
withsupport.PythonSymlink()aspy:
cmd="-c","import platform; print(platform.architecture())"
self.assertEqual(py.call_real(*cmd),py.call_link(*cmd))

Tests will inherently have platform specifics in them, for other functions inplatform the tests themselves are cross-platform by mocking functions used the test. Forplatform.architecture just mocking_syscmd_file should be good enough. This does require access to a number of platforms to collect data though.

Copy link
Contributor

@ronaldoussorenronaldoussoren left a 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.

@aidenfoxivey
Copy link
Author

I have made the requested changes; please review again

…OQ0.rstCo-authored-by: AN Long <aisk@users.noreply.github.com>
Copy link
Contributor

@ronaldoussorenronaldoussoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@ronaldoussoren
Copy link
Contributor

@aidenfoxivey, thanks for your PR!

aisk added a commit to aisk/cpython that referenced this pull requestFeb 11, 2024
…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>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
…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>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@aiskaiskaisk left review comments

@ronaldoussorenronaldoussorenronaldoussoren approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@aidenfoxivey@ronaldoussoren@aisk

[8]ページ先頭

©2009-2025 Movatter.jp