-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Initial cut for fix of issue #1231 #1235
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
Conversation
OK, I see failures on Travis. This could be because the encoding when LANG=oops is environment-dependent :-( @mnaberez can you test this locally and see what happens? In several of the failures, it doesn't even get around to running the child process. I can't restart the Travis jobs, though. |
OK, I had some time to look at this again. The @mnaberez do you want to take a look and see if you think it's ready to merge? |
I tested it on Python 2.7.15 and 3.6.7: Python 2.7.15
|
Thanks for this patch! The original issue in #1231 ( Since both Please let me know if you would be able to make that change. Either way, I would like to merge this and make a point release soon to fix the Python 2 issue. Thanks again. |
Merging. We can always update the warning message later. Thank you! |
Likely too late to make this change and probably not something that could be done on a minor point release but since I spent a ton of time on this just yesterday... Migrating from version 3 to version 4, my event listeners read from supervisor over stdin using a byte stream and then did the conversion to utf8 and chose to "backslashreplace" undecodable utf8 data. When I went to version 4 I expected to continue to get a byte stream that I could convert myself to whatever encoding I knew the data to be in. It was really unexpected to discover that supervisor was doing the conversion for me and then telling me the number of characters to read off of stdin and not the number of bytes. So I wish that supervisor would leave the encoding decision (and what to do when the data doesn't decode correctly) to the client and not do it for me. But I'm sure that decision is too late to be changed, especially in a point release. |
I've added a warning in the
tailf
command, and also changed the exception raised onUnicodeEncodeError
to have a more informative message. A couple of related new end-to-end tests have been added and on my Ubuntu system, all tests pass withtox
on all configured platforms.