Skip to content

Commit

Permalink
Update vlen_leak script for Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Apr 27, 2021
1 parent a468de1 commit c172d01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions other/vlen_leak.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def make_data(kind):
if kind is bytes:
s = b"xx"
else:
s = b"xx".decode('utf8')
s = "xx"

dt = h5py.vlen_dtype(kind)
data = np.array([s*100 for idx in range(1000)])
Expand Down Expand Up @@ -80,6 +80,6 @@ def attr_leak():
ds_leak()
print("Unicode test")
print("============")
make_data(unicode)
make_data(str)
attr_leak()
ds_leak()

0 comments on commit c172d01

Please sign in to comment.