classification
Title: urllib.parse doesn't import sys
Type: compile error Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: facundobatista, mgiuca
Priority: normal Keywords: patch

Created on 2008-07-07 14:50 by mgiuca, last changed 2008-07-07 18:26 by facundobatista. This issue is now closed.

Files
File name Uploaded Description Edit
parse.py.patch mgiuca, 2008-07-07 14:50 Patch for revision 64772; commit log in comments.
Messages (2)
msg69389 - (view) Author: Matt Giuca (mgiuca) Date: 2008-07-07 14:50
urllib.parse doesn't import sys, which is needed on line 368, in an
error condition for urlencode. This is only a problem when urlencode has
a TypeError.

Current behaviour:
>>> urllib.parse.urlencode("foo")
NameError: global name 'sys' is not defined

Desired behaviour:
>>> urllib.parse.urlencode("foo")
TypeError: not a valid non-string sequence or mapping object

Only affects Python 3.0. (After urllib module was split up).

Patch attached, for revision 64772.

Commit log:

urllib/parse.py: Added missing "import sys".
msg69392 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2008-07-07 18:26
Commited in r64781, thank you!!
History
Date User Action Args
2008-07-07 18:26:32facundobatistasetstatus: open -> closed
resolution: accepted
messages: + msg69392
nosy: + facundobatista
2008-07-07 14:50:29mgiucacreate