| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
(#20015)
* bpo-40570: Improve compatibility of uname_result with late-bound .platform.
* Add test capturing ability to cast uname to a tuple.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Replace flag-flip indirection with direct inspection
* Use any for simpler code
* Avoid flag flip and set results directly.
* Resolve processor in a single function.
* Extract processor handling into a namespace (class)
* Remove _syscmd_uname, unused
* Restore platform.processor behavior to match prior expectation (reliant on uname -p in a subprocess).
* Extract '_unknown_as_blank' function.
* Override uname_result to resolve the processor late.
* Add a test intended to capture the expected values from 'uname -p'
* Instead of trying to keep track of all of the possible outputs on different systems (probably a fool's errand), simply assert that except for the known platform variance, uname().processor matches the output of 'uname -p'
* Use a skipIf directive
* Use contextlib.suppress to suppress the error. Inline strip call.
* 📜🤖 Added by blurb_it.
* Remove use of contextlib.suppress (it would fail with NameError if it had any effect). Rely on _unknown_as_blank to replace unknown with blank.
Co-authored-by: blurb-it[bot] <blurb-it[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
| |
When libc_ver() is called with an executable, the
os.confstr('CS_GNU_LIBC_VERSION') fast-path cannot be taken. Modify
platform.platform() to call libc_ver() without executable, instead of
calling libc_ver(sys.executable), since sys.executable is already the
default value.
|
| |
|
| |
|
| |
|
|
|
|
| |
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.
|