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.000306047
Marked as misclassified No
Message-id <>
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/ Added missing "import sys".
Date User Action Args
2008-07-07 14:50:31mgiucasetspambayes_score: 0.000306047 -> 0.000306047
recipients: + mgiuca
2008-07-07 14:50:30mgiucasetspambayes_score: 0.000306047 -> 0.000306047
messageid: <>
2008-07-07 14:50:29mgiucalinkissue3314 messages
2008-07-07 14:50:28mgiucacreate