Drop support for python2.7 and 3.4(EOL) 14/62114/3
authorAric Gardner <agardner@linuxfoundation.org>
Wed, 30 Oct 2019 16:20:00 +0000 (12:20 -0400)
committerAric Gardner <agardner@linuxfoundation.org>
Mon, 11 Nov 2019 18:59:53 +0000 (18:59 +0000)
Drop support for python2.7 and python3.4(EOL)
lftools now requires python >= 3.6 This allows us to remove
remaining pins, and to move from glob2 to builtin glob

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I48ffc27376e3a7b56f0627e8eaeb9ac3dff908dc

.coafile
lftools/deploy.py
releasenotes/notes/lftools-python-85ad1e90d01c51fb.yaml [new file with mode: 0644]
requirements.txt

index be307c4..642cfe3 100644 (file)
--- a/.coafile
+++ b/.coafile
@@ -37,7 +37,6 @@ known_first_party_imports = lftools
 known_third_party_imports =
     defusedxml,
     email_validator,
-    glob2,
     httplib2,
     jenkins,
     jsonschema,
index 9e2fa2d..ea56bed 100755 (executable)
@@ -26,7 +26,7 @@ import tempfile
 import zipfile
 
 from defusedxml.minidom import parseString
-import glob2  # Switch to glob when Python < 3.5 support is dropped
+import glob
 import requests
 import six
 
@@ -47,7 +47,7 @@ def _compress_text(dir):
     paths = []
     for _type in compress_types:
         search = os.path.join(dir, _type)
-        paths.extend(glob2.glob(search, recursive=True))
+        paths.extend(glob.glob(search, recursive=True))
 
     for _file in paths:
         with open(_file, 'rb') as src, gzip.open('{}.gz'.format(_file), 'wb') as dest:
@@ -253,7 +253,7 @@ def copy_archives(workspace, pattern=None):
             continue
 
         search = os.path.join(workspace, p)
-        paths.extend(glob2.glob(search, recursive=True))
+        paths.extend(glob.glob(search, recursive=True))
     log.debug('Files found: {}'.format(paths))
 
     no_dups_paths = _remove_duplicates_and_sort(paths)
@@ -635,7 +635,7 @@ def deploy_nexus(nexus_repo_url, deploy_dir, snapshot=False):
     file_list = []
     previous_dir = os.getcwd()
     os.chdir(deploy_dir)
-    files = glob2.glob('**/*')
+    files = glob.glob('**/*', recursive=True)
     for file in files:
         if os.path.isfile(file):
             base_name = os.path.basename(file)
diff --git a/releasenotes/notes/lftools-python-85ad1e90d01c51fb.yaml b/releasenotes/notes/lftools-python-85ad1e90d01c51fb.yaml
new file mode 100644 (file)
index 0000000..448ad87
--- /dev/null
@@ -0,0 +1,6 @@
+---
+upgrade:
+  - |
+    Drop support for python2.7 and python3.4(EOL)
+    lftools now requires python >= 3.6 This allows us to remove
+    remaining pins, and to move from glob2 to builtin glob
index 6495603..8923e6c 100644 (file)
@@ -1,6 +1,5 @@
 click
 docker
-glob2  # Needed for Python < 3.5 recursive glob support
 defusedxml # Needed due to tox complains on parseString not safe
 jsonschema
 requests
@@ -9,7 +8,7 @@ setuptools>=36.5.0
 six
 python-jenkins
 tqdm
-xdg~=3.0.0;python_version>='3' # xdg requires Python '>=3.6,<4.0' but the running Python is 3.5.7
+xdg
 pygithub
 httplib2
 email_validator