Skip to content

Commit

Permalink
Cleaned up pip backtracking
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <[email protected]>
  • Loading branch information
andy-maier committed May 8, 2024
1 parent d017788 commit 35e2298
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 45 deletions.
75 changes: 50 additions & 25 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,33 @@

# Indirect dependencies that must be handled early:

# tox and flake8 have requirements on importlib-metadata
importlib-metadata>=1.1.0,<4.3; python_version <= '3.7'
# importlib-metadata
# importlib.metadata was integrated to standard Python in Python 3.8, so as a
# package it is only needed in Python<=3.7.
# importlib-metadata 5.0 removed interfaces, and in the version integrated to
# Python, that was done in Python 3.12 which integrated importlib-metadata 6.5.
# flake8 4.0/5.0 requires importlib-metadata>=1.1.0,<4.3 on Python<=3.7. flake8
# pins importlib-metadata (at least) because flake8 <6.0 has not yet adjusted
# to the removed interfaces in importlib-metadata 5.0 / Python 3.12.
# virtualenv 20.16.3 started requiring importlib-metadata>=4.8.3
# virtualenv 20.22.0 started requiring importlib-metadata>=6.4.1
importlib-metadata>=2.1.3,<5; python_version == '3.6'
importlib-metadata>=5.0.0; python_version == '3.7'


# Direct dependencies:

# Coverage reporting (no imports, invoked via coveralls script):
coverage>=5.0
# coveralls 3.3.0 pins coverage to <7.0, causing pip backtracking to happen. Pinning
# it to <7.0 in this file saves the time for backtracking, but requires to
# occasionally check for new versions of coveralls without pinning.
coverage>=5.0,<7.0
pytest-cov>=2.7.0
coveralls>=3.3.0

# Safety CI by pyup.io
safety>=2.2.0
# safety 2.3.5 (only) requires packaging>=21.0,<22.0 and causes pip backtracking of tox
safety>=2.2.0,!=2.3.5
# safety 2.2.0 requires dparse>=0.6.2
dparse>=0.6.2

Expand All @@ -37,25 +51,25 @@ PyYAML>=5.3.1

# Tox
# tox 3.17 requires six>=1.14.0 - covered in requirements.txt
# tox 3.21 requires importlib-metadata>=0.12 on py<3.8
# tox 3.21 requires importlib-metadata>=0.12 on Python<=3.7
tox>=3.21.0

# Sphinx (no imports, invoked via sphinx-build script):
# Keep in sync with rtd-requirements.txt

# Sphinx 4.0.0 breaks autodocsumm and needs to be excluded
# Sphinx <4.2.0 fails on Python 3.10 because it tries to import non-existing
# types.Union. This also drives docutils>=0.14.
# Sphinx pins docutils to <0.18 (some versions even to <0.17) but the package
# version resolver in the pip version used on py27 ignores package dependencies
Sphinx>=4.2.0
docutils>=0.16,<0.17
# sphinx-rtd-theme 2.0.0 requires Sphinx>=5,<8
# sphinx 4.0.0,4.0.1 (only) pin Jinja2 to <3.0
# sphinx 4.4.0 started requiring importlib-metadata>=4.4
Sphinx>=4.0.2,<4.4.0; python_version <= '3.7'
Sphinx>=4.0.2; python_version >= '3.8'
docutils>=0.16
sphinx-git>=10.1.1
GitPython>=2.1.1; python_version == '3.6'
GitPython>=3.1.37; python_version >= '3.7'
GitPython>=2.1.1; python_version <= '3.7'
GitPython>=3.1.41; python_version >= '3.8'
sphinxcontrib-fulltoc>=1.2.0
sphinxcontrib-websupport>=1.1.2
Pygments>=2.7.4
Pygments>=2.7.4; python_version <= '3.7'
Pygments>=2.15.0; python_version >= '3.8'
sphinx-rtd-theme>=1.0.0
# Babel 2.7.0 fixes an ImportError for MutableMapping which starts failing on Python 3.10
Babel>=2.9.1
Expand All @@ -65,9 +79,9 @@ Babel>=2.9.1
# Pylint 2.10/ astroid 2.7 addresses issue https://github.com/PyCQA/pylint/issues/4118
# Pylint 2.14 / astroid 2.11 support wrapt 1.14 which is required for Python 3.11, but in addition:
# Pylint 2.15 / astroid 2.12 is needed to circumvent issue https://github.com/PyCQA/pylint/issues/7972 on Python 3.11
pylint>=2.13.0; python_version <= '3.6'
pylint>=2.13.0; python_version == '3.6'
pylint>=2.15.0; python_version >= '3.7'
astroid>=2.11.0; python_version <= '3.6'
astroid>=2.11.0; python_version == '3.6'
astroid>=2.12.4; python_version >= '3.7'
# astroid 2.13.0 uses typing-extensions on Python<3.11 but misses to
# require it on 3.10. See https://github.com/PyCQA/astroid/issues/1942
Expand All @@ -83,22 +97,33 @@ isort>=4.3.8
# Pylint 2.14 uses tomlkit>=0.10.1 and requires py>=3.7
tomlkit>=0.10.1
# dill is used by pylint >=2.13
dill>=0.3.4; python_version <= '3.6'
dill>=0.3.4; python_version == '3.6'
dill>=0.3.6; python_version >= '3.7'
# platformdirs is used by pylint starting with its 2.10
platformdirs>=2.2.0

