[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-03-22 Thread Zachary Ware
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:

[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-03-22 Thread Zachary Ware
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 ___

[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-03-22 Thread Zachary Ware
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 ___

[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-03-21 Thread Roundup Robot
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

[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-03-04 Thread Zachary Ware
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

[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-02-28 Thread Zachary Ware
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

[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-02-27 Thread Terry J. Reedy
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

[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2013-12-20 Thread Zachary Ware
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

[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2013-12-20 Thread Serhiy Storchaka
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

[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2013-12-20 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20035 ___ ___

[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2013-12-20 Thread Zachary Ware
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