From cfc8502688aebf030321c241be6dcfb22e36780e Mon Sep 17 00:00:00 2001 From: Florian Best Date: Thu, 9 Mar 2023 23:46:23 +0100 Subject: [PATCH] fix(UDL): Migrate univention-directory-listener to Python 3.9 migrate to Python 3.9; TODO: PyNode_Compile is deprecated and removed in py3.10 Bug #56533 --- .../changelog-domain-openldap-replication.56533.rst | 1 + management/univention-directory-listener/src/Makefile | 4 ++-- management/univention-directory-listener/src/handlers.c | 8 ++++---- management/univention-directory-listener/src/handlers.h | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 doc/changelog/staged/changelog-domain-openldap-replication.56533.rst diff --git a/doc/changelog/staged/changelog-domain-openldap-replication.56533.rst b/doc/changelog/staged/changelog-domain-openldap-replication.56533.rst new file mode 100644 index 00000000000..4140332102f --- /dev/null +++ b/doc/changelog/staged/changelog-domain-openldap-replication.56533.rst @@ -0,0 +1 @@ +Listener modules are now executed with Python 3.11. diff --git a/management/univention-directory-listener/src/Makefile b/management/univention-directory-listener/src/Makefile index a62d0ac6c6d..7ce38915603 100644 --- a/management/univention-directory-listener/src/Makefile +++ b/management/univention-directory-listener/src/Makefile @@ -39,9 +39,9 @@ DB_OBJS := cache.o cache_dn.o cache_entry.o cache_lowlevel.o base64.o filter.o LDAP_LDLIBS := -lldap -llber -CFLAGS += -Wall -Werror -D_FILE_OFFSET_BITS=64 +CFLAGS += -Wall -Werror -D_FILE_OFFSET_BITS=64 -I/usr/include/ -I/usr/include/python3.9/ -Wno-error=deprecated-declarations LDLIBS := -luniventiondebug -luniventionconfig -licuuc -LISTENER_LDLIBS := -luniventionpolicy $(LDAP_LDLIBS) -lpython3.7m $(DB_LDLIBS) +LISTENER_LDLIBS := -luniventionpolicy $(LDAP_LDLIBS) -lpython3.9 $(DB_LDLIBS) LISTENER_OBJS := main.o notifier.o transfile.o handlers.o change.o network.o signals.o select_server.o utils.o $(DB_OBJS) DUMP_LDLIBS := $(LDAP_LDLIBS) $(DB_LDLIBS) DUMP_OBJS := dump.o dump_signals.o utils.o $(DB_OBJS) diff --git a/management/univention-directory-listener/src/handlers.c b/management/univention-directory-listener/src/handlers.c index 26771d61761..3d153c9d71f 100644 --- a/management/univention-directory-listener/src/handlers.c +++ b/management/univention-directory-listener/src/handlers.c @@ -45,10 +45,10 @@ #include #include #define PY_SSIZE_T_CLEAN -#include -#include -#include -#include +#include +#include +#include +#include #include #include "cache_lowlevel.h" diff --git a/management/univention-directory-listener/src/handlers.h b/management/univention-directory-listener/src/handlers.h index d41bd4ced92..b5a278d3414 100644 --- a/management/univention-directory-listener/src/handlers.h +++ b/management/univention-directory-listener/src/handlers.h @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "cache.h"