Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.3.x, 3.2.10
-
None
-
None
Description
When mod_python starts up, it performs a check to confirm whether the version of Python it finds at runtime is the same version as was used to compile mod_python originally. It does this by comparing the value of PY_VERSION defined when mod_python is compiled against the runtime derived version from Py_GetVersion().
Because this is a complete version string, it incorporates the patch level revision as well as the major and minor versions. This means mod_python will issue a warning if Python has been updated, but only by a patch revision. Technically, the ABI for patch level revisions of Python should be compatible and a warning about a version mismatch should NOT be needed in this situation.
Thus, the check should perhaps be changed to only look at major/minor version differences and not patch level revisions.
As an example of this issue, below is bug report from debian bugs list.
Package: libapache2-mod-python
Version: 3.2.10-2
Severity: critical
Justification: breaks unrelated software
[Tue Nov 14 18:28:37 2006] [error] python_init: Python version mismatch, expected '2.4.4c1', found '2.4.4'.
[Tue Nov 14 18:28:37 2006] [error] python_init: Python executable found '/usr/bin/python'.
[Tue Nov 14 18:28:37 2006] [error] python_init: Python path being used '/usr/lib/python24.zip:/usr/lib/python2.4/:/usr/lib/python2.4/plat-linux2:/ usr/lib/python2.4/lib-t
k:/usr/lib/python2.4/lib-dynload'.
[Tue Nov 14 18:28:37 2006] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Tue Nov 14 18:28:37 2006] [notice] mod_python: using mutex_directory /tmp
Need recompile the mod-python
– System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-2-686
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Versions of packages libapache2-mod-python depends on:
ii apache2 2.2.3-3.1 Next generation, scalable, extenda
ii apache2-mpm-prefork [apache2 2.2.3-3.1 Traditional model for Apache HTTPD
ii apache2.2-common 2.2.3-3.1 Next generation, scalable, extenda
ii debconf [debconf-2.0] 1.5.8 Debian configuration management sy
ii libc6 2.3.6.ds1-8 GNU C Library: Shared libraries
ii python 2.4.4-1 An interactive high-level object-o
ii python-central 0.5.10 register and build utility for Pyt
ii python2.4 2.4.4-1 An interactive high-level object-o
libapache2-mod-python recommends no packages.
– debconf information:
libapache2-mod-python/enable_module: true