This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fails to construct paths lead to "python is likely shutting down"
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.10
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, xxm
Priority: normal Keywords:

Created on 2021-01-07 11:49 by xxm, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_zipfile.py xxm, 2021-01-07 11:49
Messages (2)
msg384581 - (view) Author: Xinmeng Xia (xxm) Date: 2021-01-07 11:49
The attached file "test_zipfile.py" is from test directory in cPython. We delete irrelevant code. Running this code on Python 3.10 will lead to the following error messages.
----------------------------------------------------------------------------------------
Exception ignored in: <generator object temp_dir at 0x7f13f30ff2e0>
Traceback (most recent call last):
  File "/usr/local/python310/lib/python3.10/test/support/os_helper.py", line 401, in temp_dir
  File "/usr/local/python310/lib/python3.10/test/support/os_helper.py", line 358, in rmtree
  File "/usr/local/python310/lib/python3.10/test/support/os_helper.py", line 322, in _rmtree
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <generator object temp_dir at 0x7f13f30bd5f0>
Traceback (most recent call last):
  File "/usr/local/python310/lib/python3.10/test/support/os_helper.py", line 401, in temp_dir
  File "/usr/local/python310/lib/python3.10/test/support/os_helper.py", line 358, in rmtree
  File "/usr/local/python310/lib/python3.10/test/support/os_helper.py", line 322, in _rmtree
ImportError: sys.meta_path is None, Python is likely shutting down
----------------------------------------------------------------------------------------
The expected output should be something like" ImportError: No module named XXX"  rather than "Python is likely shutting down"
msg384604 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2021-01-07 21:11
You are doing something very evil during finalization here. There’s nothing that can be done reasonably.
History
Date User Action Args
2022-04-11 14:59:40adminsetgithub: 87023
2021-01-07 21:11:57gvanrossumsetstatus: open -> closed

nosy: + gvanrossum
messages: + msg384604

resolution: wont fix
stage: resolved
2021-01-07 11:49:48xxmcreate