New submission from Vinay Sajip <vinay_sa...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue12536>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to