[issue11289] smtplib context manager

2011-03-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- stage: -> committed/rejected type: -> feature request ___ Python tracker ___ ___ Python-bugs-list

[issue11289] smtplib context manager

2011-03-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> accepted ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue11289] smtplib context manager

2011-03-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue11289] smtplib context manager

2011-03-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset a6a94cfb75e9 by Barry Warsaw in branch 'default': - Issue #11289: `smtp.SMTP` class becomes a context manager so it can be used http://hg.python.org/cpython/rev/a6a94cfb75e9 -- nosy: +python-dev ___ Pyth

[issue11289] smtplib context manager

2011-03-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Go on, no prob. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue11289] smtplib context manager

2011-03-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Mar 15, 2011, at 06:40 PM, Giampaolo Rodola' wrote: > >Giampaolo Rodola' added the comment: > >@barry I have commit privileges, but no problem if you want to commit it. @giampaolo: I'd like to do it (and am almost ready to), mostly to test out hg workflow

[issue11289] smtplib context manager

2011-03-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: @barry I have commit privileges, but no problem if you want to commit it. -- ___ Python tracker ___

[issue11289] smtplib context manager

2011-03-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for the contribution! It seems like a reasonable new feature, so I'll get this landed in 3.3. Probably should use :versionadded: instead (thanks gps). I'll address SilentGhost's issues in the commit. -- assignee: -> barry nosy: +barry ___

[issue11289] smtplib context manager

2011-03-15 Thread SilentGhost
SilentGhost added the comment: A couple more minor issues: 1. Double space required at the beginning of the "Here is a ..." sentence in Doc/library/smtplib.rst 2. in __exit__ method: "msg" is the variable name assigned from docmd('QUIT') but "errmsg" is used when raising exception 3. in test

[issue11289] smtplib context manager

2011-02-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > is print really necessary in the test? no, my mistake -- ___ Python tracker ___ ___ Python-bu

[issue11289] smtplib context manager

2011-02-22 Thread SilentGhost
SilentGhost added the comment: is print really necessary in the test? Also, I think it would be better to unpack the tuple in test, rather then index it. -- ___ Python tracker ___

[issue11289] smtplib context manager

2011-02-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Ouch! Here. =) -- keywords: +patch Added file: http://bugs.python.org/file20845/smtplib_context_manager.patch ___ Python tracker ___ ___

[issue11289] smtplib context manager

2011-02-22 Thread SilentGhost
SilentGhost added the comment: you didn't attach anything, Giampaolo. -- components: +Library (Lib) nosy: +SilentGhost ___ Python tracker ___ ___

[issue11289] smtplib context manager

2011-02-22 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : Patch in attachment provides a context manager for SMTP class so that it can be used with the "with" statement. -- messages: 129096 nosy: giampaolo.rodola, pitrou priority: normal severity: normal status: open title: smtplib context manager versio