[Python-Dev] PEP: Consolidating names in the `unittest` module

M.-A. Lemburg mal at egenix.com
Wed Jul 16 13:20:19 CEST 2008


On 2008-07-16 10:14, Ben Finney wrote:
> "M.-A. Lemburg" <mal at egenix.com> writes:
> 
>> Since this is a major change in the unit test API, I'd also like
>> to suggest that you use a new module name.
>>
>> This is both a precaution to prevent tests failing due to not having
>> been upgraded and a way for old code to continue working by adding
>> the old unittest module on sys.path.
> 
> Do you have a specific argument against the provisions already stated
> in the PEP for backward compatibility? They seem to address your
> concerns already.

The PEP doesn't mention changing the module name and deprecating
the old one. Instead it wants to deprecate all the old names (and cites
PEP 4 for this), but keeping the module name.

Note that PEP 4 targets deprecating use of whole modules, not single
APIs, or - like in your case - more or less the complete existing API
of a module.

Given the scope of the changes, you are really creating a completely
new API and as a result should also get a new module name. You can then
deprecate use of the old "unittest" module name and point users to the
new one.

Developers who don't feel like changing 10000+ tests can then continue
to use the old module and start using the new module for new projects.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jul 16 2008)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::


    eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
     D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
            Registered at Amtsgericht Duesseldorf: HRB 46611


More information about the Python-Dev mailing list