Code review comment for lp:~gz/bzr/trivial_discard_log_memento_607413

Revision history for this message
Martin Packman (gz) wrote :

> Are we sure this is safe across supported versions? You mention fixed
> upstream, but that always concerns me about compatibility.

Yes, this is just avoiding problems from a change in 2.7 which caused logging to try flushing things late on in module teardown. Prior to that, trace.pop_log_file did everything needed for cleanup and there was no need to care about references at all.

The original Python change:
<http://bugs.python.org/issue6615>
<http://hg.python.org/cpython/diff/022cd0f3c558/Lib/logging/__init__.py>

We're defended against weird behaviour from this pretty well already, using StringIO rather than real files and cleaning up testcases as we go should be enough, this is just a cherry on top.

« Back to merge proposal