You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2011-07-13.22:15:16.732>created_at=<Date2011-07-11.17:58:20.502>labels= ['easy', 'expert-2to3', 'type-bug', 'library']
title='lib2to3 BaseFix class creates un-needed loggers leading to refleaks'updated_at=<Date2011-07-13.22:15:16.730>user='https://github.com/vsajip'
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 bpo-12167.
If the logger attribute is part of the official API and Benjamin doesn’t think it wise to just remove it, I think we should either start deprecating it (using a property), or set it to a shared logger object instead of creating one per file.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: