[New-bugs-announce] [issue22586] urljoin allow_fragments doesn't work

Alex Parrill report at bugs.python.org
Thu Oct 9 18:00:33 CEST 2014


New submission from Alex Parrill:

Passing False to the allow_fragments argument to urljoin doesn't remove fragments.

Is this a bug, or am I misunderstanding the allow_fragments parameter? It's not perfectly clear what "fragment identifiers are not allowed" means (strips them out? throws an error?)

I'm running this on XUbuntu 14.04.01.

$ python3
Python 3.4.0 (default, Apr 11 2014, 13:05:11) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.parse import urljoin
>>> urljoin("http://localhost:8000/foo.html", "bar.html#baz", allow_fragments=False)
'http://localhost:8000/bar.html#baz'

----------
components: Library (Lib)
messages: 228877
nosy: ColonelThirtyTwo
priority: normal
severity: normal
status: open
title: urljoin allow_fragments doesn't work
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22586>
_______________________________________


More information about the New-bugs-announce mailing list