Closed herm closed 6 years ago
This does look a real issue and according to the discussion in the commit, the commit can be safely reverted. I will trigger bors next Monday if nobody is against.
Actually this seems to raise quite a lot of issue see related fixes in #67 #86 #70.
This is revert of change in #59 and is duplicate of #86 . And #70 wouldn't work if encode called explicitly in session. #76 tries to fix it another way.
Function is called from 3 files only:
I propose to accept this and caller shall send proper reader (with encode if necessary). For example in usb.py, this function is called:
return self._read(lambda: self.interface.read(count),
count,
So when not working for usb, it shall be changed to:
return self._read(lambda: self.interface.read(count).encode('ascii'),
count,
Similar code is in serial.py.
@skrchnavy could you make a new PR:
I would prefer to see every issues being fixed at once and hopefully once and for all.
OK, I will test it with both python 2.7 and 3.6 to assure working common way
Closed by #119
Revert 84fe24d4. With this code transfering binary data is not possible. Tested on both python 2.7 and python 3.4.