[New-bugs-announce] [issue6118] urllib.parse.quote_plus ignores optional arguments

Matt Giuca report at bugs.python.org
Tue May 26 18:15:24 CEST 2009

New submission from Matt Giuca <matt.giuca at gmail.com>:

urllib.parse.quote_plus will ignore its encoding and errors arguments if
its input string has a space in it.

Intended behaviour:
>>> urllib.parse.quote_plus("\xa2\xd8 \xff", encoding='latin-1')
Observed behaviour:
>>> urllib.parse.quote_plus("\xa2\xd8 \xff", encoding='latin-1')
(This just uses the default UTF-8 encoding).

Attached patch with test cases. This only affects Python 3.x (the 2.x
branch has no encoding/errors argument).

components: Library (Lib)
files: urllib_quote_plus.patch
keywords: patch
messages: 88368
nosy: mgiuca
severity: normal
status: open
title: urllib.parse.quote_plus ignores optional arguments
type: behavior
versions: Python 3.0, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14081/urllib_quote_plus.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list