Drop Python 3.5 support (#3792)

* drop python 3.5 support

* dvc: remove fspath() use inside os.path calls

* dvc: replace dvc.compat.fspath with os.fspath

* tests: replace dvc.compat.fspath with os.fspath

* utils: relpath() should use fspath/str

* utils: os.readlink doesn't support path-like obj on Windows until 3.8
This commit is contained in:
Peter Rowlands (변기호)
2020-05-14 01:46:42 +03:00
committed by GitHub
parent 3916d4fa07
commit 833e82a7ea
45 changed files with 268 additions and 358 deletions
+4 -5
View File
@@ -9,7 +9,6 @@ import pytest
from flaky.flaky_decorator import flaky
from dvc.cache import NamedCache
from dvc.compat import fspath
from dvc.data_cloud import DataCloud
from dvc.external_repo import clean_repos
from dvc.main import main
@@ -725,8 +724,8 @@ def test_pull_git_imports(request, tmp_dir, dvc, scm, erepo):
erepo.scm_gen({"dir": {"bar": "bar"}}, commit="second")
erepo.scm_gen("foo", "foo", commit="first")
dvc.imp(fspath(erepo), "foo")
dvc.imp(fspath(erepo), "dir", out="new_dir", rev="HEAD~")
dvc.imp(os.fspath(erepo), "foo")
dvc.imp(os.fspath(erepo), "dir", out="new_dir", rev="HEAD~")
assert dvc.pull()["fetched"] == 0
@@ -752,8 +751,8 @@ def test_pull_external_dvc_imports(tmp_dir, dvc, scm, erepo_dir):
os.remove("foo")
shutil.rmtree("dir")
dvc.imp(fspath(erepo_dir), "foo")
dvc.imp(fspath(erepo_dir), "dir", out="new_dir", rev="HEAD~")
dvc.imp(os.fspath(erepo_dir), "foo")
dvc.imp(os.fspath(erepo_dir), "dir", out="new_dir", rev="HEAD~")
assert dvc.pull()["fetched"] == 0