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.

Author xxm
Recipients xxm
Date 2021-01-07.11:54:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610020465.58.0.34787573132.issue42858@roundup.psfhosted.org>
In-reply-to
Content
Running attached "test_zipfile.py" 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
----------------------------------------------------------------------------------------------------

However, if we run this program with os.system, the return value is 0 instead of 256. 0 represent no fails in this running! This is obviously incorrect.

Reproduce:
=========================================
import os
scode = os.system('python310  test_zipfile.py')
print("The system code of this execution is:", scode)
=========================================

The expected output: "The system code of this execution is: 256"
The actual output: "The system code of this execution is: 0"

Version info:
>>python310 -V
Python 3.10.0a2
>>uname -v
16.04.1-Ubuntu SMP Fri Sep 13 09:56:18 UTC 2019
History
Date User Action Args
2021-01-07 11:54:25xxmsetrecipients: + xxm
2021-01-07 11:54:25xxmsetmessageid: <1610020465.58.0.34787573132.issue42858@roundup.psfhosted.org>
2021-01-07 11:54:25xxmlinkissue42858 messages
2021-01-07 11:54:25xxmcreate