I have tested the package in noble-proposed and you'll be please to hear
that it is working fine for me. Here is exactly what I did:
First I spun up a new noble VM based on the daily snapshot 20250704 and
updated it:
sudo apt update && sudo apt dist-upgrade -y
sudo reboot
Then ran Andreas's meticulous test case which he added to the
description:
sudo apt install apache2 libapache2-mod-python lynx -y
wget
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-python/+bug/2078527/+attachment/5813129/+files/python_bug_2078527.tar.gz
sudo mkdir -p /opt/local/tmp
sudo tar -C /opt/local/tmp/ -xf python_bug_2078527.tar.gz
echo "Include /opt/local/tmp/python_bug_2078527/apache2.conf" | sudo tee -a
/etc/apache2/apache2.conf
sudo a2enmod python
sudo systemctl restart apache2
lynx -dump http://127.0.0.1/mod-python-bug-2078527
Which produced the error condition as expected:
Python sys.version 3.12.3
platform.python_version() ValueError: failed to parse CPython
sys.version: '3.12.3'
I also installed Trac (the package that manifested the problem for me in
the first case) and created a test environment:
sudo apt install trac -y
sudo mkdir -p /opt/local/var/www
sudo trac-admin /opt/local/var/www/tractest initenv Test sqlite:db/trac.db
sudo tracd --port 8000 /opt/local/var/www/tractest >/dev/null 2>/dev/null &
sleep 1
lynx --dump http://localhost:8000/tractest | grep Welcome
This ran the standalone server that comes as part of Trac (i.e. not
using Apache) and the last line tested that the Trac environment was
working by fetching the welcome page. The result was `Welcome to Trac`
which indicates success as expected.
Next I shut down the standalone server and configured the test
environment in Apache:
sudo pkill tracd
sudo chown -R www-data:www-data /opt/local/var/www
cat << EOF | sudo tee /opt/local/var/www/tractest/apache2.conf
<Location /tractest>
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /opt/local/var/www/tractest
PythonOption TracUriRoot /tractest
</location>
EOF
echo "Include /opt/local/var/www/tractest/apache2.conf" | sudo tee -a
/etc/apache2/apache2.conf
sudo systemctl restart apache2
lynx --dump http://localhost/tractest | head -1
This produced the expected error result:
Internal Server Error
And:
sudo tail -1 /var/log/apache2/error.log
Exposed the expected error message in the log file:
... PythonHandler trac.web.modpython_frontend: ValueError: failed to
parse CPython sys.version: '3.12.3'
Then I enabled noble-proposed and updated the libapache2-mod-python
package:
sudo sed -i '/^Suites: noble / s/$/ noble-proposed/'
/etc/apt/sources.list.d/ubuntu.sources
cat << EOF | sudo tee /etc/apt/preferences.d/proposed-updates
Package: libapache2-mod-python
Pin: release a=noble-proposed
Pin-Priority: 600
EOF
sudo apt update && sudo apt dist-upgrade -y
sudo systemctl restart apache2
dpkg --list libapache2-mod-python
The last line told me the version was now `3.5.0.1-3ubuntu0.24.04.1`.
Now `lynx -dump http://127.0.0.1/mod-python-bug-2078527` produced the
expected success result:
Python sys.version 3.12.3 (main, Jun 18 2025, 17:59:45) [GCC 13.3.0]
platform.python_version() 3.12.3
And `lynx --dump http://localhost/tractest | grep Welcome` also
succeeded:
Welcome to Trac
P.S. It is interesting and reassuring to see the robust release process
in action. Thank you to everyone for their time and effort in fixing
this bug.
** Tags removed: verification-needed-noble
** Tags added: verification-done-noble
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2078527
Title:
sys.version from mod_python cannot be parsed by the python platform
module
To manage notifications about this bug go to:
https://bugs.launchpad.net/mod-python/+bug/2078527/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs