Zachary Ware added the comment:
Here's a slightly less ugly version of the patch. I would really appreciate
some review on this; this should solve a test_idle issue that was exacerbated
by issue #15968 (for unknown reasons).
--
priority: low - normal
Added file:
Changes by Zachary Ware zachary.w...@gmail.com:
Removed file: http://bugs.python.org/file33233/suppress_environ_warning.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20035
___
Changes by Zachary Ware zachary.w...@gmail.com:
Removed file: http://bugs.python.org/file33235/suppress_environ_warning.v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20035
___
Roundup Robot added the comment:
New changeset c12cc78d59c1 by Zachary Ware in branch 'default':
Issue #15968: Temporarily revert change to PCbuild/rt.bat
http://hg.python.org/cpython/rev/c12cc78d59c1
--
nosy: +python-dev
___
Python tracker
Zachary Ware added the comment:
Here's a patch that seems to work; with it applied, I can run
`PCbuild\python_d.exe -m test -uall -rF test_tcl test_tk test_ttk_textonly
test_ttk_guionly test_idle` through at least 115 rounds of testing with no
warnings or errors aside from a locale warning
Zachary Ware added the comment:
Terry J. Reedy added the comment:
However, rather than require a tearDowmnodule for every module that imports
tkinter, lets fix the root problem.
I agree that that would be the ideal solution.
I thought of having the environment change warning function
Terry J. Reedy added the comment:
The patch works to suppress the message for test_ttk_guionly. However,
unfix_environ does not undo everything that needs to be undone, as evidenced by
#20800.
The patch does not fix test_idle. I suspect that this is because test_idle
pulls in tests from
New submission from Zachary Ware:
The attached patch refactors tkinter._fix's main logic into a function called
'fix_environ' which is called unconditionally on import, and adds a function
'unfix_environ' to undo the effects of fix_environ. fix/unfix_environ are then
used in all test files
Serhiy Storchaka added the comment:
This looks fragile. What if some test will import tkinter after other test
unfix the environment? I suggest unload the tkinter._fix module in
unfix_environ(). Then next import should implicitly fix the environment. And
explicit fix_environ() will be not
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20035
___
___
Zachary Ware added the comment:
I like that idea, though I'm a bit wary of messing around is sys.modules. Is
there another way to unload a module that I'm not aware of?
Here's a new patch that does that.
--
Added file: http://bugs.python.org/file33235/suppress_environ_warning.v2.diff
11 matches
Mail list logo