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 georg.brandl
Recipients ColonelThirtyTwo, docs@python, georg.brandl, orsenthil
Date 2014-10-09.16:50:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412873450.95.0.997316479978.issue22586@psf.upfronthosting.co.za>
In-reply-to
Content
The "not allowed" should be clarified.  What is meant is that if allow_fragments is false, a fragment is parsed as part of the path.

This doesn't make a difference for urljoin if the fragment is part of the second part.  It does make a difference for the first part:

>>> urljoin('http://www.example.com/#frag/', 'foo#bar', allow_fragments=True)
'http://www.example.com/foo#bar'

>>> urljoin('http://www.example.com/#frag/', 'foo#bar', allow_fragments=False)
'http://www.example.com/#frag/foo#bar'

For reference, the urlparse() results:

>>> urlparse('http://www.example.com/#frag/', allow_fragments=True)
ParseResult(scheme='http', netloc='www.example.com', path='/', params='', query='', fragment='frag/')

>>> urlparse('http://www.example.com/#frag/', allow_fragments=False)
ParseResult(scheme='http', netloc='www.example.com', path='/#frag/', params='', query='', fragment='')
History
Date User Action Args
2014-10-09 16:50:50georg.brandlsetrecipients: + georg.brandl, orsenthil, docs@python, ColonelThirtyTwo
2014-10-09 16:50:50georg.brandlsetmessageid: <1412873450.95.0.997316479978.issue22586@psf.upfronthosting.co.za>
2014-10-09 16:50:50georg.brandllinkissue22586 messages
2014-10-09 16:50:50georg.brandlcreate