From bcda2e541da4b7a63aff1ea546428e82ae01dc35 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 5 Apr 2026 20:00:43 +0100 Subject: [PATCH] Revert "dev-python/sabctools: Remove old" This reverts commit dff357a8bc1dfaf991ee41ae3a54734c0dc46ebf. dev-python/sabctools FileUnknown: version 8.2.6, line 30, column 11: sabctools-8.2.6-py314testfix.patch Signed-off-by: Sam James --- dev-python/sabctools/Manifest | 4 ++ .../files/sabctools-8.2.6-py314testfix.patch | 46 +++++++++++++++++++ dev-python/sabctools/sabctools-9.1.0.ebuild | 40 ++++++++++++++++ dev-python/sabctools/sabctools-9.2.0.ebuild | 40 ++++++++++++++++ dev-python/sabctools/sabctools-9.2.1.ebuild | 40 ++++++++++++++++ dev-python/sabctools/sabctools-9.3.0.ebuild | 40 ++++++++++++++++ 6 files changed, 210 insertions(+) create mode 100644 dev-python/sabctools/files/sabctools-8.2.6-py314testfix.patch create mode 100644 dev-python/sabctools/sabctools-9.1.0.ebuild create mode 100644 dev-python/sabctools/sabctools-9.2.0.ebuild create mode 100644 dev-python/sabctools/sabctools-9.2.1.ebuild create mode 100644 dev-python/sabctools/sabctools-9.3.0.ebuild diff --git a/dev-python/sabctools/Manifest b/dev-python/sabctools/Manifest index 31dc757e5ab7b..6ce5ee305be6b 100644 --- a/dev-python/sabctools/Manifest +++ b/dev-python/sabctools/Manifest @@ -1,4 +1,8 @@ DIST sabctools-8.2.6.gh.tar.gz 8974199 BLAKE2B cefafb57802e7d9b32b99de16b7df2745276c4602c7aa2f9f750bf2c741224b3a9180c2a9dd6d0e807c5297e2a70dbfb3784e546618536e7fa8d6273bc5d3684 SHA512 230a3c78a11d459703bb79d765ac5bf3e21ae239731ada73103e641af64c0cccd6f8e82d4a8a6016585c9935c93f9535cb5a0ead951f4f536a038fc2ebf056db +DIST sabctools-9.1.0.gh.tar.gz 9731441 BLAKE2B 6b94c19c9fe445e4eb624a981c6ed0282814217063014623b3c42ab42dbaddfbc155774915a78805495a547083f1a8eb1d760b641e0730575e71b86c2d257213 SHA512 070caf268a4eac6e5190ed5d1a75ac0069a4934095796989323bd7900f2d3afbeb071cc546d338fccc2333e82e3a78f44ca9936d6bc66cd5d93d0b18dbf0f815 +DIST sabctools-9.2.0.gh.tar.gz 9731762 BLAKE2B bee04537217f7b4be504c2230b24e9b588c1a5f0084c5b5284f056f14800816af6ac347e78e19c4269dceb18d498b10895d42da9962926079b4f46c8d5e90c1f SHA512 1b7b1cbcc9cfae5b287761047fa6473d68caabb49d06702ba493d133a32324b647d7b17624fb9a1becd70b4cf02ca8bbca7012844b62aa10bd381190923dc170 +DIST sabctools-9.2.1.gh.tar.gz 9732139 BLAKE2B 6606e305a74aece6ad4903c1cb3f5f7fdaa50a159a32bc8489554dba297eeac1a6273dbbff03050de9ffd6e6c18f5234a6cdff1a0b15166578050ba7e91dfab0 SHA512 bde240c20fee06c7b9eb27588af22d2d0871b1bbb862bbcd7d4cf81b6f68c53579352631923989b89a1f4ac94f3570a6c1d65bed22ab3dd018541017aafe2c35 +DIST sabctools-9.3.0.gh.tar.gz 9732597 BLAKE2B 53f82a559f96a7a74e86048bfd04d06095b0f2b0e15b68dda07fbfedd11069eb837a12515831301f3cd766504851c4fd539b44de24962086950ee0fd19446d98 SHA512 486c490571dfadc1db0d4279c8f3d1e302717539d3dcf06e2c1773b9e3228a22a307678e15124d63e4416be8f8bc4a6d5e356204a1028c3d93da26d31b11467c DIST sabctools-9.3.1.gh.tar.gz 9732705 BLAKE2B 9a6c365010f06aabf86bf31532b3fd67b32328633b361495f18b70c23e2407104d659035ffe6948438abf8afaf4a29e79158d1439e3108a1752e6e01766accb9 SHA512 c92dc49fea1f52e6b006cb4242b1d947771cb0e74b31cc807cb76a997a23a6965c68a1aea7e59b09e1d1e26456a9f56df5a3ebcb738b670e6cfa7e2def1d387e DIST sabctools-9.3.2.gh.tar.gz 9732449 BLAKE2B d32e2c7ad43036ebb640e6faeecaf2f760a3a2cac2326d755d316bf17e71b23063c2b548eddaa71d6ea4c867da9e23e870a8d28af2537930f7c08b751277a7e4 SHA512 03d53e20f71aa5caf7535b7a80768fc82b4e346073b639af497b8f3a973c8c07c0051b1a84fd1b81a5aa638048a7285c898cded5256eb00c73eb31917c421efa DIST sabctools-9.4.0.gh.tar.gz 9732762 BLAKE2B 1c54ffd605ed5f3839d697a6c8a372f2800e758b6d3f12e462b97ad2c19fd7643a9923cf8f4cc4766dc18f9993366fb2b0fd4ec2c9c423190dd73622276ccc7e SHA512 fc22a3f6bc195b4a4ec2c2ab24cab71dd5b3935f4825de7b35c4ae1cf3ac0a7236a9230f9a412ac18dddbf49f38afe6b81c47570a7a99292010d954a4b298ac3 diff --git a/dev-python/sabctools/files/sabctools-8.2.6-py314testfix.patch b/dev-python/sabctools/files/sabctools-8.2.6-py314testfix.patch new file mode 100644 index 0000000000000..50b26be43caf8 --- /dev/null +++ b/dev-python/sabctools/files/sabctools-8.2.6-py314testfix.patch @@ -0,0 +1,46 @@ +diff --git a/tests/test_decoder.py b/tests/test_decoder.py +index 9503923..d45e607 100644 +--- a/tests/test_decoder.py ++++ b/tests/test_decoder.py +@@ -76,29 +76,32 @@ def test_empty(): + + def test_ref_counts(): + """Note that sys.getrefcount itself adds another reference!""" ++ # In Python 3.14+, getrefcount returns 1, in earlier versions it returns 2 ++ expected_refcount = 1 if sys.version_info >= (3, 14) else 2 ++ + # Test regular case + data_plain = read_plain_yenc_file("test_regular.yenc") + data_out, filename, filesize, begin, end, crc_correct = sabctools_yenc_wrapper(data_plain) + +- assert sys.getrefcount(data_plain) == 2 +- assert sys.getrefcount(data_out) == 2 +- assert sys.getrefcount(filename) == 2 +- assert sys.getrefcount(begin) == 2 +- assert sys.getrefcount(end) == 2 +- assert sys.getrefcount(crc_correct) == 2 ++ assert sys.getrefcount(data_plain) == expected_refcount ++ assert sys.getrefcount(data_out) == expected_refcount ++ assert sys.getrefcount(filename) == expected_refcount ++ assert sys.getrefcount(begin) == expected_refcount ++ assert sys.getrefcount(end) == expected_refcount ++ assert sys.getrefcount(crc_correct) == expected_refcount + + # Test simple error case + fake_inp = memoryview(bytearray(b"1234")) +- assert sys.getrefcount(fake_inp) == 2 ++ assert sys.getrefcount(fake_inp) == expected_refcount + with pytest.raises(ValueError): + sabctools.yenc_decode(fake_inp) +- assert sys.getrefcount(fake_inp) == 2 ++ assert sys.getrefcount(fake_inp) == expected_refcount + + # Test further processing + data_plain = read_plain_yenc_file("test_bad_crc_end.yenc") + with pytest.raises(ValueError): + sabctools_yenc_wrapper(data_plain) +- assert sys.getrefcount(data_plain) == 2 ++ assert sys.getrefcount(data_plain) == expected_refcount + + + def test_crc_pickles(): diff --git a/dev-python/sabctools/sabctools-9.1.0.ebuild b/dev-python/sabctools/sabctools-9.1.0.ebuild new file mode 100644 index 0000000000000..76315c2543c89 --- /dev/null +++ b/dev-python/sabctools/sabctools-9.1.0.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..14} ) + +inherit distutils-r1 + +MY_PN="sabctools" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Module providing raw yEnc encoding/decoding for SABnzbd" +HOMEPAGE=" + https://github.com/sabnzbd/sabctools/ + https://pypi.org/project/sabctools/ +" +SRC_URI=" + https://github.com/sabnzbd/${MY_PN}/archive/v${PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="amd64 ~x86" + +BDEPEND=" + test? ( + dev-python/chardet[${PYTHON_USEDEP}] + dev-python/portend[${PYTHON_USEDEP}] + ) +" + +DOCS=( README.md doc/yenc-draft.1.3.txt ) + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest diff --git a/dev-python/sabctools/sabctools-9.2.0.ebuild b/dev-python/sabctools/sabctools-9.2.0.ebuild new file mode 100644 index 0000000000000..a9c74b0ac3316 --- /dev/null +++ b/dev-python/sabctools/sabctools-9.2.0.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..14} ) + +inherit distutils-r1 + +MY_PN="sabctools" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Module providing raw yEnc encoding/decoding for SABnzbd" +HOMEPAGE=" + https://github.com/sabnzbd/sabctools/ + https://pypi.org/project/sabctools/ +" +SRC_URI=" + https://github.com/sabnzbd/${MY_PN}/archive/v${PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~x86" + +BDEPEND=" + test? ( + dev-python/chardet[${PYTHON_USEDEP}] + dev-python/portend[${PYTHON_USEDEP}] + ) +" + +DOCS=( README.md doc/yenc-draft.1.3.txt ) + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest diff --git a/dev-python/sabctools/sabctools-9.2.1.ebuild b/dev-python/sabctools/sabctools-9.2.1.ebuild new file mode 100644 index 0000000000000..4d010164ab735 --- /dev/null +++ b/dev-python/sabctools/sabctools-9.2.1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..14} ) + +inherit distutils-r1 + +MY_PN="sabctools" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Module providing raw yEnc encoding/decoding for SABnzbd" +HOMEPAGE=" + https://github.com/sabnzbd/sabctools/ + https://pypi.org/project/sabctools/ +" +SRC_URI=" + https://github.com/sabnzbd/${MY_PN}/archive/v${PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +BDEPEND=" + test? ( + dev-python/chardet[${PYTHON_USEDEP}] + dev-python/portend[${PYTHON_USEDEP}] + ) +" + +DOCS=( README.md doc/yenc-draft.1.3.txt ) + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest diff --git a/dev-python/sabctools/sabctools-9.3.0.ebuild b/dev-python/sabctools/sabctools-9.3.0.ebuild new file mode 100644 index 0000000000000..c021b87f73eb6 --- /dev/null +++ b/dev-python/sabctools/sabctools-9.3.0.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..14} ) + +inherit distutils-r1 + +MY_PN="sabctools" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Module providing raw yEnc encoding/decoding for SABnzbd" +HOMEPAGE=" + https://github.com/sabnzbd/sabctools/ + https://pypi.org/project/sabctools/ +" +SRC_URI=" + https://github.com/sabnzbd/${MY_PN}/archive/v${PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +BDEPEND=" + test? ( + dev-python/chardet[${PYTHON_USEDEP}] + dev-python/portend[${PYTHON_USEDEP}] + ) +" + +DOCS=( README.md doc/yenc-draft.1.3.txt ) + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest