Hi Michael

On 04/12/2022 03:50, Michael Banck wrote:
[...]
Looks like they got a work-around here in (since closed) PR #1401:
https://github.com/hgrecco/pint/commit/eb4e13428a3ede09148b76c71bc5b8cddb169176.patch

I was somewhat concerned that upstream abandoned that work rather than merging it. I have a feeling all it does is fix the test failure without actually fixing the underlying problems.

If I stick this (also attached) patch in, the testsuite passes fine.

I don't think it's enough for users of pint like superqt, however. The superqt test suite's failures seem to need a newer pin to pick up other compatibility changes with babel.

==== 8< ==== 8< ====

_ ERROR collecting .pybuild/cpython3_3.11_superqt/build/tests/test_quantity.py _
/usr/lib/python3/dist-packages/pint/registry.py:575: in load_definitions
    rbytes = importlib.resources.read_binary(__package__, file)
/usr/lib/python3.11/importlib/resources/_legacy.py:18: in wrapper
    warnings.warn(
E DeprecationWarning: read_binary is deprecated. Use files() instead. Refer to https://importlib-resource s.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

During handling of the above exception, another exception occurred:
tests/test_quantity.py:3: in <module>
    from superqt import QQuantity
<frozen importlib._bootstrap>:1231: in _handle_fromlist
    ???
superqt/__init__.py:51: in __getattr__
    from .spinbox._quantity import QQuantity
superqt/spinbox/_quantity.py:21: in <module>
    UREG = UnitRegistry()
/usr/lib/python3/dist-packages/pint/registry.py:143: in __call__
    obj._after_init()
/usr/lib/python3/dist-packages/pint/registry.py:1976: in _after_init
    super()._after_init()
/usr/lib/python3/dist-packages/pint/registry.py:305: in _after_init
    self.load_definitions("default_en.txt", True)
/usr/lib/python3/dist-packages/pint/registry.py:588: in load_definitions
    raise ValueError("While opening {}\n{}".format(file, msg))
E   ValueError: While opening default_en.txt
E read_binary is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/
latest/using.html#migrating-from-legacy for migration advice.

==== 8< ==== 8< ====

cheers
Stuart

--
Stuart Prescott   http://www.nanonanonano.net/ stu...@nanonanonano.net
Debian Developer  http://www.debian.org/       stu...@debian.org
GPG fingerprint   90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7

Reply via email to