Issue1153

classification
Title: idna encoding support
Type: Severity: normal
Components: Library Versions: Jython 2.7, Jython 2.5
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: amak Nosy List: Arfrever, amak, fwierzbicki, pjenvey, robottaway, whit537, zyasoft
Priority: low Keywords:

Created on 2008-10-14.23:33:18 by pjenvey, last changed 2014-05-10.05:31:41 by zyasoft.

Messages
msg3685 (view) Author: Philip Jenvey (pjenvey) Date: 2008-10-14.23:33:17
We currently lack idna, historically due to the fact that we lacked 
unicodedata and stringprep module also

We now have most of a unicodedata implementation but this doesn't help 
idna/stringprep due to it specifically relying on unicode 3.2

idna isn't used for many things but critical for correctly converting 
unicode/nonascii hostnames to ascii. I see 2 uses of it in the stdlib, 
in httplib and the socket module

We can likely leverage Java 6's java.net.IDN for this
msg3695 (view) Author: Jim Baker (zyasoft) Date: 2008-10-20.00:11:43
I'm in the process of rewriting unicodedata so that it's in Java, using
constant initializers. Part of this means we will have support for the
3.2 database.

When this is all done, we shouldn't need to rely on Java 6 for either
idna or for unicodedata.normalize.
msg6225 (view) Author: Rob Ottaway (robottaway) Date: 2010-11-03.15:12:23
This is still an issue in the latest 2.5.2 RC, and it's a show stopper for httplib2 (and httplib I believe), along with other libraries. IF this issue persists it'll force Jython users (like me) into using Java's Http-Commons library, which just doesn't compare.

Any chance of squeezing this in for the soon to be released 2.5.2?
msg6227 (view) Author: Jim Baker (zyasoft) Date: 2010-11-03.15:57:47
It will not make 2.5.2, but we could release it as a separate package on PyPI. It would require Java 6 for java.net.IDN. (The unicodedata rewrite I mention in msg3695 is dead, although we may try again for 2.6+.)
msg6398 (view) Author: Alan Kennedy (amak) Date: 2011-02-13.21:01:41
I have checked in partial support for Internationalized Domain Names at revision 7198.

This new support only works on Java 6, which includes native IDNA functionality.

However, there is also a workaround for Java 5.

I have documented the new support and the workarounds on the socket module wiki.

http://wiki.python.org/jython/NewSocketModule#InternationalizedDomainNamesupport
msg6874 (view) Author: Alan Kennedy (amak) Date: 2012-03-19.20:53:44
This issue is specific to IDNs in the socket module, which has been addressed as much as possible.

1. It works fine on Java 6
2. There is a documented workaround for Java 5.

Resolving this issue as fixed.
msg6876 (view) Author: Philip Jenvey (pjenvey) Date: 2012-03-19.20:55:52
I wouldn't consider this fixed until u'foo'.encode('idna') works (which doesn't last time I checked)
msg7083 (view) Author: Chad Whitacre (whit537) Date: 2012-05-10.15:19:14
> I wouldn't consider this fixed until u'foo'.encode('idna') works 
> (which doesn't last time I checked)

+1

We're getting bit by this in http://aspen.io/. We can work around it with a Jython shim, though obviously the fewer of those we need, the better.
msg8363 (view) Author: Jim Baker (zyasoft) Date: 2014-05-10.05:31:33
Fixed in 7137:a9283b590960

Will not be fixed in 2.5
History
Date User Action Args
2014-05-10 05:31:41zyasoftsetstatus: open -> closed
resolution: remind -> fixed
2014-05-10 05:31:33zyasoftsetmessages: + msg8363
2013-06-27 00:24:29Arfreversetnosy: + Arfrever
2013-02-19 18:19:18fwierzbickisetnosy: + fwierzbicki
versions: + Jython 2.5, Jython 2.7, - 2.5.1, 2.5.2b1
2013-02-11 05:29:41pjenveysetstatus: closed -> open
resolution: fixed -> remind
2012-05-10 15:19:15whit537setnosy: + whit537
messages: + msg7083
2012-03-19 20:55:52pjenveysetmessages: + msg6876
2012-03-19 20:53:44amaksetstatus: open -> closed
assignee: zyasoft -> amak
resolution: fixed
messages: + msg6874
2011-02-13 21:01:41amaksetnosy: + amak
messages: + msg6398
2010-11-03 15:57:47zyasoftsetmessages: + msg6227
2010-11-03 15:12:24robottawaysetnosy: + robottaway
messages: + msg6225
versions: + 2.5.2b1
2009-03-21 13:04:45zyasoftsetpriority: low
2009-03-12 07:45:42zyasoftsetcomponents: + Library, - Core
versions: + 2.5.1
2008-10-26 18:54:34zyasoftsetassignee: zyasoft
2008-10-20 00:11:44zyasoftsetnosy: + zyasoft
messages: + msg3695
2008-10-14 23:33:18pjenveycreate