Skip to content

Conversation

@hackalog
Copy link
Contributor

@hackalog hackalog commented Jan 4, 2019

on python 2, socket.fp doesn't have a readinto() method, leading to errors like that seen here: kivy/kivy-ios#322 (comment).

Work around this limitation the same way it is worked around in read(); e.g.

if PY2:
data = self.fp.read(len(b))
n = len(data)
b[:n] = data
else:
n = self.fp.readinto(b)

…this like limitation like is done elsewhere in this module
@jmadler
Copy link
Contributor

jmadler commented Mar 13, 2019

Thanks for doing this! Can you add a unit test for regression testing please?

@jmadler jmadler merged commit d6821d6 into PythonCharmers:master May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants