Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Patched subprocess.Popen returns incorrect string type on Python 2 with universal newlines #1039
Among other things, this breaks Django's makemessages, which runs gettext subprocesses, and the return values of those bomb out if they contain non-ASCII characters. A trivial demonstration of the difference follows.
What I've run:
I'll be happy to work on this, as it's a matter of a certain urgency to us, but I could use some guidance.
Universal newlines have historically been a source of issues on Python 2 as far as exact compatibility with the stdlib goes. This is because the stdlib implements universal newlines on byte streams way down in the guts of the C implementation of file objects, and that functionality isn't exposed in a composable way to Python (where "composable" means "gevent can provide the IO on the underlying file descriptor). The only thing the stdlib exposes to implement this in a composable way, AFAIK, is
FileObjectThread is able to use the underlying stdlib C implementation because it doesn't have to be composable.