Skip to content

Conversation

@vstinner
Copy link
Contributor

On Python 3, GreenFileIO.write() now always write all bytes using a
loop, to have the same behaviour than GreenPipe.write() on Python 2.
Before, the write() could be partial, write less bytes than expected.

On Python 2, GreenPipe.write() doesn't allow partial writes, it
always write all bytes, even if the user requested an unbuffered pipe
(ex: by calling os.fdopen(fd, 'wb', 0)).

Modifying Python 2 to be pedantic and allow partial writes for
unbuffered pipes will likely break a lot of applications. It's
simpler to modify Python 3 GreenFileIO to behave the same than Python
2 GreenPipe.

On Python 3, GreenFileIO.write() now always write all bytes using a
loop, to have the same behaviour than GreenPipe.write() on Python 2.
Before, the write() could be partial, write less bytes than expected.

On Python 2, GreenPipe.write() doesn't allow partial writes, it
always write all bytes, even if the user requested an unbuffered pipe
(ex: by calling os.fdopen(fd, 'wb', 0)).

Modifying Python 2 to be pedantic and allow partial writes for
unbuffered pipes will likely break a lot of applications. It's
simpler to modify Python 3 GreenFileIO to behave the same than Python
2 GreenPipe.
@vstinner
Copy link
Contributor Author

Hi, any progress on this change?

@temoto
Copy link
Member

temoto commented Oct 13, 2015

Thank you, the fix is merged in master e3f8834

@temoto temoto closed this Oct 13, 2015
@vstinner
Copy link
Contributor Author

Wow, it's crazy how much I got from Travis because tests failed!

Please review my pull request #254 which fixes eventlet tests on Python 3. It's a regression introduced by the commit 299da78.

@temoto
Copy link
Member

temoto commented Oct 13, 2015

Yup, sorry, for some reason I wanted a green build this time.

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