dvc: drop 3.6 support (#6792)

* dvc: drop 3.6 support

Considering that 3.6 has ~2 months until EOL, and our deps are
dropping support for it already (e.g. pygit2), we are droppipping
it as well. This will reduce the load on our test CI as well, since
we've started supporting 3.10 recently.

* setup.cfg: adjust requirements

* daemon: remove 3.6 logic

* tests: utils: remove pre 3.7 logic
This commit is contained in:
Ruslan Kuprieiev
2021-10-12 18:53:28 +03:00
committed by GitHub
parent 8abda93e3e
commit e9a7e0657d
4 changed files with 4 additions and 43 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
pyv: ["3.6", "3.7", "3.8", "3.9", "3.10"]
pyv: ["3.7", "3.8", "3.9", "3.10"]
exclude:
# no wheels for pygit2 yet
- os: windows-latest
+1 -2
View File
@@ -12,8 +12,6 @@ from dvc.utils import fix_env, is_binary
logger = logging.getLogger(__name__)
CREATE_NO_WINDOW = 0x08000000 # only available since Python 3.7 in subprocess.
def _popen(cmd, **kwargs):
prefix = [sys.executable]
@@ -28,6 +26,7 @@ def _popen(cmd, **kwargs):
def _spawn_windows(cmd, env):
from subprocess import (
CREATE_NEW_PROCESS_GROUP,
CREATE_NO_WINDOW,
STARTF_USESHOWWINDOW,
STARTUPINFO,
)
+2 -7
View File
@@ -19,7 +19,6 @@ keywords = data-science, data-version-control, machine-learning, git
classifiers =
Development Status :: 4 - Beta
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
@@ -30,7 +29,7 @@ setup_requires =
setuptools>=58.2
setuptools_scm[toml]>=6.3.1
fastentrypoints>=0.12
python_requires = >=3.6
python_requires = >=3.7
zip_safe = False
packages = find:
include_package_data = True
@@ -42,8 +41,7 @@ install_requires =
configobj>=5.0.6
gitpython>3
dulwich>=0.20.23
pygit2>=1.5.0,<1.7; python_version < '3.7'
pygit2>=1.5.0; python_version >= '3.7'
pygit2>=1.5.0
setuptools>=34.0.0
nanotime>=0.5.2
pyasn1>=0.4.1
@@ -62,12 +60,9 @@ install_requires =
packaging>=19.0
zc.lockfile>=1.2.1
flufl.lock>=3.2,<4
win-unicode-console>=0.5; sys_platform == 'win32'
networkx>=2.5
psutil>=5.8.0
pydot>=1.2.4
dataclasses>=0.7; python_version < '3.7'
contextvars>=2.1; python_version < '3.7'
importlib-metadata>=1.4; python_version < '3.8'
flatten_dict>=0.4.1,<1
tabulate>=0.8.7
-33
View File
@@ -1,6 +1,5 @@
import hashlib
import os
import sys
import threading
from contextlib import contextmanager
from http import HTTPStatus
@@ -11,40 +10,8 @@ from RangeHTTPServer import RangeRequestHandler
class TestRequestHandler(RangeRequestHandler):
def __init__(self, *args, **kwargs):
# NOTE: `directory` was introduced in 3.7
if sys.version_info < (3, 7):
self.directory = kwargs.pop("directory", None) or os.getcwd()
super().__init__(*args, **kwargs)
def translate_path(self, path):
import posixpath
import urllib
# NOTE: `directory` was introduced in 3.7
if sys.version_info >= (3, 7):
return super().translate_path(path)
path = path.split("?", 1)[0]
path = path.split("#", 1)[0]
# Don't forget explicit trailing slash when normalizing. Issue17324
trailing_slash = path.rstrip().endswith("/")
try:
path = urllib.parse.unquote(path, errors="surrogatepass")
except UnicodeDecodeError:
path = urllib.parse.unquote(path)
path = posixpath.normpath(path)
words = path.split("/")
words = filter(None, words)
path = self.directory
for word in words:
if os.path.dirname(word) or word in (os.curdir, os.pardir):
# Ignore components that are not a simple file/directory name
continue
path = os.path.join(path, word)
if trailing_slash:
path += "/"
return path
def end_headers(self):
# RangeRequestHandler only sends Accept-Ranges header if Range header
# is present, see https://github.com/danvk/RangeHTTPServer/issues/23