Skip to content

Commit

Permalink
fix(UDL): Migrate univention-directory-listener to Python 3.9
Browse files Browse the repository at this point in the history
migrate to Python 3.9; TODO: PyNode_Compile is deprecated and removed in py3.10

Bug #56533
  • Loading branch information
spaceone committed Dec 25, 2023
1 parent 6c99538 commit 8ca2f5c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Listener modules are now executed with Python 3.11.
4 changes: 2 additions & 2 deletions management/univention-directory-listener/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions management/univention-directory-listener/src/handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
#include <limits.h>
#include <sys/types.h>
#define PY_SSIZE_T_CLEAN
#include <python3.7/Python.h>
#include <python3.7/compile.h>
#include <python3.7/marshal.h>
#include <python3.7/node.h>
#include <python3.9/Python.h>
#include <python3.9/compile.h>
#include <python3.9/marshal.h>
#include <python3.9/node.h>
#include <univention/debug.h>

#include "cache_lowlevel.h"
Expand Down
2 changes: 1 addition & 1 deletion management/univention-directory-listener/src/handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <stdbool.h>
#include <sys/types.h>
#include <ldap.h>
#include <python3.7/Python.h>
#include <python3.9/Python.h>
#include <univention/ldap.h>

#include "cache.h"
Expand Down

0 comments on commit 8ca2f5c

Please sign in to comment.