Control: tags 1081480 + pending Dear maintainer,
I've prepared an NMU for zfec (versioned as 1.5.7.4-0.2) and uploaded it to DELAYED/2. Please feel free to tell me if I should delay it longer. Regards. -- cheers, Emmanuel Arias ????????????????????? ????????????????????? eam...@debian.org ????????????????????? OpenPGP: 13796755BBC72BB8ABE2AEB5 FA9DEC5DE11C63F1 ?????????
diff -Nru zfec-1.5.7.4/debian/changelog zfec-1.5.7.4/debian/changelog --- zfec-1.5.7.4/debian/changelog 2024-01-11 04:25:49.000000000 -0300 +++ zfec-1.5.7.4/debian/changelog 2024-11-15 12:28:26.000000000 -0300 @@ -1,3 +1,11 @@ +zfec (1.5.7.4-0.2) unstable; urgency=medium + + * Non-maintainer upload. + * d/patches/112.patch: Add patch from upstream to fix Python3.13 build + (Closes: #1081480). + + -- Emmanuel Arias <eam...@debian.org> Fri, 15 Nov 2024 12:28:26 -0300 + zfec (1.5.7.4-0.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru zfec-1.5.7.4/debian/patches/112.patch zfec-1.5.7.4/debian/patches/112.patch --- zfec-1.5.7.4/debian/patches/112.patch 1969-12-31 21:00:00.000000000 -0300 +++ zfec-1.5.7.4/debian/patches/112.patch 2024-11-15 12:28:26.000000000 -0300 @@ -0,0 +1,174 @@ +From 8ebe69f9ddde24b20d81f2983c4239b18bde0fc3 Mon Sep 17 00:00:00 2001 +From: Itamar Turner-Trauring <ita...@pythonspeed.com> +Date: Wed, 19 Jun 2024 13:31:08 -0400 +Subject: [PATCH 1/8] Update supported versions. + +--- + .github/workflows/test.yml | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/zfec/_fecmodule.c ++++ b/zfec/_fecmodule.c +@@ -123,6 +123,10 @@ + PyObject** pystrs_produced = (PyObject**)alloca((self->mm - self->kk) * sizeof(PyObject*)); /* This is an upper bound -- we will actually use only num_check_blocks_produced of these elements (see below). */ + unsigned num_check_blocks_produced = 0; /* The first num_check_blocks_produced elements of the check_blocks_produced array and of the pystrs_produced array will be used. */ + const gf** incblocks = (const gf**)alloca(self->kk * sizeof(const gf*)); ++ Py_buffer *pybufs = (Py_buffer *)alloca(self->kk * sizeof(Py_buffer)); ++ for (int i = 0; i < self->kk; i++) { ++ pybufs[i].buf = NULL; ++ } + size_t num_desired_blocks; + PyObject* fast_desired_blocks_nums = NULL; + PyObject** fast_desired_blocks_nums_items; +@@ -131,7 +135,7 @@ + size_t i; + PyObject* fastinblocks = NULL; + PyObject** fastinblocksitems; +- Py_ssize_t sz, oldsz = 0; ++ Py_ssize_t oldsz = 0; + unsigned char check_block_index = 0; /* index into the check_blocks_produced and (parallel) pystrs_produced arrays */ + + if (!PyArg_ParseTuple(args, "O|O:Encoder.encode", &inblocks, &desired_blocks_nums)) +@@ -180,17 +184,21 @@ + goto err; + + for (i = 0; i < self->kk; i++) { +- if (!PyObject_CheckReadBuffer(fastinblocksitems[i])) { +- PyErr_Format(py_fec_error, "Precondition violation: %zu'th item is required to offer the single-segment read character buffer protocol, but it does not.", i); +- goto err; +- } +- if (PyObject_AsReadBuffer(fastinblocksitems[i], (const void**)&(incblocks[i]), &sz)) +- goto err; +- if (oldsz != 0 && oldsz != sz) { +- PyErr_Format(py_fec_error, "Precondition violation: Input blocks are required to be all the same length. length of one block was: %zu, length of another block was: %zu", oldsz, sz); +- goto err; +- } +- oldsz = sz; ++ if (PyObject_GetBuffer(fastinblocksitems[i], &pybufs[i], 0)) ++ goto err; ++ if (!PyBuffer_IsContiguous(&pybufs[i], 'C')) { ++ goto err; ++ } ++ if (oldsz != 0 && oldsz != pybufs[i].len) { ++ PyErr_Format(py_fec_error, ++ "Precondition violation: Input blocks are required to be " ++ "all the same length. length of one block was: %zu, " ++ "length of another block was: %zu", ++ oldsz, pybufs[i].len); ++ goto err; ++ } ++ incblocks[i] = pybufs[i].buf; ++ oldsz = pybufs[i].len; + } + + /* Allocate space for all of the check blocks. */ +@@ -198,7 +206,7 @@ + for (i = 0; i < num_desired_blocks; i++) { + if (c_desired_blocks_nums[i] >= self->kk) { + c_desired_checkblocks_ids[check_block_index] = c_desired_blocks_nums[i]; +- pystrs_produced[check_block_index] = PyString_FromStringAndSize(NULL, sz); ++ pystrs_produced[check_block_index] = PyString_FromStringAndSize(NULL, oldsz); + if (pystrs_produced[check_block_index] == NULL) + goto err; + check_blocks_produced[check_block_index] = (gf*)PyString_AsString(pystrs_produced[check_block_index]); +@@ -211,7 +219,7 @@ + + /* Encode any check blocks that are needed. */ + Py_BEGIN_ALLOW_THREADS +- fec_encode(self->fec_matrix, incblocks, check_blocks_produced, c_desired_checkblocks_ids, num_check_blocks_produced, sz); ++ fec_encode(self->fec_matrix, incblocks, check_blocks_produced, c_desired_checkblocks_ids, num_check_blocks_produced, oldsz); + Py_END_ALLOW_THREADS + + /* Wrap all requested blocks up into a Python list of Python strings. */ +@@ -240,8 +248,15 @@ + Py_XDECREF(pystrs_produced[i]); + Py_XDECREF(result); result = NULL; + cleanup: +- Py_XDECREF(fastinblocks); fastinblocks=NULL; +- Py_XDECREF(fast_desired_blocks_nums); fast_desired_blocks_nums=NULL; ++ for (i = 0; i < self->kk; i++) { ++ if (pybufs[i].buf != NULL) { ++ PyBuffer_Release(&pybufs[i]); ++ } ++ } ++ Py_XDECREF(fastinblocks); ++ fastinblocks = NULL; ++ Py_XDECREF(fast_desired_blocks_nums); ++ fast_desired_blocks_nums = NULL; + return result; + } + +@@ -390,6 +405,10 @@ + PyObject* result = NULL; + + const gf**restrict cblocks = (const gf**restrict)alloca(self->kk * sizeof(const gf*)); ++ Py_buffer *pybufs = (Py_buffer *)alloca(self->kk * sizeof(Py_buffer)); ++ for (int i = 0; i < self->kk; i++) { ++ pybufs[i].buf = NULL; ++ } + unsigned* cblocknums = (unsigned*)alloca(self->kk * sizeof(unsigned)); + gf**restrict recoveredcstrs = (gf**)alloca(self->kk * sizeof(gf*)); /* self->kk is actually an upper bound -- we probably won't need all of this space. */ + PyObject**restrict recoveredpystrs = (PyObject**restrict)alloca(self->kk * sizeof(PyObject*)); /* self->kk is actually an upper bound -- we probably won't need all of this space. */ +@@ -399,7 +418,7 @@ + unsigned needtorecover=0; + PyObject** fastblocksitems; + PyObject** fastblocknumsitems; +- Py_ssize_t sz, oldsz = 0; ++ Py_ssize_t oldsz = 0; + long tmpl; + unsigned nextrecoveredix=0; + +@@ -446,17 +465,16 @@ + if (cblocknums[i] >= self->kk) + needtorecover+=1; + +- if (!PyObject_CheckReadBuffer(fastblocksitems[i])) { +- PyErr_Format(py_fec_error, "Precondition violation: %u'th item is required to offer the single-segment read character buffer protocol, but it does not.\n", i); ++ if (PyObject_GetBuffer(fastblocksitems[i], &pybufs[i], 0)) { ++ pybufs[i].buf = NULL; + goto err; + } +- if (PyObject_AsReadBuffer(fastblocksitems[i], (const void**)&(cblocks[i]), &sz)) +- goto err; +- if (oldsz != 0 && oldsz != sz) { +- PyErr_Format(py_fec_error, "Precondition violation: Input blocks are required to be all the same length. length of one block was: %zu, length of another block was: %zu\n", oldsz, sz); ++ if (oldsz != 0 && oldsz != pybufs[i].len) { ++ PyErr_Format(py_fec_error, "Precondition violation: Input blocks are required to be all the same length. length of one block was: %zu, length of another block was: %zu\n", oldsz, pybufs[i].len); + goto err; + } +- oldsz = sz; ++ cblocks[i] = pybufs[i].buf; ++ oldsz = pybufs[i].len; + } + + /* Move src packets into position. At the end of this loop we want the i'th +@@ -477,7 +495,7 @@ + + /* Allocate space for all of the recovered blocks. */ + for (i=0; i<needtorecover; i++) { +- recoveredpystrs[i] = PyString_FromStringAndSize(NULL, sz); ++ recoveredpystrs[i] = PyString_FromStringAndSize(NULL, oldsz); + if (recoveredpystrs[i] == NULL) + goto err; + recoveredcstrs[i] = (gf*)PyString_AsString(recoveredpystrs[i]); +@@ -487,7 +505,7 @@ + + /* Decode any recovered blocks that are needed. */ + Py_BEGIN_ALLOW_THREADS +- fec_decode(self->fec_matrix, cblocks, recoveredcstrs, cblocknums, sz); ++ fec_decode(self->fec_matrix, cblocks, recoveredcstrs, cblocknums, oldsz); + Py_END_ALLOW_THREADS + + /* Wrap up both original primary blocks and decoded blocks into a Python list of Python strings. */ +@@ -517,6 +535,11 @@ + Py_XDECREF(recoveredpystrs[i]); + Py_XDECREF(result); result = NULL; + cleanup: ++ for (i = 0; i < self->kk; i++) { ++ if (pybufs[i].buf != NULL) { ++ PyBuffer_Release(&pybufs[i]); ++ } ++ } + Py_XDECREF(fastblocks); fastblocks=NULL; + Py_XDECREF(fastblocknums); fastblocknums=NULL; + return result; diff -Nru zfec-1.5.7.4/debian/patches/series zfec-1.5.7.4/debian/patches/series --- zfec-1.5.7.4/debian/patches/series 1969-12-31 21:00:00.000000000 -0300 +++ zfec-1.5.7.4/debian/patches/series 2024-11-15 12:28:02.000000000 -0300 @@ -0,0 +1 @@ +112.patch
signature.asc
Description: PGP signature