]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-126925: Make PyConfig.use_system_logger read-only (#129124)
authorVictor Stinner <vstinner@python.org>
Tue, 21 Jan 2025 11:02:38 +0000 (12:02 +0100)
committerGitHub <noreply@github.com>
Tue, 21 Jan 2025 11:02:38 +0000 (12:02 +0100)
The variable is only used once during early Python initialization, it
doesn't make sense to modify it at runtime.

Python/initconfig.c

index 7851b86db1f6d0cdd423c3ea6261d984afcc2c98..4db77ef47d2362dd7e1635f3989cb4bd740ffdf0 100644 (file)
@@ -169,7 +169,7 @@ static const PyConfigSpec PYCONFIG_SPEC[] = {
     SPEC(use_frozen_modules, BOOL, READ_ONLY, NO_SYS),
     SPEC(use_hash_seed, BOOL, READ_ONLY, NO_SYS),
 #ifdef __APPLE__
-    SPEC(use_system_logger, BOOL, PUBLIC, NO_SYS),
+    SPEC(use_system_logger, BOOL, READ_ONLY, NO_SYS),
 #endif
     SPEC(user_site_directory, BOOL, READ_ONLY, NO_SYS),  // sys.flags.no_user_site
     SPEC(warn_default_encoding, BOOL, READ_ONLY, NO_SYS),