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

[3.13] gh-130940: Remove PyConfig.use_system_logger#131129

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
freakboy3742 merged 2 commits intopython:3.13fromfreakboy3742:remove-system-log
Mar 13, 2025

Conversation

@freakboy3742
Copy link
Contributor

@freakboy3742freakboy3742 commentedMar 12, 2025
edited
Loading

Pull request#127754 is a backport of#127592 to the 3.13 branch. However, this PR included a new attribute (use_system_logger) in PyConfig, which broke ABI compatibility on Apple platforms (macOS and iOS).

This was not detected because ABI compatibility checks are only performed on Linux, and the inclusion of the flag was gated with__APPLE__ preprocessor handling.

On macOS, removing the flag is no problem - it's a new feature, but an entirely optional one that would only be enabled by someone that has built (or updated) an app that embeds Python 3.13.2.

However, on iOS, the behavior enabled by this flag is required on iOS so that the logs generated by the simulator can be observed at all. More generally, there's very little reason that you'dnot want stdout and stderr routed to the system log - every BeeWare app, for example, includesstd-nslog, which implements effectively the same behavior.

This PR:

  • Removes theuse_system_logger attribute from PyConfig.
  • Hard-codes the use of the system logger on iOSonly.

This is, strictly, a change of behavior for 3.13 on iOS, unless you view "the output of Python's stdout/stderr is now visible in the app logs" as a bug that is resolved by this PR. My inclination is that this is such a signficant quality of life for iOS developers that it warrants being treated as a bugfix/improvement - but I wanted to flag the change in the strictest interpretation.

In an upcoming PR, I'll rework the introduction of the flag on the 3.14 branch to use the new PyInitConfig API (avoiding the ABI incompatibility), making the default value "enabled" on iOS, and "disabled" on macOS.


📚 Documentation preview 📚:https://cpython-previews--131129.org.readthedocs.build/

@freakboy3742
Copy link
ContributorAuthor

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@freakboy3742 for commit98b0415 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131129%2Fmerge

The command will test the builders whose names match following regular expression:iOS

The builders matched are:

  • iOS ARM64 Simulator PR

@@ -0,0 +1,4 @@
The ``PyConfig.use_system_logger`` attribute, introduced in Python 3.12.2, has
Copy link
Member

Choose a reason for hiding this comment

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

This change is for Python 3.13. Do you mean Python 3.13.2?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

🤦 I did.

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@freakboy3742
Copy link
ContributorAuthor

@ned-deily Although@vstinner has approved this, I'm holding off merging until I get your signoff as a macOS/iOS platform delegate, because of the implications on iOS stdout logging.

@ned-deily
Copy link
Member

I’ll review it tomorrow.

Copy link
Member

@ned-deilyned-deily left a comment

Choose a reason for hiding this comment

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

LGTM, and all tests pass in the simulator. Thanks for taking this on.

@freakboy3742freakboy3742 merged commit589f422 intopython:3.13Mar 13, 2025
39 checks passed
@freakboy3742freakboy3742 deleted the remove-system-log branchMarch 13, 2025 03:53
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotaarch64 Android 3.13 (tier-3) has failed when building commit589f422.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1590/builds/504) and take a look at the build logs.
  4. Check if the failure is related to this commit (589f422) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1590/builds/504

Failed tests:

  • test_os

Failed subtests:

  • test_fpathconf - test.test_os.TestInvalidFD.test_fpathconf

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/data/user/0/org.python.testbed/files/python/lib/python3.13/test/test_os.py", line2402, intest_fpathconfself.check(os.pathconf,"PC_NAME_MAX")~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/data/user/0/org.python.testbed/files/python/lib/python3.13/test/test_os.py", line2325, incheck    f(os_helper.make_bad_fd(),*args,**kwargs)~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ValueError:unrecognized configuration name

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotaarch64 RHEL8 LTO 3.13 (tier-2) has failed when building commit589f422.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1393/builds/601) and take a look at the build logs.
  4. Check if the failure is related to this commit (589f422) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1393/builds/601

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.13.cstratak-RHEL8-aarch64.lto/build/Lib/threading.py", line1041, in_bootstrap_innerself.run()~~~~~~~~^^  File"/home/buildbot/buildarea/3.13.cstratak-RHEL8-aarch64.lto/build/Lib/threading.py", line992, inrunself._target(*self._args,**self._kwargs)~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/home/buildbot/buildarea/3.13.cstratak-RHEL8-aarch64.lto/build/Lib/test/test_interpreters/test_stress.py", line47, inrun    interp= interpreters.create()  File"/home/buildbot/buildarea/3.13.cstratak-RHEL8-aarch64.lto/build/Lib/test/support/interpreters/__init__.py", line76, increateid= _interpreters.create(reqrefs=True)interpreters.InterpreterError:interpreter creation failedkTraceback (most recent call last):  File"/home/buildbot/buildarea/3.13.cstratak-RHEL8-aarch64.lto/build/Lib/threading.py", line1041, in_bootstrap_innerself.run()~~~~~~~~^^  File"/home/buildbot/buildarea/3.13.cstratak-RHEL8-aarch64.lto/build/Lib/threading.py", line992, inrunself._target(*self._args,**self._kwargs)~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/home/buildbot/buildarea/3.13.cstratak-RHEL8-aarch64.lto/build/Lib/test/test_interpreters/test_stress.py", line30, intask    interp= interpreters.create()  File"/home/buildbot/buildarea/3.13.cstratak-RHEL8-aarch64.lto/build/Lib/test/support/interpreters/__init__.py", line76, increateid= _interpreters.create(reqrefs=True)interpreters.InterpreterError:interpreter creation failedk

@freakboy3742
Copy link
ContributorAuthor

Both CI failures appear to be unrelated. The Android test has passed on a re-run.

freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestMar 14, 2025
)Removes ``PyConfig.use_system_logger``, resolving an ABI incompatibility introduced in3.13.2.Changes the default behavior of iOS to *always* direct stdout/stderr to the system log.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestMar 16, 2025
)Removes ``PyConfig.use_system_logger``, resolving an ABI incompatibility introduced in3.13.2.Changes the default behavior of iOS to *always* direct stdout/stderr to the system log.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestMar 16, 2025
)Removes ``PyConfig.use_system_logger``, resolving an ABI incompatibility introduced in3.13.2.Changes the default behavior of iOS to *always* direct stdout/stderr to the system log.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestMar 16, 2025
)Removes ``PyConfig.use_system_logger``, resolving an ABI incompatibility introduced in3.13.2.Changes the default behavior of iOS to *always* direct stdout/stderr to the system log.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestMar 16, 2025
Removes ``PyConfig.use_system_logger``, resolving an ABI incompatibility introduced in3.13.2.Changes the default behavior of iOS to *always* direct stdout/stderr to the system log.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner approved these changes

@ned-deilyned-deilyned-deily approved these changes

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@freakboy3742@bedevere-bot@ned-deily@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp