system: win: use win32file for _getdirinfo

Current implementation is triggering some non-obvious gc bug, that
causes memory leaks. Using win32file simplifies the code and gets rid of
this bug.

To reproduce it, run:

```
from dvc.system import System

while True:
    System.inode(__file__)
```

and see your Windows machine run out of memory pretty quickly.
This commit is contained in:
Ruslan Kuprieiev
2019-11-05 01:46:21 +02:00
parent 522579be1e
commit b718b839bf
2 changed files with 22 additions and 53 deletions
+1 -1
View File
@@ -76,6 +76,7 @@ install_requires = [
"tqdm>=4.36.1,<5",
"packaging>=19.0",
"win-unicode-console>=0.5; sys_platform == 'win32'",
"pywin32>=225; sys_platform == 'win32'",
]
if sys.version_info[0] == 2:
@@ -118,7 +119,6 @@ tests_requirements = [
"xmltodict>=0.11.0",
"awscli==1.16.266",
"google-compute-engine==2.8.13",
"pywin32; sys_platform == 'win32'",
"Pygments", # required by collective.checkdocs,
"collective.checkdocs",
"flake8",