uncommitted - python-libtrace

Ready changes

Summary

Import uploads missing from VCS:

Diff

diff --git a/debian/changelog b/debian/changelog
index 03ee42f..26884fe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-libtrace (1.6+git20180219-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Patch: Python 3.11 support. (Closes: #1023901)
+
+ -- Stefano Rivera <stefanor@debian.org>  Fri, 18 Nov 2022 12:08:57 +0200
+
 python-libtrace (1.6+git20180219-1) unstable; urgency=medium
 
   * New upstream version from git snapshot.
diff --git a/debian/patches/python3.11.patch b/debian/patches/python3.11.patch
new file mode 100644
index 0000000..ea2f30b
--- /dev/null
+++ b/debian/patches/python3.11.patch
@@ -0,0 +1,286 @@
+From 308a0158332677be4e5d74073e1c1929a5497618 Mon Sep 17 00:00:00 2001
+From: Stefano Rivera <stefano@rivera.za.net>
+Date: Fri, 18 Nov 2022 11:57:46 +0200
+Subject: [PATCH] Python 3.11 support
+
+Py_TYPE() changed to a inline static function, replace it with
+Py_SET_TYPE(). Include a backwards compatibility macro.
+
+See: bpo-39573
+Forwarded: https://github.com/nevil-brownlee/python-libtrace/pull/13
+Bug-Debian: https://bugs.debian.org/1023901
+---
+ lib/include/pv.h      |  6 ++++++
+ lib/ipp/ippmodule.c   |  2 +-
+ lib/natkit/natkit.c   |  4 ++--
+ lib/plt/icmp.c        |  6 +++---
+ lib/plt/icmp6.c       | 10 +++++-----
+ lib/plt/internet.c    |  2 +-
+ lib/plt/ip.c          |  2 +-
+ lib/plt/ip6.c         |  2 +-
+ lib/plt/ipflow.c      |  2 +-
+ lib/plt/layers.c      |  6 +++---
+ lib/plt/outputtrace.c |  4 ++--
+ lib/plt/packet.c      |  2 +-
+ lib/plt/pltmodule.c   |  2 +-
+ lib/plt/sctp.c        |  4 ++--
+ lib/plt/tcp.c         |  2 +-
+ lib/plt/trace.c       |  2 +-
+ lib/plt/udp.c         |  2 +-
+ 17 files changed, 33 insertions(+), 27 deletions(-)
+
+diff --git a/lib/include/pv.h b/lib/include/pv.h
+index f85b172..4e758a2 100644
+--- a/lib/include/pv.h
++++ b/lib/include/pv.h
+@@ -58,4 +58,10 @@
+ #endif
+ #endif
+ 
++#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_TYPE)
++static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type)
++{ ob->ob_type = type; }
++#define Py_SET_TYPE(ob, type) _Py_SET_TYPE((PyObject*)(ob), type)
++#endif
++
+ #endif
+diff --git a/lib/ipp/ippmodule.c b/lib/ipp/ippmodule.c
+index c30b9b6..6e1d237 100644
+--- a/lib/ipp/ippmodule.c
++++ b/lib/ipp/ippmodule.c
+@@ -931,7 +931,7 @@ PyMODINIT_FUNC initipp(void)  {
+ 
+    if (PyType_Ready(&IPprefixType) < 0)
+       RETURN;
+-   Py_TYPE(&IPprefixType) = &PyType_Type;
++   Py_SET_TYPE(&IPprefixType, &PyType_Type);
+ 
+ #if PYTHON3
+    m = PyModule_Create(&ipp_module);
+diff --git a/lib/natkit/natkit.c b/lib/natkit/natkit.c
+index 354757a..6fd4bea 100644
+--- a/lib/natkit/natkit.c
++++ b/lib/natkit/natkit.c
+@@ -722,10 +722,10 @@ PyObject *m=NULL;
+    if (m == NULL) RETURN;
+ 
+    if (PyType_Ready(&IPflowType) < 0) RETURN;
+-   Py_TYPE(&IPflowType) = &PyType_Type;
++   Py_SET_TYPE(&IPflowType, &PyType_Type);
+ 
+    if (PyType_Ready(&FlowHomeType) < 0) RETURN;
+-   Py_TYPE(&FlowHomeType) = &PyType_Type;
++   Py_SET_TYPE(&FlowHomeType, &PyType_Type);
+ 
+    Py_INCREF(&IPflowType);
+    PyModule_AddObject(m, "IPflow", (PyObject *)&IPflowType);
+diff --git a/lib/plt/icmp.c b/lib/plt/icmp.c
+index db6b2ae..6da97d9 100644
+--- a/lib/plt/icmp.c
++++ b/lib/plt/icmp.c
+@@ -483,9 +483,9 @@ void initicmp(void) {
+    if (PyType_Ready(&EchoType) < 0) return;
+    if (PyType_Ready(&RedirectType) < 0) return;
+ 
+-   Py_TYPE(&IcmpType) = &PyType_Type;
+-   Py_TYPE(&EchoType) = &PyType_Type;
+-   Py_TYPE(&RedirectType) = &PyType_Type;
++   Py_SET_TYPE(&IcmpType, &PyType_Type);
++   Py_SET_TYPE(&EchoType, &PyType_Type);
++   Py_SET_TYPE(&RedirectType, &PyType_Type);
+ 
+    Py_INCREF(&IcmpType);
+    PyModule_AddObject(plt_module, "icmp", (PyObject *)&IcmpType);
+diff --git a/lib/plt/icmp6.c b/lib/plt/icmp6.c
+index 98ad09e..79a7c04 100644
+--- a/lib/plt/icmp6.c
++++ b/lib/plt/icmp6.c
+@@ -690,11 +690,11 @@ void initicmp6(void) {
+    if (PyType_Ready(&Param6Type) < 0) return;
+    if (PyType_Ready(&Neighbour6Type) < 0) return;
+ 
+-   Py_TYPE(&Icmp6Type) = &PyType_Type;
+-   Py_TYPE(&Echo6Type) = &PyType_Type;
+-   Py_TYPE(&Toobig6Type) = &PyType_Type;
+-   Py_TYPE(&Param6Type) = &PyType_Type;
+-   Py_TYPE(&Neighbour6Type) = &PyType_Type;
++   Py_SET_TYPE(&Icmp6Type, &PyType_Type);
++   Py_SET_TYPE(&Echo6Type, &PyType_Type);
++   Py_SET_TYPE(&Toobig6Type, &PyType_Type);
++   Py_SET_TYPE(&Param6Type, &PyType_Type);
++   Py_SET_TYPE(&Neighbour6Type, &PyType_Type);
+ 
+    Py_INCREF(&Icmp6Type);
+    PyModule_AddObject(plt_module, "icmp6", (PyObject *)&Icmp6Type);
+diff --git a/lib/plt/internet.c b/lib/plt/internet.c
+index 5fb04e1..7666389 100644
+--- a/lib/plt/internet.c
++++ b/lib/plt/internet.c
+@@ -423,7 +423,7 @@ PyTypeObject InternetType = {
+ void initinternet(void) {
+    if (PyType_Ready(&InternetType) < 0) return;
+ 
+-   Py_TYPE(&InternetType) = &PyType_Type;
++   Py_SET_TYPE(&InternetType, &PyType_Type);
+ 
+    Py_INCREF(&InternetType);
+    PyModule_AddObject(plt_module, "Internet", (PyObject *)&InternetType);
+diff --git a/lib/plt/ip.c b/lib/plt/ip.c
+index 5d97708..c819d2b 100644
+--- a/lib/plt/ip.c
++++ b/lib/plt/ip.c
+@@ -289,7 +289,7 @@ PyTypeObject IpType = {
+ void initip(void) {
+    if (PyType_Ready(&IpType) < 0) return;
+ 
+-   Py_TYPE(&IpType) = &PyType_Type;
++   Py_SET_TYPE(&IpType, &PyType_Type);
+ 
+    Py_INCREF(&IpType);
+    PyModule_AddObject(plt_module, "ip", (PyObject *)&IpType);
+diff --git a/lib/plt/ip6.c b/lib/plt/ip6.c
+index cbc6e18..27c9102 100644
+--- a/lib/plt/ip6.c
++++ b/lib/plt/ip6.c
+@@ -182,7 +182,7 @@ PyTypeObject Ip6Type = {
+ void initip6(void) {
+    if (PyType_Ready(&Ip6Type) < 0) return;
+ 
+-   Py_TYPE(&Ip6Type) = &PyType_Type;
++   Py_SET_TYPE(&Ip6Type, &PyType_Type);
+ 
+    Py_INCREF(&Ip6Type);
+    PyModule_AddObject(plt_module, "ip6", (PyObject *)&Ip6Type);
+diff --git a/lib/plt/ipflow.c b/lib/plt/ipflow.c
+index ad403fe..abd102f 100644
+--- a/lib/plt/ipflow.c
++++ b/lib/plt/ipflow.c
+@@ -151,7 +151,7 @@ PyTypeObject IPflowType = {
+ 
+ void initipflow(void)  {
+    if (PyType_Ready(&IPflowType) < 0) return;
+-   Py_TYPE(&IPflowType) = &PyType_Type;
++   Py_SET_TYPE(&IPflowType, &PyType_Type);
+ 
+    Py_INCREF(&IPflowType);
+    PyModule_AddObject(plt_module, "IPflow", (PyObject *)&IPflowType);
+diff --git a/lib/plt/layers.c b/lib/plt/layers.c
+index ac3a81d..a9a260b 100644
+--- a/lib/plt/layers.c
++++ b/lib/plt/layers.c
+@@ -223,9 +223,9 @@ void initlayers(void) {
+    if (PyType_Ready(&Layer3Type) < 0) return;
+    if (PyType_Ready(&TransportType) < 0) return;
+ 
+-   Py_TYPE(&Layer2Type) = &PyType_Type;
+-   Py_TYPE(&Layer3Type) = &PyType_Type;
+-   Py_TYPE(&TransportType) = &PyType_Type;
++   Py_SET_TYPE(&Layer2Type, &PyType_Type);
++   Py_SET_TYPE(&Layer3Type, &PyType_Type);
++   Py_SET_TYPE(&TransportType, &PyType_Type);
+ 
+    PyModule_AddObject(plt_module, "TRACE_TYPE_ETH",
+ 		      PyLong_FromLong(TRACE_TYPE_ETH));
+diff --git a/lib/plt/outputtrace.c b/lib/plt/outputtrace.c
+index 2825880..1220ea9 100644
+--- a/lib/plt/outputtrace.c
++++ b/lib/plt/outputtrace.c
+@@ -294,9 +294,9 @@ PyTypeObject FilterType = {
+ 
+ void initoutputtrace(void) {
+    if (PyType_Ready(&OutputTraceType) < 0) return;
+-   Py_TYPE(&OutputTraceType) = &PyType_Type;
++   Py_SET_TYPE(&OutputTraceType, &PyType_Type);
+    if (PyType_Ready(&FilterType) < 0) return;
+-   Py_TYPE(&FilterType) = &PyType_Type;
++   Py_SET_TYPE(&FilterType, &PyType_Type);
+ 
+    PyModule_AddObject(plt_module, "O_APPEND",
+       PyLong_FromLong(O_APPEND));
+diff --git a/lib/plt/packet.c b/lib/plt/packet.c
+index 4744339..79dc733 100644
+--- a/lib/plt/packet.c
++++ b/lib/plt/packet.c
+@@ -582,7 +582,7 @@ PyTypeObject PacketType = {
+ void initpacket(void) {
+    if (PyType_Ready(&PacketType) < 0) return;
+ 
+-   Py_TYPE(&PacketType) = &PyType_Type;
++   Py_SET_TYPE(&PacketType, &PyType_Type);
+ 
+    Py_INCREF(&PacketType);
+    PyModule_AddObject(plt_module, "packet", (PyObject *)&PacketType);
+diff --git a/lib/plt/pltmodule.c b/lib/plt/pltmodule.c
+index 9bacb7d..e10b546 100644
+--- a/lib/plt/pltmodule.c
++++ b/lib/plt/pltmodule.c
+@@ -374,7 +374,7 @@ PyMODINIT_FUNC initplt(void)  {
+ 
+    if (PyType_Ready(&DataType) < 0) RETURN;
+ 
+-   Py_TYPE(&DataType) = &PyType_Type;
++   Py_SET_TYPE(&DataType, &PyType_Type);
+ 
+    Py_INCREF(&DataType);
+    PyModule_AddObject(plt_module, "Data", (PyObject *)&DataType);
+diff --git a/lib/plt/sctp.c b/lib/plt/sctp.c
+index d1ef746..1a81ea3 100644
+--- a/lib/plt/sctp.c
++++ b/lib/plt/sctp.c
+@@ -386,12 +386,12 @@ PyTypeObject SctpChunkType = {
+ 
+ void initsctp(void) {
+    if (PyType_Ready(&SctpType) <= 0) {
+-      Py_TYPE(&SctpType) = &PyType_Type;
++      Py_SET_TYPE(&SctpType, &PyType_Type);
+       Py_INCREF(&SctpType);
+       PyModule_AddObject(plt_module, "sctp", (PyObject *)&SctpType);
+       }
+    if (PyType_Ready(&SctpChunkType) <= 0) {
+-      Py_TYPE(&SctpChunkType) = &PyType_Type;
++      Py_SET_TYPE(&SctpChunkType, &PyType_Type);
+       Py_INCREF(&SctpChunkType);
+       PyModule_AddObject(plt_module, "chunk", (PyObject *)&SctpChunkType);
+       }
+diff --git a/lib/plt/tcp.c b/lib/plt/tcp.c
+index d82c864..cd03928 100644
+--- a/lib/plt/tcp.c
++++ b/lib/plt/tcp.c
+@@ -497,7 +497,7 @@ PyTypeObject TcpType = {
+ void inittcp(void) {
+    if (PyType_Ready(&TcpType) < 0) return;
+ 
+-   Py_TYPE(&TcpType) = &PyType_Type;
++   Py_SET_TYPE(&TcpType, &PyType_Type);
+ 
+    Py_INCREF(&TcpType);
+    PyModule_AddObject(plt_module, "tcp", (PyObject *)&TcpType);
+diff --git a/lib/plt/trace.c b/lib/plt/trace.c
+index 64ef093..79c47b2 100644
+--- a/lib/plt/trace.c
++++ b/lib/plt/trace.c
+@@ -395,7 +395,7 @@ PyTypeObject TraceType = {
+ void inittrace(void) {
+    if (PyType_Ready(&TraceType) < 0) return;
+ 
+-   Py_TYPE(&TraceType) = &PyType_Type;
++   Py_SET_TYPE(&TraceType, &PyType_Type);
+ 
+    Py_INCREF(&TraceType);
+    PyModule_AddObject(plt_module, "trace", (PyObject *)&TraceType);
+diff --git a/lib/plt/udp.c b/lib/plt/udp.c
+index 6bb4946..ca919a2 100644
+--- a/lib/plt/udp.c
++++ b/lib/plt/udp.c
+@@ -241,7 +241,7 @@ PyTypeObject UdpType = {
+ void initudp(void) {
+    if (PyType_Ready(&UdpType) < 0) return;
+ 
+-   Py_TYPE(&UdpType) = &PyType_Type;
++   Py_SET_TYPE(&UdpType, &PyType_Type);
+ 
+    Py_INCREF(&UdpType);
+    PyModule_AddObject(plt_module, "udp", (PyObject *)&UdpType);
+-- 
+2.35.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 965a000..6e33b67 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 spelling-fixes.patch
+python3.11.patch

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/debug/.build-id/09/0b9929155ac59b2157337983274b17bbad8d9d.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/ac/66b0dc02f55ee0419adf53cb08d1de5fa5bc01.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/eb/338cc6c9862f4292482e33c2c4d96e5fce5715.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/f2/c7d64f7d3271b775b128d1fc4b7e3ae0d11884.debug
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/ipp.cpython-311-x86_64-linux-gnu.so
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/natkit.cpython-311-x86_64-linux-gnu.so
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/pldns.cpython-311-x86_64-linux-gnu.so
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/plt.cpython-311-x86_64-linux-gnu.so

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/lib/debug/.build-id/00/4d6e45d1db88abefacedbd0917924abf4b6dca.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/af/6306fe4519c158cade2e2e6043904adcfa5aec.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/d9/24854d51f8eea11eead9603d5041549ead5a5e.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/db/12d0c0b8122e49dc6dd49ee44e9da472882eeb.debug
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/ipp.cpython-310-x86_64-linux-gnu.so
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/natkit.cpython-310-x86_64-linux-gnu.so
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/pldns.cpython-310-x86_64-linux-gnu.so
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/plt.cpython-310-x86_64-linux-gnu.so

Control files of package python3-libtrace: lines which differ (wdiff format)

  • Depends: python3 (<< 3.11), 3.12), python3 (>= 3.10~), 3.11~), libc6 (>= 2.15), libldns3 (>= 1.7.1), libtrace3

Control files of package python3-libtrace-dbgsym: lines which differ (wdiff format)

  • Build-Ids: 004d6e45d1db88abefacedbd0917924abf4b6dca af6306fe4519c158cade2e2e6043904adcfa5aec d924854d51f8eea11eead9603d5041549ead5a5e db12d0c0b8122e49dc6dd49ee44e9da472882eeb 090b9929155ac59b2157337983274b17bbad8d9d ac66b0dc02f55ee0419adf53cb08d1de5fa5bc01 eb338cc6c9862f4292482e33c2c4d96e5fce5715 f2c7d64f7d3271b775b128d1fc4b7e3ae0d11884

Run locally

More details

Full run details