File: pint-get-application-registry.patch

package info (click to toggle)
silx 2.2.1%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 31,696 kB
  • sloc: python: 119,829; ansic: 5,062; lisp: 4,454; cpp: 883; sh: 286; makefile: 90; xml: 46
file content (25 lines) | stat: -rw-r--r-- 974 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: payno <henri.payno@gmail.com>
Date: Mon, 8 Sep 2025 10:55:01 +0200
Subject: TestDictToNx: use 'pint.get_application_registry()' instead of
 'pint.UnitRegistry()'

Origin: upstream, https://github.com/silx-kit/silx/pull/4368/commits/e320154ef46d2493057f464e3129b94dc8c26e03
Bug-Debian: https://bugs.debian.org/1114379
Last-Update: 2025-10-13
---
 src/silx/io/test/test_dictdump.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/silx/io/test/test_dictdump.py b/src/silx/io/test/test_dictdump.py
index 2bd376e..2d1dec5 100644
--- a/src/silx/io/test/test_dictdump.py
+++ b/src/silx/io/test/test_dictdump.py
@@ -827,7 +827,7 @@ class TestDictToNx(H5DictTestCase):
 
 @pytest.mark.skipif(pint is None, reason="Require pint")
 def test_dicttonx_pint(tmp_h5py_file):
-    ureg = pint.UnitRegistry()
+    ureg = pint.get_application_registry()
     treedict = {
         "array_mm": pint.Quantity([1, 2, 3], ureg.mm),
         "value_kg": 3 * ureg.kg,