Skip to content

[3.7] bpo-35239: _PySys_EndInit() copies module_search_path (GH-10532)#10566

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-37cd982-3.7
Nov 16, 2018
Merged

[3.7] bpo-35239: _PySys_EndInit() copies module_search_path (GH-10532)#10566
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-37cd982-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented Nov 16, 2018

Copy link
Copy Markdown
Contributor
  • The _PySys_EndInit() function now copies the
    config->module_search_path list, so config is longer modified when
    sys.path is updated.
  • config->warnoptions list and config->xoptions dict are also copied
  • test_embed: InitConfigTests now also tests
    main_config['module_search_path']
  • Fix _Py_InitializeMainInterpreter(): don't use config->warnoptions
    but sys.warnoptions to decide if the warnings module should
    be imported at startup.
    (cherry picked from commit 37cd982)

Co-authored-by: Victor Stinner vstinner@redhat.com

https://bugs.python.org/issue35239

* The _PySys_EndInit() function now copies the
  config->module_search_path list, so config is longer modified when
  sys.path is updated.
* config->warnoptions list and config->xoptions dict are also copied
* test_embed: InitConfigTests now also tests
  main_config['module_search_path']
* Fix _Py_InitializeMainInterpreter(): don't use config->warnoptions
   but sys.warnoptions to decide if the warnings module should
   be imported at startup.
(cherry picked from commit 37cd982)

Co-authored-by: Victor Stinner <vstinner@redhat.com>

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, good bot.

@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit d2be9a5 into python:3.7 Nov 16, 2018
@miss-islington miss-islington deleted the backport-37cd982-3.7 branch November 16, 2018 11:34
@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants