Skip to content

Python3 compatibility fix for end of urlopen read #969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arvoelke
Copy link

@arvoelke arvoelke commented Apr 6, 2020

Fixes #968. Context:

(base) arvoelke@abr09:~/git/mbed-cli/mbed$ python2 -c "print('' == b'')"
True
(base) arvoelke@abr09:~/git/mbed-cli/mbed$ python3 -c "print('' == b'')"
False

Hence the check used to work on Py2 only (for Py3, it would enter an infinite loop after hitting the end of the file). It should now work on both Py2 and Py3.

oxzi added a commit to oxzi/armmbed-docker that referenced this pull request Jul 3, 2020
Downloading libraries is broken in both mbed-cli's latest release and
HEAD for Python 3. There is a PR, which is now included as a patch[0].
Sigh.

[0]:ARMmbed/mbed-cli#969
@tpietruszka
Copy link

tpietruszka commented Apr 5, 2021

It would be great to get it merged (+ other Python 3 fixes - seems like there are a few remaining issues).

On my end I can confirmed that this change unblocked my mbed import

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 6, 2021

@ARMmbed/mbed-os-core Please review

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.

Hanging on 'Downloading library build "*" (might take a while)'
4 participants