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 mgiuca
Recipients mgiuca
Date 2008-07-07.14:50:26
SpamBayes Score 0.00030604703
Marked as misclassified No
Message-id <1215442230.29.0.593652627296.issue3314@psf.upfronthosting.co.za>
In-reply-to
Content
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".
History
Date User Action Args
2008-07-07 14:50:31mgiucasetspambayes_score: 0.000306047 -> 0.00030604703
recipients: + mgiuca
2008-07-07 14:50:30mgiucasetspambayes_score: 0.000306047 -> 0.000306047
messageid: <1215442230.29.0.593652627296.issue3314@psf.upfronthosting.co.za>
2008-07-07 14:50:29mgiucalinkissue3314 messages
2008-07-07 14:50:28mgiucacreate