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.

classification
Title: "idna" encoding (drawing unicodedata) necessary in httplib?
Type: enhancement Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, kxroberto, lemburg
Priority: normal Keywords:

Created on 2006-04-18 09:28 by kxroberto, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
httplib_idna.patch kxroberto, 2006-04-19 13:04
Messages (4)
msg54781 - (view) Author: kxroberto (kxroberto) Date: 2006-04-18 09:28
httplib employs the "idna" encoding. that leads to
errors in py2exe/cxfreeze. And if forced into the
installer, it draws the 400kB+ unicodedata.pyd (on Win)
in innocent small apps. Otherwise no normal technical
modules draw the unicodedata.

Is that really necessary?

msg54782 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2006-04-18 09:59
Logged In: YES 
user_id=38388

I agree - in most cases, ASCII will be used for hostnames
(where the idna encoding is being used in httplib). 

A little helper function to first try .encode('ascii') and
then revert to .encode('idna') would do wonders.

Patches are welcome !
msg54783 - (view) Author: kxroberto (kxroberto) Date: 2006-04-19 09:41
Logged In: YES 
user_id=972995

a patch attached
msg54784 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-05-03 18:03
Logged In: YES 
user_id=849994

Slightly reformatted version of patch applied in rev. 45890.
History
Date User Action Args
2022-04-11 14:56:16adminsetgithub: 43236
2006-04-18 09:28:35kxrobertocreate