This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author karlcow
Recipients BreamoreBoy, ezio.melotti, karlcow, mher, orsenthil, takahashi.shuhei
Date 2014-10-07.07:45:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412667919.39.0.0601333801212.issue18119@psf.upfronthosting.co.za>
In-reply-to
Content
OK I fixed the code. The issue is here
https://hg.python.org/cpython/file/1e1c6e306eb4/Lib/urllib/request.py#l656

        newurl = urlunparse(urlparts)

Basically it reinjects the fragment in the new url. The fix is easy.

        if urlparts.fragment:
            urlparts = list(urlparts)
            urlparts[5] = ""
        newurl = urlunparse(urlparts)

I was trying to make a test for it, but failed. Could someone help me for the test so I can complete the patch?

Added the code patch only.
History
Date User Action Args
2014-10-07 07:45:19karlcowsetrecipients: + karlcow, orsenthil, ezio.melotti, mher, BreamoreBoy, takahashi.shuhei
2014-10-07 07:45:19karlcowsetmessageid: <1412667919.39.0.0601333801212.issue18119@psf.upfronthosting.co.za>
2014-10-07 07:45:19karlcowlinkissue18119 messages
2014-10-07 07:45:19karlcowcreate