Exception atexit with selftest and Python 2.7
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
Martin Packman | ||
Python |
Fix Released
|
Unknown
|
Bug Description
Following a selftest run with Python 2.7 there's some new junk printed at the end that's not present with earlier Python versions. Perhaps related to a change in the logging module?
Error in atexit.
Traceback (most recent call last):
File ".\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File ".\lib\
h.flush()
File ".\lib\
self.
ValueError: I/O operation on closed file
Traceback (most recent call last):
File "bzr", line 153, in <module>
sys.exitfunc()
File ".\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File ".\lib\
h.flush()
File ".\lib\
self.
ValueError: I/O operation on closed file
Exception TypeError: "'NoneType' object is not callable" in <function _removeHandlerRef at 0x00CC3E70> ignored
Related branches
- Jelmer Vernooij (community): Approve
-
Diff: 33 lines (+4/-8)1 file modifiedbzrlib/tests/__init__.py (+4/-8)
Changed in bzr: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in python: | |
status: | Unknown → New |
Changed in python: | |
status: | New → Fix Released |
tags: |
added: python27 removed: python2.7 |
Changed in bzr: | |
assignee: | nobody → Martin Packman (gz) |
status: | Confirmed → In Progress |
Changed in bzr: | |
milestone: | none → 2.5b3 |
status: | In Progress → Fix Released |
So, this is an upstream regression, but it's only exposed because of my favourite bazaar testing regression from the introduction of the testtools dependency. In short, TestCase attributes are no longer cleared after being run, so the _log_memento which holds, amongst other things, a reference to the logging StreamHandler sticks around until python exits.
So, cleaning up some testing cruft is an easy fix. However, I wonder whether Bazaar shouldn't follow the FIXME at the top of the bzrlib.trace and remove the use of the logging module entirely.