File: 12_version-check.patch

package info (click to toggle)
libapache2-mod-python 3.5.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,864 kB
  • sloc: python: 7,471; ansic: 7,025; makefile: 296; lex: 246; sh: 212
file content (46 lines) | stat: -rw-r--r-- 1,809 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From: Stefano Rivera <stefanor@debian.org>
Date: Thu, 26 Oct 2023 14:24:09 +0200
Subject: Skip compile-type Python version check

Minor python version bumps don't break C compatibility.
This just causes bugs to get filed.

Forwarded: https://github.com/grisha/mod_python/pull/128
Bug-Upstream: https://github.com/grisha/mod_python/issues/101
Bug-Debian: https://bugs.debian.org/592988
Bug-Debian: https://bugs.debian.org/1040269
---
 src/mod_python.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/src/mod_python.c b/src/mod_python.c
index 11af968..19f1650 100644
--- a/src/mod_python.c
+++ b/src/mod_python.c
@@ -710,7 +710,6 @@ static int python_init(apr_pool_t *p, apr_pool_t *ptemp,
     const char *userdata_key = "python_init";
     apr_status_t rc;
 
-    const char *py_compile_version = PY_VERSION;
     const char *py_dynamic_version = 0;
 
     /* The "initialized" flag is a fudge for Mac OS X. It
@@ -754,18 +753,6 @@ static int python_init(apr_pool_t *p, apr_pool_t *ptemp,
 
     py_dynamic_version = strtok((char *)Py_GetVersion(), " ");
 
-    if (strcmp(py_compile_version, py_dynamic_version) != 0) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
-                     "python_init: Python version mismatch, expected '%s', found '%s'.",
-                     py_compile_version, py_dynamic_version);
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
-                     "python_init: Python executable found '" PRIs "'.",
-                     Py_GetProgramFullPath());
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
-                     "python_init: Python path being used '" PRIs "'.",
-                     Py_GetPath());
-    }
-
     /* Python version */
     sprintf(buff, "Python/%.200s", py_dynamic_version);
     ap_add_version_component(p, buff);