Repository: iterative/dvc

Issue:
support python 3.8
It is officially released, but we are waiting for [pyarrow](https://pypi.org/project/pyarrow/#files) to release their wheels ([issue](https://issues.apache.org/jira/projects/ARROW/issues/ARROW-6955?filter=allopenissues)).

There's still some other projects that are not supporting Python 3.8 -- https://pyreadiness.org/3.8/


Discussion:
Related https://github.com/iterative/dvc/pull/2912

Resolving patch:
diff --git a/dvc/system.py b/dvc/system.py
--- a/dvc/system.py
+++ b/dvc/system.py
@@ -3,13 +3,14 @@
 import os
 import platform
 import shutil
+import sys
 
 from dvc.compat import fspath
 from dvc.exceptions import DvcException
 
 logger = logging.getLogger(__name__)
 
-if platform.system() == "Windows":
+if platform.system() == "Windows" and sys.version_info < (3, 8):
     try:
         import speedcopy
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -74,7 +74,7 @@ def run(self):
     "pywin32>=225; sys_platform == 'win32'",
     "networkx>=2.1,<2.4",
     "pydot>=1.2.4",
-    "speedcopy>=2.0.1; sys_platform == 'win32'",
+    "speedcopy>=2.0.1; python_version < '3.8' and sys_platform == 'win32'",
     "flatten_json>=0.1.6",
     "texttable>=0.5.2",
     "pygtrie==2.3.2",
@@ -89,7 +89,12 @@ def run(self):
 azure = ["azure-storage-blob==2.1.0"]
 oss = ["oss2==2.6.1"]
 ssh = ["paramiko>=2.5.0"]
-hdfs = ["pyarrow==0.15.1"]
+hdfs = [
+    # pyarrow-0.16.0 import fails on 3.5 and 3.7 (works on 3.6 though)
+    # due to: https://issues.apache.org/jira/browse/ARROW-7852
+    "pyarrow==0.15.1; python_version < '3.8'",
+    "pyarrow==0.16.0; python_version == '3.8'",
+]
 # gssapi should not be included in all_remotes, because it doesn't have wheels
 # for linux and mac, so it will fail to compile if user doesn't have all the
 # requirements, including kerberos itself. Once all the wheels are available,
@@ -157,6 +162,7 @@ def run(self):
         "Programming Language :: Python :: 3.5",
         "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: 3.8",
     ],
     packages=find_packages(exclude=["tests"]),
     include_package_data=True,


Test patch:
diff --git a/tests/func/test_checkout.py b/tests/func/test_checkout.py
--- a/tests/func/test_checkout.py
+++ b/tests/func/test_checkout.py
@@ -436,10 +436,10 @@ def test(self):
         self.assertEqual(ret, 0)
 
         self.assertTrue(System.is_symlink(self.FOO))
-        old_foo_link = os.readlink(self.FOO)
+        old_foo_link = os.path.realpath(self.FOO)
 
         self.assertTrue(System.is_symlink(self.DATA))
-        old_data_link = os.readlink(self.DATA)
+        old_data_link = os.path.realpath(self.DATA)
 
         old_cache_dir = self.dvc.cache.local.cache_dir
         new_cache_dir = old_cache_dir + "_new"
@@ -452,10 +452,10 @@ def test(self):
         self.assertEqual(ret, 0)
 
         self.assertTrue(System.is_symlink(self.FOO))
-        new_foo_link = os.readlink(self.FOO)
+        new_foo_link = os.path.realpath(self.FOO)
 
         self.assertTrue(System.is_symlink(self.DATA))
-        new_data_link = os.readlink(self.DATA)
+        new_data_link = os.path.realpath(self.DATA)
 
         self.assertEqual(
             relpath(old_foo_link, old_cache_dir),