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 nagle
Recipients baikie, flox, gdamjan, loewis, nagle, ncoghlan, orsenthil, r.david.murray, vstinner
Date 2012-06-13.18:51:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1339613470.79.0.893960540274.issue9679@psf.upfronthosting.co.za>
In-reply-to
Content
A "IRI library" is not needed to fix this problem.  It's already fixed in the sockets library and the http library.  We just need consistency in urllib2.  

urllib2 functions which take a "url" parameter should apply "encodings.idna.ToASCII" to each label of the domain name.  

urllib2 function which return a "url" value (such as "geturl()") should apply "encodings.idna.ToUnicode" to each label of the domain name.

Note that in both cases, the conversion function must be applied to each label (field between "."s) of the domain name only.  Applying it to the entire domain name or the entire URL will not work. 

If there are future changes to domain syntax, those should go into "encodings.idna", which is the proper library for domain syntax issues.
History
Date User Action Args
2012-06-13 18:51:10naglesetrecipients: + nagle, loewis, ncoghlan, orsenthil, vstinner, baikie, gdamjan, r.david.murray, flox
2012-06-13 18:51:10naglesetmessageid: <1339613470.79.0.893960540274.issue9679@psf.upfronthosting.co.za>
2012-06-13 18:51:10naglelinkissue9679 messages
2012-06-13 18:51:09naglecreate