[Distutils] from distutils.core import DistutilsOptionError

Tarek Ziadé ziade.tarek at gmail.com
Tue Feb 23 23:32:57 CET 2010

On Tue, Feb 23, 2010 at 5:04 PM, Guido van Rossum <guido at python.org> wrote:
> On Tue, Feb 23, 2010 at 1:14 PM, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
>> On Tue, Feb 23, 2010 at 2:55 PM, Thomas Heller <theller at ctypes.org> wrote:
>>> One of my setup scripts contains:
>>>  from distutils.core import DistutilsOptionError
>>> which doesn't work anymore with Python trunk.  Bug in Python,
>>> or in my setup script?
>> This name was imported in distutils.core but never used, so the import
>> line was removed in trunk, since importing it from core is considered
>> as a mistake.
>> you should do :
>>  from distutils.errors import DistutilsOptionError
> But you see the problem with "improving" distutils... That setup.py
> script worked before. I recommend restoring as much as possible of
> distutils in the trunk to its state as of 2.6.
 > (I think some 2.6 micro
> releases also broke some distros, but IIRC that was fixed in the
> latest.)


Two things here:

1/ the micro release change didn't change the public API but private
elements + a behavior that was not clearly defined in the
documentation. I have/am not chang[ed|ing] anything public in 2.6.x
either added new feature in there.

2/ the work done in 2.7 so far was following the usual deprecation
process for relocated
APIs or removed APIs, but nothing for misplaced import statements. We
did discuss this in the past and said it was fine this way.

*Now*, since we are working in distutils2 I am proposing this strategy:

- I completely revert Distutils 2.7 to the latest 2.6.x state, so
people can safely rely on it when 2.7 comes out.

- distutils at sdtlib is feature-frozen and I don't do anything else but
bug fixes in there,
  that I apply in 2.7 and 2.6 the same way. Any new feature request is
redirected to distutils2.

- we keep the new sysconfig module and use it in distutils2 and in site.py.

we are planning to release a first version of distutils2 by the time
2.7 final is out btw.


Tarek Ziadé | http://ziade.org

More information about the Distutils-SIG mailing list