[issue33538] Remove useless check in subprocess

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It is in PyImport_Cleanup() in Python/import.c. Search 
PyObject_SetItem(modules, name, Py_None).

If you will run Python with the -v option you will see numerous messages "# 
cleanup[2] removing ..." emitted on stderr.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33538] Remove useless check in subprocess

2018-05-17 Thread TaoQingyun

TaoQingyun <845767...@qq.com> added the comment:

I can't find the reset code, could you give me a link? Thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33538] Remove useless check in subprocess

2018-05-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It is reset to None at the interpreter shutdown stage. This check was added 
intentionally.

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33538] Remove useless check in subprocess

2018-05-16 Thread TaoQingyun

New submission from TaoQingyun <845767...@qq.com>:

diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index bafb501fcf..4a0bb33978 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -766,7 +766,7 @@ class Popen(object):
   ResourceWarning, source=self)
 # In case the child hasn't been waited on, check if it's done.
 self._internal_poll(_deadstate=_maxsize)
-if self.returncode is None and _active is not None:
+if self.returncode is None:
 # Child is still running, keep us alive until we can wait on it.
 _active.append(self)
 

the `_active` is initialized with [] at the beginning of the module.

--
components: Library (Lib)
messages: 316804
nosy: qingyunha
priority: normal
severity: normal
status: open
title: Remove useless check in subprocess
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com