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

Zachary Ware report at bugs.python.org
Fri Dec 20 17:30:50 CET 2013


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 that import tkinter (test___all__, test_tcl, test_tk, test_ttk_guionly, test_ttk_textonly, test_idle) to ensure that the environment is properly set to allow Tcl to load and to suppress regrtest's warning that os.environ has been modified.

Since tkinter._fix is an implementation detail, I assume this change isn't against the 'no new features' policy of all currently open branches, but if this needs to wait until 3.5, that's ok with me.

----------
components: Tests, Tkinter
files: suppress_environ_warning.diff
keywords: patch
messages: 206692
nosy: zach.ware
priority: low
severity: normal
stage: patch review
status: open
title: Suppress 'os.environ was modified' warning on Tcl/Tk tests
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33233/suppress_environ_warning.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20035>
_______________________________________


More information about the New-bugs-announce mailing list