[go: up one dir, main page]

Skip to content

test suite fails since Python 3.8

It's not clear to me what happened, but the test suite started failing recently in Python 3.8 containers and later. This job, from January 2024, was fine:

https://gitlab.com/anarcat/feed2exec/-/jobs/5952429711

but that job, triggered in April 2024, wasn't:

https://gitlab.com/anarcat/feed2exec/-/jobs/6606489328

Nothing meaningful changed between the two job: there was a one-line change to the README file in 08386af9 that is unrelated to the failure.

I think the issue is pytest was upgraded, from 7.4 to 8.1. Here's a copy of the log of the working copy:

[...]
Successfully installed cachetools-5.3.2 chardet-5.2.0 colorama-0.4.6 distlib-0.3.8 filelock-3.13.1 packaging-23.2 platformdirs-4.1.0 pluggy-1.3.0 pyproject-api-1.6.1 tomli-2.0.1 tox-4.12.1 virtualenv-20.25.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[notice] A new release of pip is available: 23.0.1 -> 23.3.2
[notice] To update, run: pip install --upgrade pip
$ tox
py: install_deps> python -I -m pip install -r requirements.txt -r requirements-test.txt
.pkg: install_requires> python -I -m pip install 'setuptools>=45' 'setuptools_scm>=6.2' wheel
.pkg: _optional_hooks> python /usr/local/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /usr/local/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_wheel> python /usr/local/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: freeze> python -m pip freeze --all
.pkg: packaging==23.2,pip==23.3.1,setuptools==69.0.2,setuptools-scm==8.0.4,tomli==2.0.1,typing_extensions==4.9.0,wheel==0.42.0
.pkg: prepare_metadata_for_build_wheel> python /usr/local/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /usr/local/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
py: install_package_deps> python -I -m pip install cachecontrol click dateparser 'feedparser<6.0; python_version < "3.6"' 'feedparser>=5.0; python_version >= "3"' 'feedparser>=6.0.0b3; python_version >= "3.6"' html2text html5lib lxml pyxdg requests requests-file setuptools-scm unidecode
py: install_package> python -I -m pip install --force-reinstall --no-deps /builds/anarcat/feed2exec/.tox/.tmp/package/1/feed2exec-0.21.0.tar.gz
py: freeze> python -m pip freeze --all
py: backports.zoneinfo==0.2.1,betamax==0.8.1,CacheControl==0.13.1,cachetools==5.3.2,certifi==2023.11.17,chardet==5.2.0,charset-normalizer==3.3.2,click==8.1.7,colorama==0.4.6,coverage==7.4.0,dateparser==1.2.0,distlib==0.3.8,exceptiongroup==1.2.0,feed2exec @ file:///builds/anarcat/feed2exec/.tox/.tmp/package/1/feed2exec-0.21.0.tar.gz#sha256=e66edb6c01343c3f68a18bf74b70fcf3f0e48302bcf3ac05c4a439532612081b,feedparser==6.0.11,filelock==3.13.1,html2text==2020.1.16,html5lib==1.1,idna==3.6,iniconfig==2.0.0,lxml==5.1.0,msgpack==1.0.7,packaging==23.2,pip==23.3.1,platformdirs==4.1.0,pluggy==1.3.0,pyflakes==3.2.0,pyproject-api==1.6.1,pytest==7.4.4,pytest-cov==4.1.0,python-dateutil==2.8.2,pytz==2023.3.post1,pyxdg==0.28,regex==2023.12.25,requests==2.31.0,requests-file==1.5.1,setuptools==69.0.2,setuptools-scm==8.0.4,sgmllib3k==1.0.0,six==1.16.0,tomli==2.0.1,tox==4.12.1,typing_extensions==4.9.0,tzlocal==5.2,Unidecode==1.3.8,urllib3==2.1.0,virtualenv==20.25.0,webencodings==0.5.1,wheel==0.42.0
py: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.4, pluggy-1.3.0
cachedir: .tox/py/.pytest_cache
rootdir: /builds/anarcat/feed2exec
configfile: setup.cfg
plugins: betamax-0.8.1, cov-4.1.0
[...]

... and the broken run:

Successfully installed cachetools-5.3.3 chardet-5.2.0 colorama-0.4.6 distlib-0.3.8 filelock-3.13.4 packaging-24.0 platformdirs-4.2.0 pluggy-1.4.0 pyproject-api-1.6.1 tomli-2.0.1 tox-4.14.2 virtualenv-20.25.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
$ tox
py: install_deps> python -I -m pip install -r requirements.txt -r requirements-test.txt
.pkg: install_requires> python -I -m pip install 'setuptools>=45' 'setuptools_scm>=6.2' wheel
.pkg: _optional_hooks> python /usr/local/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /usr/local/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_wheel> python /usr/local/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: freeze> python -m pip freeze --all
.pkg: packaging==24.0,pip==24.0,setuptools==69.1.0,setuptools-scm==8.0.4,tomli==2.0.1,typing_extensions==4.11.0,wheel==0.42.0
.pkg: prepare_metadata_for_build_wheel> python /usr/local/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /usr/local/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
py: install_package_deps> python -I -m pip install cachecontrol click dateparser 'feedparser<6.0; python_version < "3.6"' 'feedparser>=5.0; python_version >= "3"' 'feedparser>=6.0.0b3; python_version >= "3.6"' html2text html5lib lxml pyxdg requests requests-file setuptools-scm unidecode
py: install_package> python -I -m pip install --force-reinstall --no-deps /builds/anarcat/feed2exec/.tox/.tmp/package/1/feed2exec-0.21.1.dev1+g08386af.tar.gz
py: freeze> python -m pip freeze --all
py: backports.zoneinfo==0.2.1,betamax==0.9.0,CacheControl==0.14.0,cachetools==5.3.3,certifi==2024.2.2,chardet==5.2.0,charset-normalizer==3.3.2,click==8.1.7,colorama==0.4.6,coverage==7.4.4,dateparser==1.2.0,distlib==0.3.8,exceptiongroup==1.2.0,feed2exec @ file:///builds/anarcat/feed2exec/.tox/.tmp/package/1/feed2exec-0.21.1.dev1%2Bg08386af.tar.gz#sha256=9245ad61d803e96f51af125c682e11409e1ba648919dba1cf3ce2ae0154b6a2a,feedparser==6.0.11,filelock==3.13.4,html2text==2024.2.26,html5lib==1.1,idna==3.7,iniconfig==2.0.0,lxml==5.2.1,msgpack==1.0.8,packaging==24.0,pip==24.0,platformdirs==4.2.0,pluggy==1.4.0,pyflakes==3.2.0,pyproject-api==1.6.1,pytest==8.1.1,pytest-cov==5.0.0,python-dateutil==2.9.0.post0,pytz==2024.1,pyxdg==0.28,regex==2023.12.25,requests==2.31.0,requests-file==2.0.0,setuptools==69.1.0,setuptools-scm==8.0.4,sgmllib3k==1.0.0,six==1.16.0,tomli==2.0.1,tox==4.14.2,typing_extensions==4.11.0,tzlocal==5.2,Unidecode==1.3.8,urllib3==2.2.1,virtualenv==20.25.1,webencodings==0.5.1,wheel==0.42.0
py: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.8.19, pytest-8.1.1, pluggy-1.4.0
cachedir: .tox/py/.pytest_cache
rootdir: /builds/anarcat/feed2exec
configfile: setup.cfg
plugins: cov-5.0.0, betamax-0.9.0

I can also reproduce the issue locally, in Debian's 8.1.1 Pytest, but only inside tox: if i run pytest-3 directly, it works fine.