◐ Shell
reader mode source ↗
Skip to content

[3.9] bpo-40173: Fix test.support.import_helper.import_fresh_module()…#28658

Merged
serhiy-storchaka merged 1 commit into
python:3.9from
serhiy-storchaka:backport-ec4d917-3.9
Sep 30, 2021
Merged

[3.9] bpo-40173: Fix test.support.import_helper.import_fresh_module()…#28658
serhiy-storchaka merged 1 commit into
python:3.9from
serhiy-storchaka:backport-ec4d917-3.9

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 30, 2021

Copy link
Copy Markdown
Member

… (GH-28654)

  • Work correctly if an additional fresh module imports other
    additional fresh module which imports a blocked module.
  • Raises ImportError if the specified module cannot be imported
    while all additional fresh modules are successfully imported.
  • Support blocking packages.
  • Always restore the import state of fresh and blocked modules
    and their submodules.
  • Fix test_decimal and test_xml_etree which depended on an undesired
    side effect of import_fresh_module().
    (cherry picked from commit ec4d917)

https://bugs.python.org/issue40173

…pythonGH-28654)

* Work correctly if an additional fresh module imports other
  additional fresh module which imports a blocked module.
* Raises ImportError if the specified module cannot be imported
  while all additional fresh modules are successfully imported.
* Support blocking packages.
* Always restore the import state of fresh and blocked modules
  and their submodules.
* Fix test_decimal and test_xml_etree which depended on an undesired
  side effect of import_fresh_module()..
(cherry picked from commit ec4d917)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants