From 9fe944cdd3e6d089e5f757186aa15bfed682d5e7 Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Wed, 4 Oct 2023 12:35:54 +0200 Subject: [PATCH 1/3] Drop support for Python 3.7 Python 3.7 went EOL on 2023-06-27. --- .github/workflows/tests.yml | 4 ++-- .python-version | 1 + CHANGELOG.rst | 2 +- requirements.txt | 10 +++++++++- setup.py | 2 +- 5 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .python-version diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f58d63..5bd12c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -58,4 +58,4 @@ jobs: run: | python -m pip install build twine python -m build - twine check dist/* \ No newline at end of file + twine check dist/* diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..cc1923a --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.8 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fb3d12b..18903aa 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,7 +2,7 @@ Unreleased ---------- - Add official support for Python 3.10 and 3.11. -- Drop support for Python 3.6 +- Drop support for Python 3.6 and 3.7. 0.6.0 ----- diff --git a/requirements.txt b/requirements.txt index bf0706b..df1fd14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.7 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # pip-compile --no-emit-index-url @@ -69,6 +69,8 @@ idna==3.3 # yarl imagesize==1.4.1 # via sphinx +importlib-metadata==6.8.0 + # via sphinx iniconfig==1.1.1 # via pytest itsdangerous==2.1.2 @@ -152,6 +154,8 @@ requests==2.31.0 # sphinx ruamel-yaml==0.17.21 # via devpi-server +ruamel-yaml-clib==0.2.8 + # via ruamel-yaml setuptools-scm==6.4.2 # via -r requirements.in six==1.16.0 @@ -181,7 +185,9 @@ toml==0.10.2 # via tox tomli==2.0.1 # via + # build # check-manifest + # coverage # pep517 # pytest # setuptools-scm @@ -207,6 +213,8 @@ webob==1.8.7 # via pyramid yarl==1.8.2 # via aiohttp +zipp==3.17.0 + # via importlib-metadata zope-deprecation==4.4.0 # via pyramid zope-interface==5.4.0 diff --git a/setup.py b/setup.py index 418e7a8..940862c 100644 --- a/setup.py +++ b/setup.py @@ -42,10 +42,10 @@ 'License :: OSI Approved :: BSD License', 'Topic :: System :: Archiving :: Packaging', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], ) From 8e849f5a8b64c02924261d0b9ae1a21d58d1701e Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Wed, 4 Oct 2023 13:05:00 +0200 Subject: [PATCH 2/3] Improve compatibility with newer Devpi Server releases Having dropped Python 3.7 we can test versus newer releases. This showed a minor issue with package name normalisation when listing packages which we could solve. --- devpi_plumber/client.py | 5 +- requirements.txt | 136 +++++++++++++++++++--------------------- 2 files changed, 69 insertions(+), 72 deletions(-) diff --git a/devpi_plumber/client.py b/devpi_plumber/client.py index 997a4bc..280da7a 100644 --- a/devpi_plumber/client.py +++ b/devpi_plumber/client.py @@ -133,7 +133,10 @@ def user_session(self, user, password): def list(self, *args): try: - return self._execute('list', *args).splitlines() + return [ + line for line in self._execute('list', *args).splitlines() + if not line.startswith("*redirected") + ] except DevpiClientError as e: if '404 Not Found' in str(e): return [] diff --git a/requirements.txt b/requirements.txt index df1fd14..cdd7386 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,144 +6,144 @@ # aiohttp==3.8.5 # via devpi-server -aiosignal==1.2.0 +aiosignal==1.3.1 # via aiohttp -alabaster==0.7.12 +alabaster==0.7.13 # via sphinx -argon2-cffi==21.3.0 +argon2-cffi==23.1.0 # via # devpi-server # passlib argon2-cffi-bindings==21.2.0 # via argon2-cffi -async-timeout==4.0.2 +async-timeout==4.0.3 # via aiohttp -attrs==21.4.0 +attrs==23.1.0 # via # aiohttp # devpi-server - # pytest -babel==2.11.0 +babel==2.13.0 # via sphinx -build==0.8.0 - # via check-manifest +build==1.0.3 + # via + # check-manifest + # devpi-client certifi==2023.7.22 # via requests -cffi==1.15.0 +cffi==1.16.0 # via argon2-cffi-bindings -charset-normalizer==2.0.12 +charset-normalizer==3.3.0 # via # aiohttp # requests -check-manifest==0.48 +check-manifest==0.49 # via devpi-client -coverage[toml]==6.4.1 +coverage[toml]==7.3.2 # via pytest-cov defusedxml==0.7.1 # via devpi-server -devpi-client==5.2.3 +devpi-client==6.0.5 # via -r core-requirements.txt -devpi-common==3.6.0 +devpi-common==3.7.2 # via # devpi-client # devpi-server -devpi-server==6.5.1 +devpi-server==6.9.2 # via -r extra-test-requirements.txt -distlib==0.3.4 - # via virtualenv -docutils==0.19 +docutils==0.20.1 # via sphinx -filelock==3.7.1 - # via - # tox - # virtualenv -frozenlist==1.3.3 +exceptiongroup==1.1.3 + # via pytest +frozenlist==1.4.0 # via # aiohttp # aiosignal -hupper==1.10.3 +hupper==1.12 # via pyramid -idna==3.3 +idna==3.4 # via # requests # yarl imagesize==1.4.1 # via sphinx importlib-metadata==6.8.0 - # via sphinx -iniconfig==1.1.1 - # via pytest + # via + # build + # sphinx +iniconfig==2.0.0 + # via + # devpi-client + # pytest itsdangerous==2.1.2 # via devpi-server jinja2==3.1.2 # via sphinx -lazy==1.4 +lazy==1.6 # via # devpi-common # devpi-server -markupsafe==2.1.1 +markupsafe==2.1.3 # via jinja2 -mock==4.0.3 +mock==5.1.0 # via -r requirements.in -multidict==6.0.2 +multidict==6.0.4 # via # aiohttp # yarl packaging==21.3 # via # build + # devpi-common # pytest # setuptools-scm # sphinx - # tox passlib[argon2]==1.7.4 # via devpi-server -pastedeploy==2.1.1 +pastedeploy==3.0.1 # via plaster-pastedeploy -pep517==0.12.0 - # via build -pkginfo==1.8.2 +pep517==0.13.0 + # via devpi-client +pkginfo==1.9.6 # via devpi-client -plaster==1.0 +plaster==1.1.2 # via # plaster-pastedeploy # pyramid -plaster-pastedeploy==0.7 +plaster-pastedeploy==1.0.1 # via pyramid -platformdirs==2.5.2 +platformdirs==3.11.0 # via + # devpi-client # devpi-server - # virtualenv -pluggy==1.0.0 +pluggy==1.3.0 # via # devpi-client # devpi-server # pytest - # tox py==1.11.0 # via # devpi-client # devpi-common # devpi-server - # pytest - # tox pycparser==2.21 # via cffi -pygments==2.15.0 +pygments==2.16.1 # via sphinx -pyparsing==3.0.9 +pyparsing==3.1.1 # via packaging +pyproject-hooks==1.0.0 + # via build pyramid==2.0.2 # via devpi-server -pytest==7.1.2 +pytest==7.4.2 # via # -r requirements.in # pytest-cov -pytest-cov==3.0.0 +pytest-cov==4.1.0 # via -r requirements.in python-dateutil==2.8.2 # via strictyaml -pytz==2022.6 +pytz==2023.3.post1 # via babel repoze-lru==0.7 # via devpi-server @@ -152,26 +152,23 @@ requests==2.31.0 # -r core-requirements.txt # devpi-common # sphinx -ruamel-yaml==0.17.21 +ruamel-yaml==0.17.35 # via devpi-server ruamel-yaml-clib==0.2.8 # via ruamel-yaml -setuptools-scm==6.4.2 +setuptools-scm==8.0.4 # via -r requirements.in six==1.16.0 - # via - # python-dateutil - # tox - # virtualenv + # via python-dateutil snowballstemmer==2.2.0 # via sphinx -sphinx==5.3.0 +sphinx==7.1.2 # via -r requirements.in -sphinxcontrib-applehelp==1.0.2 +sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 # via sphinx -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx @@ -179,20 +176,17 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -strictyaml==1.6.1 +strictyaml==1.7.3 # via devpi-server -toml==0.10.2 - # via tox tomli==2.0.1 # via # build # check-manifest # coverage # pep517 + # pyproject-hooks # pytest # setuptools-scm -tox==3.25.0 - # via devpi-client translationstring==1.4 # via pyramid twitter-common-contextutil==0.3.11 @@ -201,23 +195,23 @@ twitter-common-dirutil==0.3.11 # via twitter-common-contextutil twitter-common-lang==0.3.11 # via twitter-common-dirutil -urllib3==1.26.17 +typing-extensions==4.8.0 + # via setuptools-scm +urllib3==2.0.6 # via requests venusian==3.0.0 # via pyramid -virtualenv==20.14.1 - # via tox waitress==2.1.2 # via devpi-server webob==1.8.7 # via pyramid -yarl==1.8.2 +yarl==1.9.2 # via aiohttp zipp==3.17.0 # via importlib-metadata -zope-deprecation==4.4.0 +zope-deprecation==5.0 # via pyramid -zope-interface==5.4.0 +zope-interface==6.0 # via pyramid # The following packages are considered to be unsafe in a requirements file: From 16058b6a26cdb0d422e5422394b283ec302f53ce Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Wed, 4 Oct 2023 14:27:35 +0200 Subject: [PATCH 3/3] !debug --- devpi_plumber/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/devpi_plumber/client.py b/devpi_plumber/client.py index 280da7a..ada7f1e 100644 --- a/devpi_plumber/client.py +++ b/devpi_plumber/client.py @@ -7,6 +7,10 @@ from io import StringIO from urllib.parse import urlsplit, urlunsplit, urljoin +# To avoid issues with setuptools and distutils load order, always explicitly load setuptools +# before loading the Devpi client which relies on it. +import setuptools # noqa F401 + from devpi.main import main as devpi from twitter.common.contextutil import mutable_sys, temporary_dir