[Python-Dev] Modules of plat-* directories

Victor Stinner victor.stinner at haypocalc.com
Mon Oct 24 14:06:20 CEST 2011


There are open issues related to plat-XXX.

Le Lundi 24 Octobre 2011 00:03:42 Martin v. Löwis a écrit :
> no, we make no changes to them unless a user actually requests a change

Matthias Klose asked for socket SIO* constants in september 2006 (5 years 
ago).
http://bugs.python.org/issue1565071

I would prefer to see such constants in the socket module.

> On a specific system, these constants are not just part of the API -
> they are part of the ABI. So a system vendor cannot just change
> their values. Once defined, they must stay fixed forever.

Thiemo Seufer noticed that "the linux2 platform definition is incorrect for 
several architectures, namely Alpha, PA-RISC(hppa), MIPS and SPARC." in 
september 2008 (3 years ago). He proposed to add a sublevel: Lib/plat-
linux2/CDROM.py would become:

 - Lib/plat-linux2-alpha/CDROM.py
 - Lib/plat-linux2-hppa/CDROM.py
 - Lib/plat-linux2-mips/CDROM.py,
 - Lib/plat-linux2-sparc/CDROM.py
 - (and a default for other platforms like Intel x86?)

=> http://bugs.python.org/issue3990

I really don't like this idea (of adding the architecture in the directory 
name) :-p

IMO plat-XXX is wrong by design. It would be better if at least these files 
were regenerated at build, but Martin doesn't want to regenerate them. And 
there is still the problem of Mac OS X which embed 3 binarires for 3 
architectures in the same "FAT" file.

Victor


More information about the Python-Dev mailing list