Skip to content

Commit

Permalink
Fixed dependency error with importlib-metadata on Python 3.8
Browse files Browse the repository at this point in the history
Details:

* Since today, virtualenv failed with:
    AttributeError: 'Context' object has no attribute 'pattern'
  causing the installtest to fail.

  It turned out that uninstalling the importlib-metadata package solved the
  problem. That package was stated in our requirements files to be needed by
  tox 3.14 on Python <= 3.8. However, on Python 3.8 it is already in the base
  Python and not needed as a package. Uninstalling importlib-metadata solved
  the problem. It turned out that tox 3.x requires importlib-metadata only on
  Python < 3.8. It is not clear why this error showed up only starting today.
  Searching for packages released today (2021-07-18) did not reveal anything.

  This change fixes the problem by changing python_version <= '3.8' to < '3.8'
  on importlib-metadata inthe requirements files.

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
  • Loading branch information
andy-maier committed Jul 18, 2021
1 parent 88ec4c4 commit 2742a43
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ PyYAML>=5.3.1; python_version > '3.4'
# Tox
tox>=2.5.0
# tox 3.17 requires six>=1.14.0 - covered in test-requirements.txt
# tox 3.14 requires importlib-metadata<1,>=0.12 on py<=3.8
importlib-metadata<1,>=0.12; python_version <= '3.8'
# tox 3.14 requires importlib-metadata<1,>=0.12 on py<3.8
importlib-metadata<1,>=0.12; python_version < '3.8'

# Sphinx (no imports, invoked via sphinx-build script):
# Keep in sync with rtd-requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Released: not yet

* Fixed issues raised by new Pylint 2.9.

* Fixed a dependency error that caused importlib-metadata to be installed on
Python 3.8, while it is included in the Python base.

**Enhancements:**

**Cleanup:**
Expand Down
4 changes: 2 additions & 2 deletions minimum-constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ PyYAML==5.3.1; python_version >= '3.5'
# Tox
tox==2.5.0
# tox 3.17 requires six>=1.14.0
# tox 3.14 requires importlib-metadata<1,>=0.12 on py<=3.8
importlib-metadata==0.12; python_version <= '3.8'
# tox 3.14 requires importlib-metadata<1,>=0.12 on py<3.8
importlib-metadata==0.12; python_version < '3.8'

# Sphinx (no imports, invoked via sphinx-build script):
Sphinx==1.7.6
Expand Down

0 comments on commit 2742a43

Please sign in to comment.