[issue19967] asyncio: remove _TracebackLogger

2013-12-20 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue19967] asyncio: remove _TracebackLogger

2013-12-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 06ed1691efdc by Victor Stinner in branch 'default': Issue #19967: Defer the formating of the traceback in asyncio.Future destructor http://hg.python.org/cpython/rev/06ed1691efdc -- ___ Python tracker

[issue19967] asyncio: remove _TracebackLogger

2013-12-20 Thread Guido van Rossum
Guido van Rossum added the comment: Victor, can you commit the fix (with my suggested improvement)? -- ___ Python tracker ___ ___ Pyth

[issue19967] asyncio: remove _TracebackLogger

2013-12-20 Thread STINNER Victor
STINNER Victor added the comment: > I think this patch is bad and should be reverted. It always calls > traceback.format_exception() which is an expensive operation, while the > _TracebackLogger takes care to call it only when necessary. Oh, I didn't notice that, and I agree that the new code

[issue19967] asyncio: remove _TracebackLogger

2013-12-19 Thread Guido van Rossum
Guido van Rossum added the comment: Eew. You're right. Sorry I didn't see this. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue19967] asyncio: remove _TracebackLogger

2013-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think this patch is bad and should be reverted. It always calls traceback.format_exception() which is an expensive operation, while the _TracebackLogger takes care to call it only when necessary. -- assignee: -> haypo status: closed -> open ___

[issue19967] asyncio: remove _TracebackLogger

2013-12-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5e9728ebb1d3 by Victor Stinner in branch 'default': Close #19967: Thanks to the PEP 442, asyncio.Future can use a destructor in http://hg.python.org/cpython/rev/5e9728ebb1d3 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rej

[issue19967] asyncio: remove _TracebackLogger

2013-12-19 Thread Guido van Rossum
Guido van Rossum added the comment: Looks good. I can fix that long line myself. :-) -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue19967] asyncio: remove _TracebackLogger

2013-12-19 Thread STINNER Victor
STINNER Victor added the comment: asyncio_log_traceback-5.patch: new try :-) -- Added file: http://bugs.python.org/file33221/asyncio_log_traceback-5.patch ___ Python tracker ___

[issue19967] asyncio: remove _TracebackLogger

2013-12-19 Thread STINNER Victor
STINNER Victor added the comment: "So the new patch is fine, but I still think it's confusing that the _tb_logger variable has a different type depending on the Python version." To be honest, I'm also concerned by this strange variable :-) Here is a new fix which reuses the name used in the fi

[issue19967] asyncio: remove _TracebackLogger

2013-12-19 Thread Guido van Rossum
Guido van Rossum added the comment: So the new patch is fine, but I still think it's confusing that the _tb_logger variable has a different type depending on the Python version. If you really don't want to fix this, just go ahead and check in, it's not a blocker. -- _

[issue19967] asyncio: remove _TracebackLogger

2013-12-19 Thread STINNER Victor
STINNER Victor added the comment: Updated patch to address Guido's comments. -- Added file: http://bugs.python.org/file33214/asyncio_log_traceback-3.patch ___ Python tracker ___

[issue19967] asyncio: remove _TracebackLogger

2013-12-12 Thread STINNER Victor
STINNER Victor added the comment: > I'm happy with something that checks for the version and either adds the > __del__ method (for 3.4) or uses the _TracebackLogger (for 3.3). Ok. Here is a patch. The class is still defined on Python 3.4. You may move the definition of the class in a "if not P

[issue19967] asyncio: remove _TracebackLogger

2013-12-12 Thread Guido van Rossum
Guido van Rossum added the comment: I'm sorry, I really don't want the asyncio code for 3.3 and 3.4 to diverge just yet. It would make keeping the two versions in sync just so much harder. I'm happy with something that checks for the version and either adds the __del__ method (for 3.4) or uses

[issue19967] asyncio: remove _TracebackLogger

2013-12-12 Thread STINNER Victor
New submission from STINNER Victor: Thanks to the PEP 442 (Safe object finalization), _TracebackLogger helper of asyncio.Futures becomes useless. Attached patch removes it. -- If you agree to diverge code with Tulip project, the Python 3.3 code of WriteTransport.writelines can also be remove