Unstuck upload to pypi step
When releasing packages (e.g, loader.git [3], lister [4]), the step fails on a dependency of requests toolbet [1].
When building locally the image, i see a "warning" message about urllib3 at the wrong version, which may explain the import problem the build faces [2].
[1]
11:55:05 ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/home/jenkins/.local/lib/python3.7/site-packages/urllib3/contrib/__init__.py)
[2] (with the other deps just in case it's helpful)
11:55:05 + python3 -m twine upload --verbose --repository-url https://upload.pypi.org/legacy/ dist/****.lister-5.3.0-py3-none-any.whl dist/****.lister-5.3.0.tar.gz
11:55:05 /home/jenkins/.local/lib/python3.7/site-packages/requests/__init__.py:114: RequestsDependencyWarning: urllib3 (2.0.1) or chardet (5.1.0)/charset_normalizer (3.1.0) doesn't match a supported version!
11:55:05 RequestsDependencyWarning,
11:55:05 Traceback (most recent call last):
11:55:05 File "/home/jenkins/.local/lib/python3.7/site-packages/requests_toolbelt/_compat.py", line 48, in <module>
11:55:05 from requests.packages.urllib3.contrib import appengine as gaecontrib
11:55:05 ImportError: cannot import name 'appengine' from 'requests.packages.urllib3.contrib' (/home/jenkins/.local/lib/python3.7/site-packages/urllib3/contrib/__init__.py)
...
requests 2.29.0 has requirement urllib3<1.27,>=1.21.1, but you'll have urllib3 2.0.1 which is incompatible.
...
Installing collected packages: pip, setuptools, wheel, charset-normalizer, certifi, idna, urllib3, requests, requests-toolbelt, pkginfo, pygments, mdurl, typing-extensions, markdown-it-py, rich, rfc3986, webencodings, bleach, docutils, readme-renderer, zipp, importlib-metadata, twine, platformdirs, chardet, colorama, tomli, cachetools, filelock, packaging, pyproject-api, pluggy, distlib, virtualenv, tox, mando, Radon, lazy-object-proxy, typed-ast, wrapt, astroid, isort, dill, tomlkit, mccabe, pylint, coverage, codespell, click, beaker, smmap, gitdb, gitpython, phabricator, humanize, pyarcanist, identify, pyyaml, cfgv, nodeenv, pre-commit
Successfully installed Radon-6.0.1 astroid-2.15.4 beaker-1.12.1 bleach-6.0.0 cachetools-5.3.0 certifi-2022.12.7 cfgv-3.3.1 chardet-5.1.0 charset-normalizer-3.1.0 click-8.1.3 codespell-2.2.4 colorama-0.4.6 coverage-7.2.5 dill-0.3.6 distlib-0.3.6 docutils-0.19 filelock-3.12.0 gitdb-4.0.10 gitpython-3.1.31 humanize-4.6.0 identify-2.5.23 idna-3.4 importlib-metadata-6.6.0 isort-5.11.5 lazy-object-proxy-1.9.0 mando-0.7.1 markdown-it-py-2.2.0 mccabe-0.7.0 mdurl-0.1.2 nodeenv-1.7.0 packaging-23.1 phabricator-0.9.1 pip-23.1.2 pkginfo-1.9.6 platformdirs-3.5.0 pluggy-1.0.0 pre-commit-2.21.0 pyarcanist-0.0.1 pygments-2.15.1 pylint-2.17.3 pyproject-api-1.5.1 pyyaml-6.0 readme-renderer-37.3 requests-2.29.0 requests-toolbelt-1.0.0 rfc3986-2.0.0 rich-13.3.5 setuptools-67.7.2 smmap-5.0.0 tomli-2.0.1 tomlkit-0.11.8 tox-4.5.1 twine-4.0.2 typed-ast-1.5.4 typing-extensions-4.5.0 urllib3-2.0.1 virtualenv-20.23.0 webencodings-0.5.1 wheel-0.40.0 wrapt-1.15.0 zipp-3.15.0
[3] https://jenkins.softwareheritage.org/job/DLS/job/pypi-upload/115/console
[4] https://jenkins.softwareheritage.org/job/DLDG/job/pypi-upload/64/console
Refs. #4869 (closed)
Refs. #4868 (closed)
Edited by Antoine R. Dumont