File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 3
3
# Increasing fd ulimit for tests
4
4
if os .name == "nt" :
5
5
import win32file
6
+ import subprocess
6
7
7
8
win32file ._setmaxstdio (2048 )
9
+
10
+ # Workaround for two bugs:
11
+ #
12
+ # 1) gitpython-developers/GitPython#546
13
+ # GitPython leaves git cat-file --batch/--batch-check processes that are
14
+ # not cleaned up correctly, so Popen._active list has their defunct
15
+ # process handles, that it is not able to cleanup because of bug 2)
16
+ #
17
+ # 2) https://bugs.python.org/issue37380
18
+ # subprocess.Popen._internal_poll on windows is getting
19
+ #
20
+ # OSError: [WinError 6] The handle is invalid
21
+ #
22
+ # exception, which it doesn't ignore and so Popen is not able to cleanup
23
+ # old processes and that prevents it from creating any new processes at
24
+ # all, which results in our tests failing whenever they try to use Popen.
25
+
26
+ def noop ():
27
+ pass
28
+
29
+ subprocess ._cleanup = noop
8
30
else :
9
31
import resource
10
32
You can’t perform that action at this time.
0 commit comments