mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
tests: set subprocess._active to None (#4818)
To better reflect https://github.com/python/cpython/pull/14360
This commit is contained in:
+7
-3
@@ -29,11 +29,15 @@ if os.name == "nt":
|
||||
# exception, which it doesn't ignore and so Popen is not able to cleanup
|
||||
# old processes and that prevents it from creating any new processes at
|
||||
# all, which results in our tests failing whenever they try to use Popen.
|
||||
# This patch was released in 3.9.0 and backported to some earlier
|
||||
# versions.
|
||||
if sys.version_info < (3, 9, 0):
|
||||
|
||||
def noop():
|
||||
pass
|
||||
def noop():
|
||||
pass
|
||||
|
||||
subprocess._cleanup = noop
|
||||
subprocess._cleanup = noop
|
||||
subprocess._active = None
|
||||
else:
|
||||
import resource
|
||||
|
||||
|
||||
Reference in New Issue
Block a user