[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2021-11-29 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11: Traceback (most recent call last): File "/Users/iritkatriel/src/cpython-1/Lib/encodings/idna.py", line 165, in encode raise UnicodeError("label empty or too long") ^ UnicodeError: label

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-05-05 Thread Mike Milkin
Mike Milkin added the comment: Moved the conditional logic out of the method. There are no tests for ToASCII function and I was not comfortable making changes to it without adding tests. -- Added file: http://bugs.python.org/file30139/Issue9682-5513.patch

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-27 Thread Mike Milkin
Mike Milkin added the comment: Dave, let me know what you think of the tests, ill fix the rest of your comments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682 ___

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-26 Thread R. David Murray
R. David Murray added the comment: As I said in the review, thanks for working more on this. For the reason for (3), look at the test just before the ones you added. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-22 Thread Mike Milkin
Mike Milkin added the comment: There are a few of interesting parts. 1.) I noticed that the ToASCII class is not tested. 2.) I had some unreachable branches due to concatenation of constant variable ace_prefix. 3) I also found it weird that we only check the max of labels[-1], but decided

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-22 Thread Mike Milkin
Changes by Mike Milkin mmil...@gmail.com: Removed file: http://bugs.python.org/file29850/Issue9682-full.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682 ___

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-22 Thread Mike Milkin
Changes by Mike Milkin mmil...@gmail.com: Removed file: http://bugs.python.org/file29984/Issue9682.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682 ___

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-22 Thread Mike Milkin
Changes by Mike Milkin mmil...@gmail.com: Added file: http://bugs.python.org/file29985/Issue9682-42213.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682 ___

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-21 Thread Mike Milkin
Mike Milkin added the comment: Sure ill modify the patch, thanks for the feedback. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682 ___ ___

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-20 Thread R. David Murray
R. David Murray added the comment: The message in both branches of the if talk about empty labels, which is probably my fault since I got the sense of the if wrong in my suggestion. One of them should be about the label being too long. The one that should be the 'empty' message also doesn't

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-14 Thread Mike Milkin
Mike Milkin added the comment: I did not mean to take the decode out of the previos patch. Sorry for the spam. -- Added file: http://bugs.python.org/file29850/Issue9682-full.patch ___ Python tracker rep...@bugs.python.org

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-14 Thread Mike Milkin
Changes by Mike Milkin mmil...@gmail.com: Removed file: http://bugs.python.org/file29834/Issue9682-full.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682 ___

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-13 Thread Mike Milkin
Mike Milkin added the comment: This patch adds better exception messages. If any label other then the last is empty or is too long the request is added to the exception message. If the last label is over 64, the label is added to the exception message -- keywords: +patch nosy:

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-13 Thread R. David Murray
R. David Murray added the comment: Thanks, Mike. I made some review comments (you should have gotten an email, or look at them via the 'review' link on the patch). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-13 Thread Mike Milkin
Mike Milkin added the comment: Made changes to to the tests and made changes to the error messages. I think decode() is valid since the input is already ascii encoded. -- Added file: http://bugs.python.org/file29834/Issue9682-full.patch ___ Python

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2010-08-26 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682 ___ ___ Python-bugs-list

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2010-08-26 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9682 ___ ___

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2010-08-26 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: why is it a UnicodeError? Because IDNA is an encoding, and codecs are supposed to raise UnicodeErrors. The string you are trying to encode is not supported in the encoding in question. It would be possible to catch the UnicodeError, and

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2010-08-26 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ah, I wondered if it was something like that (encoding=UnicodeError). It's not really a *unicode* error, it's a syntax error in the domain name construction (ie: it is invalid whether or not unicode is involved, it just isn't caught in

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2010-08-26 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Ah, I wondered if it was something like that (encoding=UnicodeError). It's not really a *unicode* error, it's a syntax error in the domain name construction (ie: it is invalid whether or not unicode is involved, it just isn't caught in