| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
sys.getwindowsversion() (GH-25500)
The sys module uses the kernel32.dll version number, which can vary from the "actual" Windows version.
Since the best option for getting the version is WMI (which is expensive), we switch back to launching cmd.exe (which is also expensive, but a lot less code on our part).
sys.getwindowsversion() is not updated to avoid launching executables from that module.
(cherry picked from commit 2a3f4899c63806439e5bcea0c30f7e6a6295a763)
Co-authored-by: Shreyan Avigyan <shreyan.avigyan@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 1e7e4519a8ddc2239101a0146d788c9161143a77)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Add a comment explaining why system_alias() doesn't alias Darwin to
macOS.
|
| |
|
|
|
|
|
|
|
|
| |
Make platform.architecture() parsing of "file" command output more
reliable:
* Add the "-b" option to the "file" command to omit the filename;
* Force the usage of the C locale;
* Search also the "shared object" pattern.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
| |
struct.calcsize('P') now always works.
|
| |
|
|
|
|
| |
Drop Mac OS 9 and Rhapsody support from the platform module:
* Rhapsody: last release in 2000
* Mac OS 9: last release in 2001
|
| |
|
|
|
|
|
|
|
|
|
| |
Replace os.popen() with subprocess.check_output() in the platform module:
* platform.uname() (its _syscmd_ver() helper function) now redirects
stderr to DEVNULL.
* Remove platform.DEV_NULL.
* _syscmd_uname() and _syscmd_file() no longer catch AttributeError.
The "except AttributeError:" was only needed in Python 2, when
os.popen() was not always available. In Python 3,
subprocess.check_output() is always available.
|
| |
|
|
|
| |
On macOS, platform.platform() now uses mac_ver(), if it returns a
non-empty release string, to get the macOS version rather than darwin
version.
|
| |
|
|
|
|
|
|
|
|
| |
platform.libc_ver() now uses os.confstr('CS_GNU_LIBC_VERSION') if
available and the *executable* parameter is not set. The default
value of the libc_ver() *executable* parameter becomes None.
Quick benchmark on Fedora 29:
python3 -m perf command ./python -S -c 'import platform; platform.libc_ver()'
94.9 ms +- 4.3 ms -> 33.2 ms +- 1.4 ms: 2.86x faster (-65%)
|
| |
|
|
|
|
|
| |
Only platform._syscmd_file() uses subprocess. Move subprocess import
inside this function to reduce the number of imports at Python
startup.
Remove also warnings import which is no longer needed.
|
| |
|
|
|
|
|
| |
Remove platform.popen() function, it was deprecated since Python 3.3:
use os.popen() instead.
Rename also the "Removed" section to "API and Feature Removals"
of What's New in Python 3.8.
|
| |
|
|
|
| |
platform._dist_try_harder() was an helper function
for platform.linux_distribution() which has been removed by the
commit 8b94b41ab7b12f745dea744e8940631318816935.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
* test_ssl: Remove skip_if_broken_ubuntu_ssl
We no longer support OpenSSL 0.9.8.15.15.
* bpo-28167: Remove platform.linux_distribution
|
| |
|
|
|
| |
Also bump PendingDeprecationWarning to DeprecationWarning.
|
| |
|
|
|
|
|
|
|
|
| |
CPython migrated from CVS to Subversion, to Mercurial, and then to
Git. CVS and Subversion are not more used to develop CPython.
* platform module: drop support for sys.subversion. The
sys.subversion attribute has been removed in Python 3.3.
* Remove Misc/svnmap.txt
* Remove Tools/scripts/svneol.py
* Remove Tools/scripts/treesync.py
|
| |
|
|
|
|
|
| |
sys.version and the platform module python_build(),
python_branch(), and python_revision() functions now use
git information rather than hg when building from a repo.
Based on original patches by Brett Cannon and Steve Dower.
|
| |
|
|
| |
Was bumped in the docstring by b9f4feab1b9c9ffa8ea29af3d82bc536f9f3005a
but not in `__version__`
|
| | |
|
| |\ |
|
| | | |
|
| |\ \
| |/ |
|
| | | |
|
| |\ \
| |/ |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
And most of the tools.
Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
|
| |/
|
|
| |
and Windows CE is no longer a relevant platform for Python.
|
| |
|
|
| |
Based on patch by Ville Skyttä.
|
| | |
|
| |
|
|
|
|
|
| |
We will keep platform.dist() and platform.linux_distribution() to make porting
from Python 2 easier.
Patch by Kumaripaba Miyurusara Athukorala.
|
| | |
|
| |\ |
|
| | | |
|
| | |
| |
| |
| | |
avoid compatibility shims.
|
| | |
| |
| |
| | |
avoid compatibility shims.
|
| | | |
|
| | |
| |
| |
| | |
platform.platform().
|
| | |
| |
| |
| |
| |
| | |
now deprecated.
Initial patch by Vajrasky Kok.
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
| |
whitespaces
|
| |\
| |
| |
| |
| |
| |
| | |
the UTF-8 encoding with the surrogateescape error handler, instead of decoding
from the locale encoding in strict mode. It fixes the function on Fedora 19
which is probably the first major distribution release with a non-ASCII name.
Patch written by Toshio Kuratomi.
|
| | |
| |
| |
| |
| |
| |
| | |
encoding with the surrogateescape error handler, instead of decoding from the
locale encoding in strict mode. It fixes the function on Fedora 19 which is
probably the first major distribution release with a non-ASCII name. Patch
written by Toshio Kuratomi.
|
| |\ \
| |/ |
|
| | | |
|