sudo fails to build with Python 3.13.0a1. ./pyhelpers.c:300:28: error: implicit declaration of function 'isdigit' [-Werror=implicit-function-declaration] 300 | while (isdigit((unsigned char)*cp)) | ^~~~~~~ ./pyhelpers.c:29:1: note: include '<ctype.h>' or provide a declaration of 'isdigit' According to https://docs.python.org/3.13/whatsnew/3.13.html: Python.h no longer includes the <ctype.h> standard header file. If needed, it should now be included explicitly. For example, it provides isalpha() and tolower() functions which are locale dependent. Python provides locale independent functions, like Py_ISALPHA() and Py_TOLOWER(). (Contributed by Victor Stinner in gh-108765.) 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/06546855-sudo/ For all our attempts to build sudo with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/sudo/ 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.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle. Changing version to 40.
Since the headers were brought back to Python, the problem is now (alpha 6) different. The traceback visual will be changed in Python 3.13. Full log: https://download.copr.fedorainfracloud.org/results/@python/python3.13/fedora-rawhide-x86_64/07387722-sudo/builder-live.log.gz Expectation failed at ./regress/testhelpers.c:139: actual is <<Example sudo python plugin will log to /some/not/writable/directory/sudo.log Traceback: File "SRC_DIR/example_io_plugin.py", line 64, in __init__ self._open_log_file(path.join(log_path, "sudo.log")) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "SRC_DIR/example_io_plugin.py", line 134, in _open_log_file self._log_file = open(log_path, "a") ~~~~^^^^^^^^^^^^^^^ >>: actual_content expected to be <<Example sudo python plugin will log to /some/not/writable/directory/sudo.log Traceback: File "SRC_DIR/example_io_plugin.py", line 64, in __init__ self._open_log_file(path.join(log_path, "sudo.log")) File "SRC_DIR/example_io_plugin.py", line 134, in _open_log_file self._log_file = open(log_path, "a") >>: expected_output Expectation failed at ./regress/check_python_examples.c:371: actual is <<0>>: verify_content(data.stdout_str, expected_path("check_example_io_plugin_fails_with_python_backtrace.stdout")) not expected to be <<0>>: 0 FAILED: testcase check_example_io_plugin_fails_with_python_backtrace() at ./regress/check_python_examples.c:1539 The output of the plugin: Example sudo python plugin will log to /some/not/writable/directory/sudo.log Traceback: File "SRC_DIR/example_io_plugin.py", line 64, in __init__ self._open_log_file(path.join(log_path, "sudo.log")) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "SRC_DIR/example_io_plugin.py", line 134, in _open_log_file self._log_file = open(log_path, "a") ~~~~^^^^^^^^^^^^^^^ The error output of the plugin: Failed to construct plugin instance: [Errno 2] No such file or directory: '/some/not/writable/directory/sudo.log' check_python_examples: 58 tests run, 1 errors, 98% success rate make[1]: Leaving directory '/builddir/build/BUILD/sudo-1.9.15p5/plugins/python'
It's a bit hacky, but https://src.fedoraproject.org/rpms/sudo/pull-request/28 fixes this. Tested both a plain Rawhide build and a build against the Python 3.13 COPR succeed with that.
OK, should be fixed by https://bodhi.fedoraproject.org/updates/FEDORA-2024-e523e57ddc when it passes tests.