Hi,
On Thu, 21 Nov 2024 13:37:42 +0000 Colin Watson <[email protected]> wrote:
> 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.
Thanks for taking care of this package! (and many others).
>
> > 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.
>
You're right, python-srsly ships its own fork of ruamel.yaml and there is some
kind
of conflicts between srsly and ruamel.yaml (ruamel.yaml tests also fail if srsly
is installed).
It's very hard to patch vendored copies without spending a lot of time to learn
internals of this package and without upstream intervention.
Relying on tests is the best I can do but it's not enough, I think :(
> 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.
>
Dropping old buffer protocol like borg did [1] solves the issue against
Cython. After that, tests still fail due cloudpickle for two reasons:
1) Cloudpickle is not ready for Python 3.13 (catched by debci)
AssertionError: assert ['C_CONSTANT'...', 'method_c'] == ['C_CONSTANT'...',
'method_c']
2) building 'srsly.ujson.ujson' extension is fine but is not loaded for some
reasons with
Python 3.13 (Python 3.12 is ok).
E from .ujson import decode, encode, dump, dumps, load,
loads # noqa: F401
E
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E ModuleNotFoundError: No module named 'srsly.ujson.ujson'
As side note, I've also applied attached patch to avoid:
############################
# Package would be ignored #
############################
Python recognizes 'srsly.ujson.lib' as an importable package[^1],
but it is absent from setuptools' `packages` configuration.
[...]
Kind Regards
[1]
https://github.com/borgbackup/borg/pull/5684/files#diff-2494f2f34c6c62dda2dc4c57b95f5abd9f7dde03c70360eb94676a58a201daa1
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@
import sys
from setuptools.command.build_ext import build_ext
from sysconfig import get_path
-from setuptools import Extension, setup, find_packages
+from setuptools import Extension, setup, find_namespace_packages
from pathlib import Path
from Cython.Build import cythonize
from Cython.Compiler import Options
@@ -16,7 +16,7 @@
PACKAGE_DATA = {"": ["*.pyx", "*.pxd", "*.c", "*.h"]}
-PACKAGES = find_packages()
+PACKAGES = find_namespace_packages()
MOD_NAMES = ["srsly.msgpack._unpacker", "srsly.msgpack._packer"]
COMPILE_OPTIONS = {
"msvc": ["/Ox", "/EHsc"],