-
Notifications
You must be signed in to change notification settings - Fork 51
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
make existing code Py3 compatible (WIP) #142
Conversation
@@ -188,4 +190,9 @@ def send_all(p, data): | |||
sent = p.send(data) | |||
if sent is None: | |||
raise Exception(MESSAGE) | |||
data = buffer(data, sent) | |||
try: | |||
if isinstance(data, str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be part of the try block
seems ok, but there's never a need to copy/paste code. |
I still care about this, should I revive it and fix the remark,s @stdweird? I hope to have Python 3 support in EB v3. |
we should wait after jens his talk. |
OK, on hold until further notice then. There are a couple of more involved things I couldn't figure out, so this PR is certainly not complete, but it a major step forward towards Py3 compatibility. |
data = data.encode() | ||
data = memoryview(data) #[:sent] # sent? | ||
except NameError: | ||
data = buffer(data, sent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this really what you intended?
data
could be encoded here, or maybe not.
@JensTimmerman you were looking into an approach with |
All tests PASSed. See https://jenkins1.ugent.be/job/vsc-base-prbuilder/57/console for more details. |
follow-up in #231 |
This effectively makes
vsc-base
require Python 2.6, so be careful when merging this in (EasyBuild, which needsvsc-base
will only move to Python 2.6 early 2015).Currently WIP, not all unit tests pass yet with Python3 (but they still do using Python2.6).
Maybe this should include a bump to v2.0?