[issue35896] sysconfig.get_platform returns wrong value when Python 32b is running under Windows 64b

Eryk Sun report at bugs.python.org
Wed Feb 6 08:19:56 EST 2019


Eryk Sun <eryksun at gmail.com> added the comment:

> Correct, though the examples I'd give are Win32 vs. WinRT vs. Cygwin, 
> which are fundamentally different API surfaces for interacting with 
> the operating system.

Cygwin and MSYS are presented as more than APIs; they're separate platforms. sys.platform is 'cygwin' or 'msys', and os.name is 'posix'.

The Windows platform name is "win32". If we could change it, I'd prefer "windows". The C API is the "Windows API" or WINAPI. It used to be called Win32, which is still the popular name. The ABI for 32-bit x86 (Intel Architecture) is "win32". If we could change it, I'd prefer "win-ia32" to parallel "win-amd64".

> os.name is also odd, and honestly I'd rather it just went away 
> completely. I'd like the module to be called "posix" everywhere, 
> since that's the API it exposes (it's an emulation layer on 
> non-POSIX platforms), and checks should use sys.platform. 

os is too entrenched to be renamed. But I'd like it if nt (posixmodule.c) were renamed windows_posix (or win32_posix) -- since it has nothing to do with the NT API. We would need to move the Windows-only functions to a "windows" (or "win32") platform module. This includes _getdiskusage, _getfinalpathname, _getfullpathname, _getvolumepathname, _isdir, and startfile. They have no place in a POSIX module.

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35896>
_______________________________________


More information about the Python-bugs-list mailing list