summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-04-16 12:28:09 (GMT)
committerGitHub <noreply@github.com>2020-04-16 12:28:09 (GMT)
commit518835f3354d6672e61c9f52348c1e4a2533ea00 (patch)
tree870820aa95948c58a6616795f266c290f0432a65 /Misc
parent6a5bf15c71a1c101c28774ae714b58e8a65b130c (diff)
downloadcpython-518835f3354d6672e61c9f52348c1e4a2533ea00.zip
cpython-518835f3354d6672e61c9f52348c1e4a2533ea00.tar.gz
cpython-518835f3354d6672e61c9f52348c1e4a2533ea00.tar.bz2
bpo-35967 resolve platform.processor late (GH-12239)
* 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>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2019-04-14-14-11-07.bpo-35967.KUMT9E.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-04-14-14-11-07.bpo-35967.KUMT9E.rst b/Misc/NEWS.d/next/Library/2019-04-14-14-11-07.bpo-35967.KUMT9E.rst
new file mode 100644
index 0000000..38bec77
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-04-14-14-11-07.bpo-35967.KUMT9E.rst
@@ -0,0 +1 @@
+In platform, delay the invocation of 'uname -p' until the processor attribute is requested. \ No newline at end of file