We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f1b448e + 46d64db commit 09bfbf2Copy full SHA for 09bfbf2
.pylintrc
@@ -517,7 +517,7 @@ init-import=no
517
518
# List of qualified module names which can have objects that can redefine
519
# builtins.
520
-redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
+redefining-builtins-modules=builtins,io
521
522
523
[CLASSES]
nixio/hdf5/h5dataset.py
@@ -6,11 +6,16 @@
6
# Redistribution and use in source and binary forms, with or without
7
# modification, are permitted under the terms of the BSD License. See
8
# LICENSE file in the root of the Project.
9
-from six import ensure_str
10
import numpy as np
11
from ..datatype import DataType
12
from .. import util
13
+def ensure_str(s):
14
+ if isinstance(s, bytes):
15
+ return s.decode()
16
+ else:
17
+ return s
18
+
19
20
class H5DataSet:
21
nixio/property.py
@@ -13,13 +13,18 @@
from collections import Sequence, Iterable
from enum import Enum
from numbers import Number
-from six import ensure_str, ensure_text
from .datatype import DataType
from .entity import Entity
from . import util
22
23
24
25
26
27
28
29
class OdmlType(Enum):
30
"""
@@ -249,7 +254,7 @@ def values(self):
249
254
250
255
def data_to_value(dat):
251
256
if isinstance(dat, bytes):
252
- dat = ensure_str(dat) # py2compat
257
+ dat = dat.decode()
253
258
return dat
259
260
values = tuple(map(data_to_value, data))
@@ -274,7 +279,7 @@ def values(self, vals):
274
279
# Make sure all values are of the same data type
275
280
vtype = self._check_new_value_types(vals)
276
281
if vtype == DataType.String:
277
- vals = [ensure_text(v) for v in vals] # py2compat
282
+ vals = [str(v) for v in vals]
278
283
self._h5dataset.shape = np.shape(vals)
284
data = np.array(vals, dtype=vtype)
285
self._h5dataset.write_data(data)
scripts/dorelease.py
@@ -105,7 +105,7 @@ def update_info(newver):
105
infodict = json.load(infofile)
106
107
verstring = infodict["VERSION"]
108
- newverstring = re.sub("[0-9\.a-z]+", newver, verstring)
+ newverstring = re.sub(r"[0-9\.a-z]+", newver, verstring)
109
110
if newverstring == verstring:
111
print("No changes required in info.json")
@@ -140,7 +140,7 @@ def update_ci_confs(newver):
140
newconf = []
141
for line in oldconf:
142
if "NIX_BRANCH" in line:
143
- line = re.sub("1\.[0-9\.]+[0-9\.a-z]+(dev){0,1}", nixbranch, line)
+ line = re.sub(r"1\.[0-9\.]+[0-9\.a-z]+(dev){0,1}", nixbranch, line)
144
line = line.replace("master", nixbranch)
145
newconf.append(line)
146
@@ -168,7 +168,7 @@ def update_ci_confs(newver):
168
# newconf = []
169
# for line in oldconf:
170
# if "NIX_VERSION" in line:
171
- # line = re.sub("'[1-9\.a-z]+'", "'" + newver + "'", line)
+ # line = re.sub(r"'[1-9\.a-z]+'", "'" + newver + "'", line)
172
# newconf.append(line)
173
174
# diff = diff_lines(oldconf, newconf)
setup.py
@@ -53,6 +53,11 @@ def get_wheel_data():
53
'Programming Language :: Python',
54
'Programming Language :: Python :: 3.6',
55
'Programming Language :: Python :: 3.7',
56
+ 'Programming Language :: Python :: 3.8',
57
+ 'Programming Language :: Python :: 3.9',
58
+ 'Programming Language :: Python :: 3.10',
59
+ 'Programming Language :: Python :: 3.11',
60
+ 'Programming Language :: Python :: 3.12',
61
'Topic :: Scientific/Engineering'
62
]
63
@@ -78,7 +83,7 @@ def get_wheel_data():
78
83
tests_require=['pytest', 'scipy', 'pillow', 'matplotlib'],
79
84
test_suite='pytest',
80
85
setup_requires=['pytest-runner'],
81
- install_requires=['numpy', 'h5py', 'six', 'enum34;python_version<"3.4"'],
86
+ install_requires=['numpy', 'h5py'],
82
87
package_data={'nixio': [license_text, description_text]},
88
include_package_data=True,
89
zip_safe=False,
0 commit comments