Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.10] bpo-40173: Fix test.support.import_helper.import_fresh_module(… #28657

Merged

Conversation

serhiy-storchaka
Copy link
Member

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

…) (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.

None yet

3 participants