Skip to content
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

communicate takes bytes as inputs #3

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

Conversation

thrasibule
Copy link

No description provided.

@tarruda
Copy link
Owner

tarruda commented Jun 28, 2016

communicate takes bytes as inputs

Yes, so why remove the encode call? Without it the module is incompatible with python 3

@thrasibule
Copy link
Author

Well I'm using python 3.5, and you need to remove encode for it to run.

@hainm
Copy link

hainm commented Aug 11, 2016

I agree with @thrasibule

@tarruda
Copy link
Owner

tarruda commented Sep 15, 2016

Can you make this PR pass tests on 3.4? If you want, also add a 3.5 test

@per42
Copy link

per42 commented Sep 16, 2016

Fixed this in my PR. encode correctly creates bytes from string, which communicate expects. The problem was that the code string that encode is called on, was actually bytes when executed with cli / as script, since it reads the input as 'rb'.

@fake-name fake-name mentioned this pull request Jul 20, 2017
anthrotype added a commit to anthrotype/python-autopxd that referenced this pull request Mar 24, 2018
python-autopxd already requires six, but the new `ensure_binary`
function is only in the git repo and hasn't been released to PyPI yet,
so I temporarily copied it here.

The source comes from:
benjaminp/six#204

It's a trivial function (every py2.py3 project has its own way to do
the same thing).

Fixes tarruda#12
Supersedes tarruda#3
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.

4 participants