File: 0001-python-syntaxwarning.patch

package info (click to toggle)
python-nxs 4.4.1-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: python: 2,751; makefile: 152; sh: 10
file content (36 lines) | stat: -rw-r--r-- 1,219 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
26
27
28
29
30
31
32
33
34
35
36
From: Debian Science Maintainers
 <debian-science-maintainers@lists.alioth.debian.org>
Date: Sun, 21 Dec 2025 16:22:50 +1100
Subject: python-syntaxwarning

---
 nxs/napi.py | 2 +-
 nxs/tree.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/nxs/napi.py b/nxs/napi.py
index 88dcbe7..57b1597 100755
--- a/nxs/napi.py
+++ b/nxs/napi.py
@@ -1137,7 +1137,7 @@ class NeXus(object):
 
         Corresponds to NXgetattr(handle,name,data,&length,&storage)
         """
-        if dtype is 'char': length += 1  # HDF4 needs zero-terminator
+        if dtype == 'char': length += 1  # HDF4 needs zero-terminator
         dummy_data,pdata,size,datafn = self._poutput(str(dtype),[length])
         storage = c_int(_nxtype_code[str(dtype)])
         # print("getattr", self._loc(), name, length, size, dtype)
diff --git a/nxs/tree.py b/nxs/tree.py
index 6b4365e..8f31793 100644
--- a/nxs/tree.py
+++ b/nxs/tree.py
@@ -539,7 +539,7 @@ def _readaxes(axes):
     The delimiter separating each axis can be white space, a comma, or a colon.
     """
     import re
-    sep=re.compile('[\[]*(\s*,*:*)+[\]]*')
+    sep=re.compile(r'[\[]*(\s*,*:*)+[\]]*')
     return filter(lambda x: len(x)>0, sep.split(axes))