[Python-ideas] win32 extensions

Brian Curtin brian.curtin at gmail.com
Tue Sep 13 16:14:14 CEST 2011

On Mon, Sep 12, 2011 at 20:56, Massimo Di Pierro
<massimo.dipierro at gmail.com> wrote:
> Just a question. What is the reason the win32 extensions are shipped separately? Is it a licensing issue or is there another reason?

It's certainly a mature project having been around for quite some
time, and has also provided Python 3 support since the beginning. It's
also a project for which there is no replacement, outside of
hand-writing extension modules to expose the APIs you need, and it has
given many developers access to the Windows APIs from the ease of a
few simple imports. For those reasons, I think it's a great candidate
for inclusion.

There are negatives I see to inclusion, mainly the sheer size at 213K
SLOC [0] (CPython is 713K). We're currently mulling over the inclusion
of a new regular expression library which clocks in well below that at
28K, but it's potentially above the level at which anyone could
provide a thorough review and gain an understanding, while
simultaneously reducing the bus factor. While Mark is a respected
member of the community and has already contributed directly to
CPython, we should be careful to include something so large.

I may be missing something due to the fragmented web presence, but
documentation could be a challenge, although I remember some form of
documentation being available on the ActiveState. Perhaps that could
be converted to reStructuredText, or that might just have to start

Maybe I'll seem crazy, but I think if we are to include this, the "py"
prefix of the name would have to go. In fact, moving forward with
this, even "win32" is probably a less than appropriate name, as
Microsoft has moved to "Windows API" some time ago, which "more
accurately reflects its roots in 16-bit Windows and its support on
64-bit Windows" [1]. I don't know the track record of stdlib
inclusions and name changes, but I feel like this should be called

Summary: although my negative talk outweighs the dinky positive
paragraph, I think it's something worth looking into if Mark is on
board with it.

[0] generated using David A. Wheeler's SLOCCount.
[1] http://en.wikipedia.org/wiki/Windows_API

More information about the Python-ideas mailing list