[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset adc72ff451dc by R David Murray in branch 'default': #2118: IOError is deprecated, use OSError. http://hg.python.org/cpython/rev/adc72ff451dc -- ___ Python tracker _

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Ned Jackson Lovely
Ned Jackson Lovely added the comment: s/IOError/OSError/ -- Added file: http://bugs.python.org/file29830/issue2118-OSError.diff ___ Python tracker ___

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree with Serhiy. Better to direcly use OSError than IOError alias. -- nosy: +asvetlov ___ Python tracker ___ __

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: socket.error is another alias of OSError. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since 3.3 IOError is an alias of OSError. We get rid of reference of IOError and other OSError aliases in the documentation and code, replacing them with OSError. -- nosy: +serhiy.storchaka ___ Python tracker

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread R. David Murray
R. David Murray added the comment: Thanks, Ned. After taking a look at the library documentation, I decided to change the docstring in a somewhat different way. In general in our docs we do not document all the possible exceptions a library can raise, but just the library-specific exceptions

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1158c38bf2dc by R David Murray in branch 'default': #2118: Make SMTPException a subclass of IOError. http://hg.python.org/cpython/rev/1158c38bf2dc -- ___ Python tracker

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ca27b5de309 by R David Murray in branch '2.7': #2118: clarify smtplib exception documentation. http://hg.python.org/cpython/rev/6ca27b5de309 New changeset 36d07a877f33 by R David Murray in branch '3.3': #2118: clarify smtplib exception documentatio

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Ned Jackson Lovely
Ned Jackson Lovely added the comment: ...and the 3.3 doc patch. -- Added file: http://bugs.python.org/file29805/issue2118-doc-patch-3.3.diff ___ Python tracker ___ ___

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread R. David Murray
R. David Murray added the comment: This looks good for 3.4. Ned, would you also be willing to prepare a doc patch for 3.3 that mentions that IOError may be raised? (I think the 3.3 patch will also apply to 2.7.) -- versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2 __

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Ned Jackson Lovely
Ned Jackson Lovely added the comment: Attaching a patch to make SMTPException an IOError, with corresponding update to docs to point out that __init__ on the SMTP object will raise IOErrors in general, and some SMTPExceptions in particular. Boston Python Sprint Apr 2013 -- nosy: +n Ad

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2010-09-12 Thread R. David Murray
R. David Murray added the comment: I discussed this issue with Antoine Pitrou on #python-dev, and his opinion is that SMTPSocketConnectError doesn't add enough value to be worthwhile. So he is in favor of making this a doc fix. However, the suggestion also came up to have SMTPException subcl

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2010-07-31 Thread R. David Murray
R. David Murray added the comment: A little backstory: the patch was created during the PyOhio sprint, and as we recreated the patch for py3k we noticed that SMTPConnectError is providing an *SMTP* error code. The gaierrors are obviously not SMTP errors. To allow the agreed upon semantics (

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2010-07-31 Thread Greg Malcolm
Greg Malcolm added the comment: I've uploaded a patch for 3.2 that throws a ValueError exception for non numeric port numbers and SMTPSocketConnectError for socket connection failures. This patch introduces an API change, by creating the SMTPSocketConnectError which provides information abou

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2010-07-18 Thread Mark Lawrence
Mark Lawrence added the comment: I applied the patch to test_smtplib.py only and all tests passed, surely that's not correct. Removing the explicit test for a non-numeric port in smtplib.py seems strange to me, could someone please explain the rationale behind this. I also noticed this line

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2010-07-05 Thread Geoffrey Bache
Changes by Geoffrey Bache : -- nosy: +gjb1002 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2009-05-12 Thread Daniel Diniz
Changes by Daniel Diniz : -- keywords: +patch stage: -> patch review versions: +Python 3.1 -Python 2.5, Python 3.0 ___ Python tracker ___

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-06-21 Thread Rodolpho Eckhardt
Rodolpho Eckhardt <[EMAIL PROTECTED]> added the comment: Verified Werneck's patch and it also works on 2.6 and 3.0. However, the previous code used to present a "friendly" message about non-numeric ports: "socket.error: nonnumeric port" and now it raises "ValueError: invalid literal for int() wi

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-05-10 Thread Pedro Werneck
Changes by Pedro Werneck <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9499/issue_2118_smtplib.patch __ Tracker <[EMAIL PROTECTED]> __ _

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-02-23 Thread Pedro Werneck
Pedro Werneck added the comment: Previous patch didn't passed the tests right. This patch fixes both the code, unindenting port number conversion to integer and the test. Added file: http://bugs.python.org/file9509/issue_2118_fixed.patch __ Tracker <[EMAIL PROTEC

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-02-23 Thread Pedro Werneck
Pedro Werneck added the comment: It seems the right thing to do would be to have it raise a base exception, but SMTPConnectError docstring states "Error during connection establishment.", so I chosen to use it with the errno and message from socket.error, even if it's supposed to happen only afte

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-02-23 Thread Rafael Zanella
Changes by Rafael Zanella: -- nosy: +zanella __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-02-15 Thread Christian Heimes
Christian Heimes added the comment: I see! You are right. Either the docs or the code need an update -- keywords: +easy resolution: -> accepted __ Tracker <[EMAIL PROTECTED]> __ _

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-02-15 Thread stranger4good
stranger4good added the comment: Not in so many words, but yes it does I cite: exception SMTPException Base exception class for all exceptions raised by this module ... exception SMTPConnectError Error occurred during establishment of a connection with the server. ... Note the word "all". S

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-02-15 Thread Christian Heimes
Christian Heimes added the comment: Why is this a bug? Do the docs promise that smtplib only raises SMTPConnectError? -- nosy: +tiran priority: -> normal __ Tracker <[EMAIL PROTECTED]> __

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-02-14 Thread stranger4good
New submission from stranger4good: smtplib.SMTP() raises socket.error rather than SMTPConnectError just try this on a non-responding address >>> srv=smtplib.SMTP('192.168.13.22') Traceback (most recent call last): File "", line 1, in File "c:\python25\lib\smtplib.py", line 244, in __init__