Remove shutil_custom monkeypatch

This commit is contained in:
Labrys of Knossos 2022-12-03 00:52:01 -05:00
commit 51e390d6e5
2 changed files with 0 additions and 20 deletions

View file

@ -1,6 +1,5 @@
import requests
from core.utils import shutil_custom
from core.utils.common import clean_dir, flatten, get_dirs, process_dir
from core.utils.download_info import get_download_info, update_download_info_status
from core.utils.encoding import char_replace, convert_to_ascii
@ -42,4 +41,3 @@ from core.utils.paths import (
from core.utils.processes import RunningProcess, restart
requests.packages.urllib3.disable_warnings()
shutil_custom.monkey_patch()

View file

@ -1,18 +0,0 @@
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals,
)
from functools import partial
import shutil
from six import PY2
def monkey_patch(length=512 * 1024):
if PY2:
# On Python 2 monkey patch shutil.copyfileobj()
# to adjust the buffer length to 512KB rather than 4KB
original_copyfileobj = shutil.copyfileobj
shutil.copyfileobj = partial(original_copyfileobj, length=length)