bpo-40173: Fix test.support.import_helper.import_fresh_module#28654
bpo-40173: Fix test.support.import_helper.import_fresh_module#28654serhiy-storchaka merged 2 commits intopython:mainpython/cpython:mainfrom serhiy-storchaka:import_fresh_moduleserhiy-storchaka/cpython:import_fresh_moduleCopy head branch name to clipboard
Conversation
* 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.
1d5a3a9 to
9bd77bc
Compare
|
No tests yet, but it fixes currently failing buildbots. |
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit e5b149e 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
|
Failures of the multiprocessing tests on some buildbots look unrelated. There were same failures on them few days ago. |
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
Sorry @serhiy-storchaka, I had trouble checking out the |
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>
|
GH-28657 is a backport of this pull request to the 3.10 branch. |
…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>
|
GH-28658 is a backport of this pull request to the 3.9 branch. |
|
GH-28654) (GH-28657) * 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)
…GH-28654) (GH-28658) * 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)
|
|
|
|
|
|
|
|
|
|
|
This seems like kind of a significant change to go through with no review, TBH. You even change a test in the decimal module! |
|
I was in a hurry to fix refleak buildbots. There were bugs in test_decimal and test_xml_etree. They depended on a side effect of |
additional fresh module which imports a blocked module.
while all additional fresh modules are successfully imported.
and their submodules.
https://bugs.python.org/issue40173