[issue7064] Python 2.6.3 / setuptools 0.6c9: extension module builds fail with KeyError

Phillip J. Eby report at bugs.python.org
Mon Oct 5 20:36:00 CEST 2009


Phillip J. Eby <pje at telecommunity.com> added the comment:

I appreciate the change being made.  The specific code in setuptools is
relying on an erroneous reading of get_ext_filename()'s docstring (which
as of 2.3 at least, implied to me at least that it is always called with
an extension's full dotted name), and so I will fix it in setuptools as
well.

I would like to point out, however, that subclassing is not
"monkeypatching".  The distutils explicitly documents the ability to
extend and subclass commands, and this particular subclassing was based
on code provided by another distutils user, who'd extended build_ext to
support building dynamic libraries.

It is likely that that user, and anyone else who extended the build_ext
command in a similar way (e.g. numpy's and Twisted's distutils
extensions), could be affected by the change.

So, this was neither a matter of monkeypatching, nor special treatment
for setuptools.  Setuptools is far from the first or last distutils
extension ever written, and build_ext tends to get extended more than
most other commands.  It's important to remember subclassing use cases
when modifying distutils commands; subclasses inherently rely on a
stricter interface than a class's public API.

----------
nosy: +pje

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


More information about the Python-bugs-list mailing list