Skip to content

Commit 8e4a7ed

Browse files
committed
Fixed issues with importlib-metadata and flake8
Details: * Fixed a flake8 AttributeError when using importlib-metadata 5.0.0 on Python >=3.7, by pinning importlib-metadata to <5.0.0 on these Python versions. * Added minimum version of importlib-metadata==1.1.0 on Python >=3.8. Signed-off-by: Andreas Maier <[email protected]>
1 parent 57c6f8b commit 8e4a7ed

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

dev-requirements.txt

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ pluggy>=0.13.0
2323
# colorama 0.4.0 removed support for Python 3.4
2424
colorama>=0.3.9,<0.4.0; python_version <= '3.4'
2525
colorama>=0.4.0; python_version >= '3.5'
26+
# flake8 fails with AttributeError in importlib-metadata 5.0.0 on Python >=3.7
27+
# tox 3.14 requires importlib-metadata<1,>=0.12 on Python <=3.7
28+
importlib-metadata>=0.22,<5.0.0; python_version <= '3.7'
29+
importlib-metadata>=1.1.0; python_version >= '3.8'
2630

2731
# more-itertools version 8.11 requires python 3.6, See issue #2796
2832
more-itertools>=4.0.0,!=8.11.0; python_version < '3.6'

docs/changes.rst

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ Released: not yet
3030
* Fixed issue that causes failure of tests with pwbem 1.5.0 because of
3131
CIMInstanceName host attribute. (see issue #1203)
3232

33+
* Fixed a flake8 AttributeError when using importlib-metadata 5.0.0 on
34+
Python>=3.7, by pinning importlib-metadata to <5.0.0 on these Python versions.
35+
3336
**Enhancements:**
3437

3538
**Cleanup:**

minimum-constraints.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ pluggy==0.13.0
162162
funcsigs==1.0.2; python_version == '2.7'
163163
colorama==0.3.9; python_version <= '3.4'
164164
colorama==0.4.0; python_version >= '3.5'
165+
importlib-metadata==0.22; python_version <= '3.7'
166+
importlib-metadata==1.1.0; python_version >= '3.8'
165167

166168
# Coverage reporting (no imports, invoked via coveralls script):
167169
# We exclude Python 3.4 from coverage testing and reporting.
@@ -180,8 +182,6 @@ dparse==0.5.2; python_version >= '3.5'
180182
# Tox
181183
tox==2.5.0
182184
# tox 3.17 requires six>=1.14.0
183-
# tox 3.14 requires importlib-metadata<1,>=0.12 on py<3.8
184-
importlib-metadata==0.12; python_version <= '3.7'
185185

186186
# Sphinx (no imports, invoked via sphinx-build script):
187187
Sphinx==1.7.6; python_version <= '3.4'
@@ -286,7 +286,6 @@ gitdb2==2.0.0
286286
html5lib==0.999999999
287287
idna==2.5
288288
imagesize==0.7.1
289-
importlib-metadata==0.12
290289
isort==4.3.5
291290
Jinja2==2.8.1; python_version <= '3.9'
292291
Jinja2==2.10.2; python_version >= '3.10'

0 commit comments

Comments
 (0)