gh-130940: Modify default behavior of PyConfig.use_system_logger
to enable on iOS
#131172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#127592 added the
PyConfig.use_system_logger
configuration flag; this was backported to 3.13 in #127754.This introduced an ABI breakage in 3.13.2; the flag will be removed from 3.13 by #131129.
However, the functional effect of the flag is required on iOS so that the logs generated by the simulator can be observed at all. As a general rule, there's very little reason you'd not want stdout and stderr routed to the system log on iOS - every BeeWare app, for example, includes std-nslog, which implements effectively the same behavior.
To allow for this, #131129 modifies the behavior on iOS to always use the system logger for stdout/stderr. This PR ensures that behaviour will be consistent by default between 3.13 and 3.14 - use of the system log is enabled by default on iOS, and disabled by default on macOS.
PyConfig.use_system_logger
has changed ABI in a patch 3.13.1 -> 3.13.2 #130940📚 Documentation preview 📚: https://cpython-previews--131172.org.readthedocs.build/