Skip to content

Commit 3b9129f

Browse files
Delete Python 2 leftover (#387)
* Delete Python 2 leftover Detected by pyugrade. * Add to Python 2 removal release note Co-authored-by: jakirkham <[email protected]>
1 parent 65decf1 commit 3b9129f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

docs/release.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Maintenance
3434
By :user:`John Kirkham <jakirkham>`, :issue:`375`.
3535

3636
* Remove Python 2 code.
37-
By :user:`Dimitri Papadopoulos Orfanos <DimitriPapadopoulos>` :issue:`368`.
37+
By :user:`Dimitri Papadopoulos Orfanos <DimitriPapadopoulos>` :issue:`368`,
38+
:issue:`387`.
3839

3940
* Support Python 3.11.
4041
By :user:`Dimitri Papadopoulos Orfanos <DimitriPapadopoulos>`, :issue:`369`.

numcodecs/tests/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def check_backwards_compatibility(codec_id, arrays, codecs, precision=None, pref
276276
with open(codec_fn, mode='w') as cf:
277277
_json.dump(codec.get_config(), cf, sort_keys=True, indent=4)
278278
# load config and compare with expectation
279-
with open(codec_fn, mode='r') as cf:
279+
with open(codec_fn) as cf:
280280
config = _json.load(cf)
281281
assert codec == get_codec(config)
282282

numcodecs/vlen.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class VLenUTF8(Codec):
9898
for i in range(n_items):
9999
u = input_values[i]
100100
if u is None or u == 0: # treat these as missing value, normalize
101-
u = u''
101+
u = ''
102102
elif not PyUnicode_Check(u):
103103
raise TypeError('expected unicode string, found %r' % u)
104104
b = PyUnicode_AsUTF8String(u)

0 commit comments

Comments
 (0)