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
urljoin() with no directory segments duplicates filename #67891
Comments
This is a regression caused by revision 901e4e52b20a. Before (e.g. Python 3.4): >>> urljoin('a', 'b')
'b' After: >>> urljoin('a', 'b')
'b/b' This was identified in <https://bugs.python.org/issue18828#msg238363\> but is actually caused by the revision committed for bpo-22278. |
Nice work tracking down the commit, thanks for that. I've attached a fix. |
Patch looks good enough. BTW I was thinking of something like this, which is a bit simpler, but I never tested it: segments[1:-1] = filter(None, segments[1:-1]) |
Yep, that's a lot cleaner and tests pass. I've updated the patch with that line. Thanks. |
Any chance this regression can be fixed before the next release? |
New changeset fc0e79387a3a by Berker Peksag in branch 'default': |
Thanks! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: