Browse Source

env: downgrade importlib-metadata to fix pipeline on python3.5

Fabian Peter Hammerle 3 years ago
parent
commit
3e663f9ea6
3 changed files with 9 additions and 12 deletions
  1. 0 6
      .travis.yml
  2. 5 2
      Pipfile
  3. 4 4
      Pipfile.lock

+ 0 - 6
.travis.yml

@@ -63,12 +63,6 @@ matrix:
 install:
 - pip install pipenv
 - pipenv sync --dev
-# ModuleNotFoundError: No module named 'importlib_metadata'
-# https://github.com/WanzenBug/pylint-import-requirements/issues/17
-- if python3 -c 'import sys; sys.exit(sys.version_info < (3, 8))'; then
-  pipenv graph;
-  pipenv install --dev importlib-metadata;
-  fi
 - if [ ! -z "$PANDAS_VERSION" ]; then
     pipenv install --selective-upgrade "pandas==$PANDAS_VERSION";
   fi

+ 5 - 2
Pipfile

@@ -23,8 +23,11 @@ pylint-import-requirements = "*"
 pytest-cov = ">=2"
 
 # python3.5 compatibility
-# https://github.com/python/importlib_metadata/commit/107f9029fd5807c6579b881db19e11a0488f0675
-importlib-metadata = "<3"
+# <2 for:
+# > pkg_resources.VersionConflict: (importlib-metadata 2.1.1 (/home/travis/virtualenv/python3.5.10/lib/python3.5/site-packages),
+# > Requirement.parse('importlib-metadata<2,>=0.12; python_version < "3.8"'))
+# <3 for "python_requires" https://github.com/python/importlib_metadata/commit/107f9029fd5807c6579b881db19e11a0488f0675
+importlib-metadata = "<2,<3"
 isort = "<5"
 # workaround https://github.com/pytest-dev/pytest/issues/3953
 pathlib2 = {version = "*", markers="python_version < '3.6'"}

+ 4 - 4
Pipfile.lock

@@ -1,7 +1,7 @@
 {
     "_meta": {
         "hash": {
-            "sha256": "9fae07f731861853061c91db0bb0955831174cac5c29d9e931815854eb295f62"
+            "sha256": "3693943ee1b58ac4b5bb25343e1ffbb75dfd4986cb20cd5160649d407410f0aa"
         },
         "pipfile-spec": 6,
         "requires": {
@@ -150,11 +150,11 @@
         },
         "importlib-metadata": {
             "hashes": [
-                "sha256:b8de9eff2b35fb037368f28a7df1df4e6436f578fa74423505b6c6a778d5b5dd",
-                "sha256:c2d6341ff566f609e89a2acb2db190e5e1d23d5409d6cc8d2fe34d72443876d4"
+                "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83",
+                "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"
             ],
             "index": "pypi",
-            "version": "==2.1.1"
+            "version": "==1.7.0"
         },
         "iniconfig": {
             "hashes": [