From 511b0222bf5154fd93f0a0bcd71cd6814232d3d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 17 Mar 2020 18:10:30 +0100
Subject: [PATCH 2/2] Remove use of deprecated method
For compatibility with python3.9.
---
igor/struct.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/igor/struct.py b/igor/struct.py
index 8ad182fbf8..dbc508d5d2 100644
--- a/igor/struct.py
+++ b/igor/struct.py
@@ -433,7 +433,7 @@ class Structure (_struct.Struct):
You can also read out from strings:
- >>> d = experiment.unpack(b.tostring())
+ >>> d = experiment.unpack(b.tobytes())
>>> pprint(d)
{'runs': [{'data': array([[1543, 2057, 2571],
[3085, 3599, 4113]]),
@@ -447,9 +447,9 @@ class Structure (_struct.Struct):
values are filled in with their defaults.
>>> experiment.pack_into(buffer=b, data=d)
- >>> b.tostring()[:17]
+ >>> b.tobytes()[:17]
b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10'
- >>> b.tostring()[17:]
+ >>> b.tobytes()[17:]
b'\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !'
>>> run0 = d['runs'].pop(0)
>>> b = experiment.pack(data=d)