bpo-42260: PyConfig_Read() only parses argv once (GH-23168) · python/cpython@dc42af8 · GitHub
Skip to content

Commit dc42af8

Browse files
authored
bpo-42260: PyConfig_Read() only parses argv once (GH-23168)
The PyConfig_Read() function now only parses PyConfig.argv arguments once: PyConfig.parse_argv is set to 2 after arguments are parsed. Since Python arguments are strippped from PyConfig.argv, parsing arguments twice would parse the application options as Python options. * Rework the PyConfig documentation. * Fix _testinternalcapi.set_config() error handling. * SetConfigTests no longer needs parse_argv=0 when restoring the old configuration.
1 parent f3cb814 commit dc42af8

6 files changed

Lines changed: 134 additions & 105 deletions

File tree

Doc/c-api/init_config.rst

Lines changed: 104 additions & 92 deletions

Lib/test/_test_embed_set_config.py

Lines changed: 7 additions & 1 deletion

0 commit comments

Comments
 (0)