# Flake8 and dependents (no imports, invoked via flake8 script):
# flake8 4.0.0 fixes an AttributeError on Python 3.10.
# flake8 5.0.4 requires importlib-metadata>=1.1.0,<4.3 on py<3.8
flake8>=4.0.0
mccabe>=0.6.0
pycodestyle>=2.8.0
pyflakes>=2.4.0
# flake8 6.0.0 dropped support for Python<=3.7
# flake8 4.0.0 fixed an AttributeError on Python 3.10
# flake8 4.0/5.0 requires importlib-metadata>=1.1.0,<4.3 on Python<=3.7. flake8
# pins importlib-metadata (at least) because flake8 <6.0 has not yet adjusted
# to the removed interfaces in importlib-metadata 5.0 / Python 3.12.
# flake8 3.9.2 requires pyflakes>=2.3.0,<2.4.0
flake8>=3.8.0,<4.0.0; python_version <= '3.7'
flake8>=3.8.0; python_version >= '3.8' and python_version <= '3.9'
flake8>=4.0.0; python_version >= '3.10'
mccabe>=0.6.0; python_version <= '3.9'
mccabe>=0.7.0; python_version >= '3.10'
pycodestyle>=2.7.0; python_version <= '3.7'
pycodestyle>=2.8.0; python_version >= '3.8' and python_version <= '3.9'
pycodestyle>=2.9.0; python_version >= '3.10'
pyflakes>=2.3.0; python_version <= '3.7'
pyflakes>=2.4.0; python_version >= '3.8' and python_version <= '3.9'
pyflakes>=2.5.0; python_version >= '3.10'
entrypoints>=0.3.0

# Twine (no imports, invoked via twine script):
twine>=1.8.1
twine>=3.0.0
# readme-renderer 23.0 has made cmarkgfm part of extras (it fails on Cygwin)
readme-renderer>=23.0

Expand Down
38 changes: 22 additions & 16 deletions minimum-constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,15 @@ pytest==7.0.0
# Install test direct dependencies:

# virtualenv
virtualenv==20.1.0
virtualenv==20.2.1

# six (used by virtualenv, tox, probably others)
six==1.14.0


# Indirect dependencies for test (must be consistent with test-requirements.txt, if present)

# packaging (used by pytest)
# Packaging 21.0 is required by safety 2.2.0
# packaging (used by pytest, safety)
packaging==21.0

# pluggy (used by pytest, tox)
Expand All @@ -59,7 +58,8 @@ pluggy==0.13.1
# Indirect dependencies that must be handled early (must be consistent with dev-requirements.txt)

# tox and flake8 have requirements on importlib-metadata
importlib-metadata==1.1.0; python_version <= '3.7'
importlib-metadata==2.1.3; python_version == '3.6'
importlib-metadata==5.0.0; python_version == '3.7'


