[packages/apache-mod_python] - try to fix python 3.13 module; release 4

qboosh qboosh at pld-linux.org
Sat Mar 22 21:51:46 CET 2025


commit 9872504d8ea0fa20c2ba4396f7b487465eed1caa
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Mar 22 21:47:55 2025 +0100

    - try to fix python 3.13 module; release 4

 apache-mod_python.spec      |  4 +++-
 mod_python-python3.13.patch | 19 +++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)
---
diff --git a/apache-mod_python.spec b/apache-mod_python.spec
index 855391b..24cad29 100644
--- a/apache-mod_python.spec
+++ b/apache-mod_python.spec
@@ -20,7 +20,7 @@ Summary(pl.UTF-8):	Wbudowany interpreter języka Python dla serwera WWW Apache
 Summary(sv.UTF-8):	En inbyggd Python-interpretator för webbservern Apache
 Name:		apache-mod_%{mod_name}
 Version:	3.5.0.4
-Release:	3
+Release:	4
 License:	Apache v2.0
 Group:		Networking/Daemons/HTTP
 Source0:	https://github.com/grisha/mod_python/archive/%{version}/mod_%{mod_name}-%{version}.tar.gz
@@ -31,6 +31,7 @@ Patch0:		%{name}-httpd-not-needed.patch
 Patch2:		set-request-response-status.patch
 Patch3:		install.patch
 Patch4:		py3-nohash.patch
+Patch5:		mod_python-python3.13.patch
 URL:		https://modpython.org/
 BuildRequires:	apache-devel >= 2.0.52-7
 BuildRequires:	apr-devel >= 1:1.0.0
@@ -241,6 +242,7 @@ prestandan jämfört med den traditionella CGI-metoden.
 %ifnarch %{x8664}
 %patch -P 4 -p1
 %endif
+%patch -P 5 -p1
 
 %build
 %{__aclocal}
diff --git a/mod_python-python3.13.patch b/mod_python-python3.13.patch
new file mode 100644
index 0000000..7aa5c46
--- /dev/null
+++ b/mod_python-python3.13.patch
@@ -0,0 +1,19 @@
+This function has been removed in 3.13 and equivalent code reserved only for builtin modules.
+Not sure if something other shouldn't be done here...
+--- mod_python-3.5.0.4/src/_apachemodule.c.orig	2024-09-05 14:03:35.000000000 +0200
++++ mod_python-3.5.0.4/src/_apachemodule.c	2025-03-22 21:30:25.453948543 +0100
+@@ -854,12 +854,14 @@ PyObject *_apache_module_init()
+     m = PyModule_Create(&_apache_moduledef);
+     PyObject *name = PyUnicode_FromString("_apache");
+ 
++#if PY_MINOR_VERSION < 13
+     _PyImport_FixupExtensionObject(m, name, name
+ #if PY_MINOR_VERSION >= 7
+                    ,PyImport_GetModuleDict()
+ #endif
+                    );
+ #endif
++#endif
+     d = PyModule_GetDict(m);
+     Mp_ServerReturn = PyErr_NewException("_apache.SERVER_RETURN", NULL, NULL);
+     if (Mp_ServerReturn == NULL)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_python.git/commitdiff/9872504d8ea0fa20c2ba4396f7b487465eed1caa



More information about the pld-cvs-commit mailing list