[issue11289] smtplib context manager

2011-03-15 Thread SilentGhost
SilentGhost ghost@gmail.com 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

[issue11289] smtplib context manager

2011-03-15 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org 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

[issue11289] smtplib context manager

2011-03-15 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: @barry I have commit privileges, but no problem if you want to commit it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11289 ___

[issue11289] smtplib context manager

2011-03-15 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: On Mar 15, 2011, at 06:40 PM, Giampaolo Rodola' wrote: Giampaolo Rodola' g.rod...@gmail.com 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),

[issue11289] smtplib context manager

2011-03-15 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Go on, no prob. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11289 ___ ___

[issue11289] smtplib context manager

2011-03-15 Thread Roundup Robot
Roundup Robot devnull@devnull 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

[issue11289] smtplib context manager

2011-03-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11289 ___ ___ Python-bugs-list

[issue11289] smtplib context manager

2011-03-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11289 ___ ___

[issue11289] smtplib context manager

2011-03-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- stage: - committed/rejected type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11289 ___

[issue11289] smtplib context manager

2011-02-22 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' g.rod...@gmail.com: 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

[issue11289] smtplib context manager

2011-02-22 Thread SilentGhost
SilentGhost ghost@gmail.com added the comment: you didn't attach anything, Giampaolo. -- components: +Library (Lib) nosy: +SilentGhost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11289

[issue11289] smtplib context manager

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

[issue11289] smtplib context manager

2011-02-22 Thread SilentGhost
SilentGhost ghost@gmail.com 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 rep...@bugs.python.org

[issue11289] smtplib context manager

2011-02-22 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: is print really necessary in the test? no, my mistake -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11289 ___