[Python-ideas] Make test.test_support an alias to test.support
Terry Reedy
tjreedy at udel.edu
Thu Aug 8 23:34:37 CEST 2013
On 8/8/2013 10:05 AM, Serhiy Storchaka wrote:
> When backporting tests to 2.7 one of changes which you should do is
> change "support" to "test_support". Sometimes this is only a change.
You mean, 'the only change'. Yes, very annoying when it is the only change.
> I propose rename the test.test_support module to test.support (this will
> simplify backporting patches which changes the test.support module) and
> make test.test_support an alias to test.support. I.e.
> Lib/test/test_support.py should contains:
>
> from test.support import *
> from test.support import __all__
While I strongly feel we should have done this, and some other aliases
(like Tkinter as alias for tkinter, etc, and dump 'lib-tk') in 2.7.0, it
seems too late for these changes now. The problem, as with any new 2.7
feature, is that if 'support' were added in 2.7.6, test code that
depends on 'support' would not run on 2.7.5-. While the contents of
/test are 'internal use only', it seems to me that being able to run the
test suite is a documented, public feature.
However, we could say that one should only run the 2.7.z test suite with
the 2.7.z interpreter and stdlib. If we do that, I would like to change
the illegal name 'lib-tk' to '_libtk' and change the tk/ttk tests
accordingly. If 'can change or be removed without notice between
releases of Python.' refers to bug-fix releases as well as version
releases, I might propose a few more changes, or rather, to also
backport proposed changes for 3.4 to 2.7.
--
Terry Jan Reedy
More information about the Python-ideas
mailing list