# Direct dependencies for development (must be consistent with dev-requirements.txt)
Expand Down Expand Up @@ -93,37 +93,43 @@ PyYAML==5.3.1
tox==3.21.0

# Sphinx (no imports, invoked via sphinx-build script):
Sphinx==4.2.0
Sphinx==4.0.2
docutils==0.16
sphinx-git==10.1.1
GitPython==2.1.1; python_version == '3.6'
GitPython==3.1.41; python_version >= '3.7'
GitPython==2.1.1; python_version <= '3.7'
GitPython==3.1.41; python_version >= '3.8'
sphinxcontrib-fulltoc==1.2.0
sphinxcontrib-websupport==1.1.2
Pygments==2.7.4; python_version == '3.6'
Pygments==2.15.0; python_version >= '3.7'
Pygments==2.7.4; python_version <= '3.7'
Pygments==2.15.0; python_version >= '3.8'
sphinx-rtd-theme==1.0.0
Babel==2.9.1

# PyLint (no imports, invoked via pylint script) - does not support py3:
pylint==2.13.0; python_version <= '3.6'
pylint==2.13.0; python_version == '3.6'
pylint==2.15.0; python_version >= '3.7'
astroid==2.11.0; python_version <= '3.6'
astroid==2.11.0; python_version == '3.6'
astroid==2.12.4; python_version >= '3.7'
typed-ast==1.4.0; python_version >= '3.6' and python_version <= '3.7' and implementation_name=='cpython'
lazy-object-proxy==1.4.3
wrapt==1.14
isort==4.3.8
tomlkit==0.10.1
dill==0.3.4; python_version <= '3.6'
dill==0.3.4; python_version == '3.6'
dill==0.3.6; python_version >= '3.7'
platformdirs==2.2.0

# Flake8 and dependents (no imports, invoked via flake8 script):
flake8==4.0.0
mccabe==0.6.0
pycodestyle==2.8.0
pyflakes==2.4.0
flake8==3.8.0; python_version <= '3.9'
flake8==4.0.0; python_version >= '3.10'
mccabe==0.6.0; python_version <= '3.9'
mccabe==0.7.0; python_version >= '3.10'
pycodestyle==2.7.0; python_version <= '3.7'
pycodestyle==2.8.0; python_version >= '3.8' and python_version <= '3.9'
pycodestyle==2.9.0; python_version >= '3.10'
pyflakes==2.3.0; python_version <= '3.7'
pyflakes==2.4.0; python_version >= '3.8' and python_version <= '3.9'
pyflakes==2.5.0; python_version >= '3.10'
entrypoints==0.3.0

# Twine (no imports, invoked via twine script):
Expand Down
12 changes: 8 additions & 4 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ pytest>=7.0.0
# Install test direct dependencies:

# virtualenv
# tox 3.21.0 requires virtualenv!=20.0.[0-7],>=16.0.0 and requires py>=3.5
virtualenv>=20.1.0
# virtualenv 20.18.0 dropped support for Python 3.6
# virtualenv 20.16.3 started requiring importlib-metadata>=4.8.3, but
# flake8 4.0/5.0 requires importlib-metadata>=1.1.0,<4.3 on Python<=3.7
# virtualenv 20.2.1 started removing the prior pinning of importlib-metadata to <3
# tox 3.21.0 requires virtualenv!=20.0.[0-7],>=16.0.0 and requires Python >=3.5
virtualenv>=20.2.1,<20.16.3; python_version == '3.6'
virtualenv>=20.2.1; python_version >= '3.7'

# six (also used by virtualenv, tox, probably others)
# virtualenv 20.0 requires six>=1.12.0 on py>=3.8
Expand All @@ -29,8 +34,7 @@ six>=1.14.0
# Indirect dependencies with special constraints:

# packaging (used by pytest)
# safety 2.3.5 started pinning packaging to <22.0 and requires >=21.0
packaging>=21.0,<22.0
packaging>=21.0

# pluggy (used by pytest, tox)
# Pluggy 0.12.0 has a bug causing pytest plugins to fail loading on py38
Expand Down

0 comments on commit 35e2298

Please sign in to comment.