-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix attempt for unicode bug #1137 #1772
Conversation
This won't work on Python 3, and is probably not required there at all. It makes sure that all entries from complete_log are bytestrings when join()ing, before writing to the file. The issue (github pypa#1137) was that a single unicode object on the list would cause all the bytestrings to be converted to unicode, probably through the 'ascii' encoder (which would then fail on 8-bit characters).
The way PIP is setup, the log file expects bytestrings on Python 2 (which is why I added |
There is no |
Two things:
|
Surely you can change the function name yourself... I filed this patch 9 months ago for something that I think is a very serious bug. The fact that it prevents the log from reporting anything useful afterwards make it all the more important. Merge it if you want, but I personally don't have time to update your tests (any more). |
Sure it's not a nice bug and it'd be good to have it fixed. There are a number of bugs like that and limited time, and while you may have filed the original patch 9 months ago, it didn't work on Python 3.x until 5 days ago. There is a long laundry list of things to do and this patch isn't merge ready as it is. A maintainer (myself included) may get around to it but we're all pretty busy and this isn't hardly the only bug. |
Tests without the patch (failure on Python 2, that's the point): https://travis-ci.org/pypa/pip/builds/32825248 |
There were 3 things ;-)
1bede5b renames to
added with 93d4d6b
added with d017938 |
Compatibility code like I also remember this commit from @dholth attempting to fix somewhat the same issue, can you report it did not (or did not for all cases)? |
Looking at that patch, the Indeed that function But if I rebase, this is the last time. This is a one-year-old fix for a very serious bug that I am tired of dragging around every time you decide a name isn't right or the stars aren't aligned. Not that it matters though, since 1.6 probably won't happen this year... I'll probably do that over the week-end. |
Hmm, took a bit more than the week-end. Anyway, submitted #2012. |
Didn't get to saying it earlier @remram44 , but wanted to note that yes we are always appreciative of bugfixes! Unfortunately the encoding problems have been a very hard bugs to fix, having things mostly work with python 2 pip code, then more and more cases pop up with people having unicode somethings, and it breaking sporadically, but then also having to deal with making sure any fix works for both python 3 and python 2 (not easy task with encoding problems), and is of good quality, and hopefully has regression tests to make sure it actually fixes the existing failing use cases. There's been a number of attempts and not all of them up to scratch, but we want to make sure we try and get one in that actually does the job, along with the code quality standard that is demanded of all patches. That's essentially why we are very careful to merge in these fixes, even though we're appreciative of them coming from the community. |
New pull request because Github just doesn't get rebases. Original: #1179 Issue: #1137
2013-08-31, remram44:
Still need tweaking to work with Python 3.