[issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://'
New submission from Michael Glassford : An unfortunate side-effect of this change: http://svn.python.org/view/python/branches/release26-maint/Lib/urlparse.py?r1=66717&r2=78235 which was made to fix this issue: http://bugs.python.org/issue7904 is that urlparse.urlunparse(urlparse.urlparse('x://')) now returns 'x:' instead of 'x://', and urlparse.urlunparse(urlparse.urlparse('x:///y')) now returns 'x:/y' instead of 'x:///y'. This behavior exists in at least Python 2.6 and 3.1, but not in 2.5. -- messages: 102569 nosy: Michael Glassford severity: normal status: open title: urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://' type: behavior versions: Python 2.6, Python 3.1 ___ Python tracker <http://bugs.python.org/issue8339> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://'
Michael Glassford added the comment: It caused a minor issue with the Schemes extension for Mercurial: the output changed, which caused a unit test to fail. I'm pretty sure I have a Mercurial patch to fix that issue, however. -- ___ Python tracker <http://bugs.python.org/issue8339> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://'
Michael Glassford added the comment: > In those cases, I would assume that 'x://y', x:/y','x:/','/' > as valid URLS, but not the two examples you mentioned. Only 2 comments about this: 1) Although the urlparse documentation does mention the relevant RFCs, on a quick read-through I don't see that it actually requires its input to be a valid URL. 2) Obviously, some code is using it for invalid URLs. > Michael, RDM: If you have any comments on msg102737, > let me know. Otherwise we can close this issue as wont-fix. I don't have a problem with this. I reported the issue to bring attention to the fact that the change affected real code and to see if anyone had suggestions for dealing with the problem in a better way (at the moment, I don't). > By the way, I’ve been meaning to file a bug against the > Mercurial schemes extension... Please do. I don't have anything to do with the Schemes extension except that I found this issue while investigating a unit test failure, but if you file an issue probably I will look into it--or if I don't, then someone else probably will. -- ___ Python tracker <http://bugs.python.org/issue8339> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com