python-webob fails to build with Python 3.13.0a1. _____________________ ERROR collecting tests/test_util.py ______________________ ImportError while importing test module '/builddir/build/BUILD/WebOb-1.8.7/tests/test_util.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib64/python3.13/importlib/__init__.py:88: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_util.py:2: in <module> from webob.response import Response ../../BUILDROOT/python-webob-1.8.7-9.fc40.x86_64/usr/lib/python3.13/site-packages/webob/__init__.py:1: in <module> from webob.datetime_utils import ( # noqa: F401 ../../BUILDROOT/python-webob-1.8.7-9.fc40.x86_64/usr/lib/python3.13/site-packages/webob/datetime_utils.py:18: in <module> from webob.compat import ( ../../BUILDROOT/python-webob-1.8.7-9.fc40.x86_64/usr/lib/python3.13/site-packages/webob/compat.py:5: in <module> from cgi import parse_header E ModuleNotFoundError: No module named 'cgi' =========================== short test summary info ============================ ERROR tests/test_acceptparse.py ERROR tests/test_byterange.py ERROR tests/test_client_functional.py ERROR tests/test_compat.py ERROR tests/test_cookies.py ERROR tests/test_cookies_bw.py ERROR tests/test_datetime_utils.py ERROR tests/test_dec.py ERROR tests/test_descriptors.py ERROR tests/test_etag.py ERROR tests/test_etag_nose.py ERROR tests/test_exc.py ERROR tests/test_headers.py ERROR tests/test_in_wsgiref.py ERROR tests/test_misc.py ERROR tests/test_multidict.py ERROR tests/test_request.py ERROR tests/test_response.py ERROR tests/test_static.py ERROR tests/test_transcode.py ERROR tests/test_util.py !!!!!!!!!!!!!!!!!!! Interrupted: 21 errors during collection !!!!!!!!!!!!!!!!!!! ============================== 21 errors in 2.20s ============================== According to https://docs.python.org/3.13/whatsnew/3.13.html PEP 594: Remove the cgi and cgitb modules, deprecated in Python 3.11. cgi.FieldStorage can typically be replaced with urllib.parse.parse_qsl() for GET and HEAD requests, and the email.message module or multipart PyPI project for POST and PUT. cgi.parse() can be replaced by calling urllib.parse.parse_qs() directly on the desired query string, except for multipart/form-data input, which can be handled as described for cgi.parse_multipart(). cgi.parse_multipart() can be replaced with the functionality in the email package (e.g. email.message.EmailMessage and email.message.Message) which implements the same MIME RFCs, or with the multipart PyPI project. cgi.parse_header() can be replaced with the functionality in the email package, which implements the same MIME RFCs. For example, with email.message.EmailMessage: from email.message import EmailMessage msg = EmailMessage() msg['content-type'] = 'application/json; charset="utf8"' main, params = msg.get_content_type(), msg['content-type'].params (Contributed by Victor Stinner in gh-104773.) https://docs.python.org/3.13/whatsnew/3.13.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06546847-python-webob/ For all our attempts to build python-webob with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-webob/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.13: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/ Let us know here if you have any questions. Python 3.13 is planned to be included in Fedora 41. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
Already reported upstream, but without fix.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle. Changing version to 40.
Tracking this because python-webob is a dependency for python-webtest, which is a test dependency for python-wsgidav. I’m patching out the dependency and the affected tests for now.
mhroncok says this also blocks beaker, and through a dumb depchain (rhythmbox requires python3-mako, python3-mako recommends python3-beaker), python3-beaker is in a default Workstation install. This is a bit of a problem for the Python 3.13 rebuild process as it means anyone with rhythmbox installed will have to use --allowerasing or manually remove python3-beaker in order to get to 3.13.
(In reply to Adam Williamson from comment #4) > mhroncok says this also blocks beaker, and through a dumb depchain > (rhythmbox requires python3-mako, python3-mako recommends python3-beaker), > python3-beaker is in a default Workstation install. This is a bit of a > problem for the Python 3.13 rebuild process as it means anyone with > rhythmbox installed will have to use --allowerasing or manually remove > python3-beaker in order to get to 3.13. As a workaround, I added Obsoletes for python3-beaker < 1.12.1-6 to fedora-obsolete-packages. Once python-beaker is built with Python 3.13, it will no longer be < 1.12.1-6 and the Obsoletes will no longer matter. Anyway, python-beaker needs python-webob through python-webtest and that dependency can be removed by skipping tests/test_managers/test_ext_redis.py. Unfortunately, other tests fail when that is done. Once the Python 3.13 side tag is merged, python3-beaker will get a FailsToInstall bugzilla and I can add more details there.
There is a legacy-cgi module on pypi: https://pypi.org/project/legacy-cgi/ According to this issue it's working well with legacy-cgi: https://github.com/Pylons/webob/issues/437 Do you think, we should add python-legacy-cgi package to Fedora?
> Do you think, we should add python-legacy-cgi package to Fedora? The project looks reasonably well-forked and does not say it's an "unmaintained dump of the code from CPython" (like other such packages do). I don't see why not.
*** Bug 2291971 has been marked as a duplicate of this bug. ***
> Once the Python 3.13 side tag is merged, python3-beaker will get a FailsToInstall bugzilla and I can add more details there. See bz2291634.
As I didn't find any package submission about legacy-cgi I moved forward and submitted https://bugzilla.redhat.com/show_bug.cgi?id=2292378
I've pushed python-legacy-cgi to F41 and added proper buildrequire to webob. Build is running.
FEDORA-2024-786643fad4 (python-webob-1.8.7-13.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-786643fad4
FEDORA-2024-786643fad4 (python-webob-1.8.7-13.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.
Considering where the import is: /usr/lib/python3.13/site-packages/webob/compat.py:5: in <module> from cgi import parse_header This should be required on runtime as well.
FEDORA-2024-340c303ca3 (python-webob-1.8.7-14.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-340c303ca3
FEDORA-2024-340c303ca3 (python-webob-1.8.7-14.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2024-6a1978a844 (python-pyngus-2.3.0^20200513git60b6f10-5.20200513git60b6f10.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-6a1978a844
FEDORA-2024-6a1978a844 (python-pyngus-2.3.0^20200513git60b6f10-5.20200513git60b6f10.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.