]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34783: Fix Py_Main() (GH-9526)
authorVictor Stinner <vstinner@redhat.com>
Mon, 24 Sep 2018 12:03:01 +0000 (05:03 -0700)
committerGitHub <noreply@github.com>
Mon, 24 Sep 2018 12:03:01 +0000 (05:03 -0700)
commitddc163df25191af5bf8000091dbf8f6500b1d7c9
treeacf09e2bed2c3d4c6230ec638bd38418f72d504a
parentaeadf59e457ca0ee20983eb1ed78b348f0b453e3
bpo-34783: Fix Py_Main() (GH-9526)

Fix a crash with musl libc (on Alpine Linux) when the script filename
specified on the command line doesn't exist. pymain_open_filename()
now gets the current core configuration from the interpreter state.

Modify the code to make it closer to the master branch:

* Rename _Py_CommandLineDetails to _PyCmdline
* Remove _PyMain.config: replaced with a local variable
  'local_config' in pymain_init()
* Reorganize pymain_main(): move code using the "local config"
  into pymain_init()
* As soon as possible, switch from the local config to the core
  configuration attached to the interpreter.
Misc/NEWS.d/next/Core and Builtins/2018-09-24-11-31-23.bpo-34783.O79cwo.rst [new file with mode: 0644]
Modules/main.c