Source: python-test-server
Version: 0.0.40-1
Severity: normal
Tags: fixed-upstream
User: debian-pyt...@lists.debian.org
Usertags: python3.13
Forwarded: 
https://github.com/lorien/test_server/commit/4c57f9ffc93197a1297e0066ffdff2ad041da432

This package failed build from source when test-built against a version of
python3-defaults that includes 3.13 as a supported version.

To reproduce this issue, build against python3-defaults (python3-all-dev etc.)
from Debian experimental.

What's new in Python 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html
The cgi module was removed in 3.13, upstream seems to have fixed this in
>= 0.41.

Log snippet:

   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_test-server/build; python3.13 -m pytest 
tests
============================= test session starts ==============================
platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_test-server/build
configfile: pytest.ini
plugins: typeguard-4.3.0, cov-5.0.0
collected 2 items / 3 errors

==================================== ERRORS ====================================
_______________ ERROR collecting tests/test_httpheaderstorage.py _______________
ImportError while importing test module 
'/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_test-server/build/tests/test_httpheaderstorage.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_httpheaderstorage.py:3: in <module>
    from test_server.structure import HttpHeaderStorage
test_server/__init__.py:1: in <module>
    from test_server.server import *  # noqa pylint: disable=wildcard-import
test_server/server.py:6: in <module>
    import cgi
E   ModuleNotFoundError: No module named 'cgi'
____________________ ERROR collecting tests/test_server.py _____________________
ImportError while importing test module 
'/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_test-server/build/tests/test_server.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_server.py:12: in <module>
    from test_server import (
test_server/__init__.py:1: in <module>
    from test_server.server import *  # noqa pylint: disable=wildcard-import
test_server/server.py:6: in <module>
    import cgi
E   ModuleNotFoundError: No module named 'cgi'
________________________ ERROR collecting tests/util.py ________________________
ImportError while importing test module 
'/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_test-server/build/tests/util.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/util.py:3: in <module>
    from test_server import TestServer
test_server/__init__.py:1: in <module>
    from test_server.server import *  # noqa pylint: disable=wildcard-import
test_server/server.py:6: in <module>
    import cgi
E   ModuleNotFoundError: No module named 'cgi'
=========================== short test summary info ============================
ERROR tests/test_httpheaderstorage.py
ERROR tests/test_server.py
ERROR tests/util.py
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 3 errors in 0.35s ===============================
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=2: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_test-server/build; python3.13 -m pytest 
tests
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_test-server/build; python3.12 -m pytest 
tests
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_test-server/build
configfile: pytest.ini
plugins: typeguard-4.3.0, cov-5.0.0
collected 53 items

tests/test_httpheaderstorage.py ..........                               [ 18%]
tests/test_server.py .........................................           [ 96%]
tests/test_types.py ..                                                   [100%]

=============================== warnings summary ===============================
../../../../../../usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:184
  /usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:184: 
DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
    exec(co, module.__dict__)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 53 passed, 1 warning in 7.20s =========================
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 
3.12" returned exit code 13
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-19T08:46:06Z


If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/789587/

This bug has been filed at "normal" severity, as we haven't started the
transition to add 3.13 as a supported version, yet. This will be raised to RC
as soon as that happens, hopefully well before trixie.

Thanks,

Stefano

Reply via email to