tostring() deprecated
seen in logs:
2024-02-03 20:22:28,567 py.warnings
WARNING /home/blissadm/local/bliss.git/bliss/controllers/motors/icepap/comm.py:110:
DeprecationWarning: tostring() is deprecated. Use tobytes() instead.
full_cmd = b"%s\n%s%s" % (cmd, header, data.tostring())
[(bliss) guilloud@pcsht]$ git grep tostring
comm/gpib/_gpib.py: return msg.tostring()
common/image_tools.py: data = arry.tostring()
common/image_tools.py: if hasattr(pil, "tostring"):
common/image_tools.py: data = pil.tostring() # PIL
controllers/ct2/card.py: return self.pwrite(array.tostring(), offset)
controllers/motors/icepap/comm.py: full_size = header_size + len(data.tostring())
controllers/motors/icepap/comm.py: bin_header + data.tostring() + b"\0" * (aligned_full_size - full_size),
controllers/motors/icepap/comm.py: full_cmd = b"%s\n%s%s" % (cmd, header, data.tostring())
controllers/pepu.py:def ChannelConfig_tostring(cfg):
controllers/pepu.py:ChannelConfig.tostring = ChannelConfig_tostring
controllers/pepu.py:def BissConfig_tostring(cfg):
controllers/pepu.py:BissConfig.tostring = BissConfig_tostring
controllers/pepu.py:def Trigger_tostring(trigger):
controllers/pepu.py:Trigger.tostring = Trigger_tostring
controllers/pepu.py:def StreamInfo_tostring(s):
controllers/pepu.py: result += "TRIG", s.trigger.tostring()
controllers/pepu.py:StreamInfo.tostring = StreamInfo_tostring
controllers/pepu.py: _config = ChannelAttr("CHCFG", ChannelConfig.fromstring, ChannelConfig.tostring)
controllers/pepu.py: biss_config = ChannelAttr("BISSCFG", BissConfig.fromstring, BissConfig.tostring)
controllers/pepu.py: "BISSCFG", BissConfig.fromstring, lambda x: x.tostring().rsplit(" ", 1)[0]
controllers/pepu.py: "TRIG", decode=lambda x: x.trigger, encode=lambda x: x.tostring()
controllers/pepu.py: type(self).__name__, self.pepu.name, self.info.tostring()
controllers/pepu.py: self.raw_write_read("DSTREAM " + stream_info.tostring())
flint/flint.py: MESSAGE = "DeprecationWarning: tostring() is deprecated. Use tobytes() instead."
physics/diffraction.py:HKL.tostring = hkl_to_string
physics/diffraction.py: return "{}({})".format(self.crystal, self.plane.tostring())
physics/diffraction.py: self._planes[plane.tostring()] = plane
Edited by Cyril Guilloud