On Thu, Feb 01, 2024 at 04:18:07PM +0100, s3v wrote: > Seems like python-catalogue 2.0.10 is newer than 2.1.0 :( [1] > After packaging python-catalogue 2.0.10 as 2.1.1+really2.0.10 (I didn't know > how > to circumvent the version problem, sorry if this procedure is not > appropriate!),
I fixed this - see https://bugs.debian.org/1086878. > and cloning your git repo from salsa, tests still fail: > > ================================================================== short test > summary info > ================================================================== > FAILED > srsly/tests/ruamel_yaml/test_anchor.py::TestDuplicateKeyThroughAnchor::test_duplicate_key_01 > - srsly.ruamel_yaml.constructor.ConstructorError: could not determine a > constructor for the tag None > FAILED > srsly/tests/ruamel_yaml/test_api_change.py::TestNewAPI::test_duplicate_keys_02 > - srsly.ruamel_yaml.constructor.ConstructorError: could not determine a > constructor for the tag None > FAILED srsly/tests/ruamel_yaml/test_api_change.py::TestNewAPI::test_issue_135 > - ruamel.yaml.emitter.EmitterError: expected SCALAR, SEQUENCE-START, > MAPPING-START, or ALIAS > FAILED > srsly/tests/ruamel_yaml/test_class_register.py::TestRegisterClass::test_register_0_safe > - srsly.ruamel_yaml.constructor.ConstructorError: could not determine a > constructor for the tag None > FAILED > srsly/tests/ruamel_yaml/test_class_register.py::TestRegisterClass::test_register_0_unsafe > - srsly.ruamel_yaml.constructor.ConstructorError: could not determine a > constructor for the tag None > FAILED > srsly/tests/ruamel_yaml/test_class_register.py::TestRegisterClass::test_register_1_safe > - srsly.ruamel_yaml.constructor.ConstructorError: could not determine a > constructor for the tag None > FAILED > srsly/tests/ruamel_yaml/test_class_register.py::TestRegisterClass::test_register_1_unsafe > - srsly.ruamel_yaml.constructor.ConstructorError: could not determine a > constructor for the tag None > FAILED srsly/tests/ruamel_yaml/test_issues.py::TestIssues::test_issue_223 - > srsly.ruamel_yaml.constructor.ConstructorError: could not determine a > constructor for the tag None > FAILED srsly/tests/ruamel_yaml/test_issues.py::TestIssues::test_issue_245 - > AssertionError: assert 'yes' is True > ============================================= 9 failed, 953 passed, 32 > skipped, 22 xfailed, 1 warning in 15.73s > ============================================= > > Failures above vanish after removing |python3-ruamel.yaml from build > dependencies. Of course that would just mask the failures, not fix them. I tried the attached patch to get things building with Cython 3. It's an improvement, but I'm reluctant to push it because we now have build failures with Python 3.13 - see https://github.com/explosion/srsly/issues/112. -- Colin Watson (he/him) [cjwat...@debian.org]
>From 694f6b2c68095f871d15a9aa6bd98692fcb59990 Mon Sep 17 00:00:00 2001 From: Colin Watson <cjwat...@debian.org> Date: Thu, 21 Nov 2024 13:22:11 +0000 Subject: [PATCH] Port to Cython 3 Closes: #1056874 --- debian/changelog | 5 +- debian/control | 2 +- ...d-unnecessary-ctypedef-redeclaration.patch | 25 ++++++++++ debian/patches/cython-3.patch | 48 +++++++++++++++++++ debian/patches/series | 2 + 5 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 debian/patches/avoid-unnecessary-ctypedef-redeclaration.patch create mode 100644 debian/patches/cython-3.patch diff --git a/debian/changelog b/debian/changelog index 219d765..da4bd33 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,5 @@ python-srsly (2.4.8-1) UNRELEASED; urgency=medium - [ Bas Couwenberg ] - * Switch to cython3-legacy. - Closes: #1056874 - [ Andreas Tille ] * New upstream version * Run build-time test properly @@ -18,6 +14,7 @@ python-srsly (2.4.8-1) UNRELEASED; urgency=medium [ Colin Watson ] * Import unittest.mock instead of mock. + * Port to Cython 3 (closes: #1056874). -- Andreas Tille <ti...@debian.org> Wed, 10 Jan 2024 18:43:13 +0100 diff --git a/debian/control b/debian/control index da13aec..d2f4019 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Testsuite: autopkgtest-pkg-python Priority: optional Build-Depends: debhelper-compat (= 13), dh-sequence-python3, - cython3-legacy, + cython3, python3-all-dev, python3-setuptools, python3-ruamel.yaml, diff --git a/debian/patches/avoid-unnecessary-ctypedef-redeclaration.patch b/debian/patches/avoid-unnecessary-ctypedef-redeclaration.patch new file mode 100644 index 0000000..0c4e9c9 --- /dev/null +++ b/debian/patches/avoid-unnecessary-ctypedef-redeclaration.patch @@ -0,0 +1,25 @@ +From: svlandeg <svlan...@github.com> +Date: Thu, 21 Nov 2024 13:13:39 +0000 +Subject: Avoid unnecessary ctypedef redeclaration + +Origin: upstream, https://github.com/explosion/srsly/pull/108 +Bug: https://github.com/explosion/srsly/issues/107 +Bug-Debian: https://bugs.debian.org/1056874 +Last-Update: 2024-11-21 +--- + srsly/msgpack/_unpacker.pyx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/srsly/msgpack/_unpacker.pyx b/srsly/msgpack/_unpacker.pyx +index b6c5f04..fb1bd93 100644 +--- a/srsly/msgpack/_unpacker.pyx ++++ b/srsly/msgpack/_unpacker.pyx +@@ -10,7 +10,7 @@ cdef extern from "Python.h": + from libc.stdlib cimport * + from libc.string cimport * + from libc.limits cimport * +-ctypedef unsigned long long uint64_t ++from libc.stdint cimport uint64_t + + from .exceptions import ( + BufferFull, diff --git a/debian/patches/cython-3.patch b/debian/patches/cython-3.patch new file mode 100644 index 0000000..19b8643 --- /dev/null +++ b/debian/patches/cython-3.patch @@ -0,0 +1,48 @@ +From: Colin Watson <cjwat...@debian.org> +Date: Thu, 21 Nov 2024 13:21:56 +0000 +Subject: Allow building with Cython 3 + +Last-Update: 2024-11-21 +--- + pyproject.toml | 2 +- + requirements.txt | 2 +- + setup.cfg | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 81f300d..665c223 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,6 +1,6 @@ + [build-system] + requires = [ + "setuptools", +- "cython>=0.29.1,<0.30.0", ++ "cython>=0.29.1", + ] + build-backend = "setuptools.build_meta" +diff --git a/requirements.txt b/requirements.txt +index 1669e18..7de940c 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,6 +1,6 @@ + catalogue>=2.0.3,<2.1.0 + # Development requirements +-cython>=0.29.1,<0.30.0 ++cython>=0.29.1 + pytest>=4.6.5 + pytest-timeout>=1.3.3 + mock>=2.0.0,<3.0.0 +diff --git a/setup.cfg b/setup.cfg +index 7476357..91d7a08 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -31,7 +31,7 @@ zip_safe = true + include_package_data = true + python_requires = >=3.6 + setup_requires = +- cython>=0.29.1,<0.30.0 ++ cython>=0.29.1 + install_requires = + catalogue>=2.0.3,<2.1.0 + diff --git a/debian/patches/series b/debian/patches/series index beae86f..ee70dc5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,3 @@ unittest-mock.patch +avoid-unnecessary-ctypedef-redeclaration.patch +cython-3.patch -- 2.45.2