[New-bugs-announce] [issue12536] lib2to3 BaseFix class creates un-needed loggers leading to refleaks

Vinay Sajip report at bugs.python.org
Mon Jul 11 19:58:21 CEST 2011


New submission from Vinay Sajip <vinay_sajip at yahoo.co.uk>:

See #12167 for background.

The BaseFix class creates a logger named with the filename when the set_filename method is called. This logger appears to never be used, but since set_filename could be called any number of times and loggers are effectively singletons and not garbage collected, this could lead to refleaks and unbounded memory usage for no benefit.

It's possible to output contextual information about a file being worked on without needing to create a logger with the filename.

I'm proposing that the references to the logger in BaseFix be removed, as the logger isn't used anyway, and the test suite runs without failures when the references are removed. This will allow progress on #12167.

----------
components: 2to3 (2.x to 3.0 conversion tool), Library (Lib)
keywords: easy
messages: 140155
nosy: benjamin.peterson, eric.araujo, vinay.sajip
priority: normal
severity: normal
status: open
title: lib2to3 BaseFix class creates un-needed loggers leading to refleaks
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12536>
_______________________________________


More information about the New-bugs-announce mailing list