René's URL Explorer Experiment


Title: Recognize platform.system() as well as sys.platform · Issue #8166 · python/mypy · GitHub

Open Graph Title: Recognize platform.system() as well as sys.platform · Issue #8166 · python/mypy

X Title: Recognize platform.system() as well as sys.platform · Issue #8166 · python/mypy

Description: Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues Please provide more information to help ...

Open Graph Description: Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues ...

X Description: Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues ...

Opengraph URL: https://github.com/python/mypy/issues/8166

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Recognize platform.system() as well as sys.platform","articleBody":"Note: if you are reporting a wrong signature of a function or a class in\r\nthe standard library, then the typeshed tracker is better suited\r\nfor this report: https://github.com/python/typeshed/issues\r\n\r\nPlease provide more information to help us understand the issue:\r\n\r\n* Are you reporting a bug, or opening a feature request? feature request\r\n* Please insert below the code you are checking with mypy,\r\n  or a mock-up repro if the source is private. We would appreciate\r\n  if you try to simplify your case to a minimal repro.\r\n```python\r\n    if platform.system() != \"Windows\":  # sys.platform != \"win32\":\r\n        try:\r\n            # os.confstr(\"CS_GNU_LIBC_VERSION\") returns a string like \"glibc 2.17\".\r\n            version_string = os.confstr(\"CS_GNU_LIBC_VERSION\")\r\n            assert version_string is not None\r\n            _, version = version_string.split()\r\n        except (AssertionError, OSError, ValueError):\r\n            # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)...\r\n            return None\r\n        return version\r\n    return None\r\n```\r\n* What is the actual behavior/output? \"error: Module has no attribute \"confstr\"\"\r\n* What is the behavior/output you expect? No error when run under Windows\r\n* What are the versions of mypy and Python you are using? mypy 0.750, Python 3.7.4\r\n\r\nBasically it would be nice to get to use `platform.system()` instead of having to use `sys.platform` to make mypy happy with code that is conditional on the platform.","author":{"url":"https://github.com/brettcannon","@type":"Person","name":"brettcannon"},"datePublished":"2019-12-17T23:53:13Z","url":"https://github.com/python/mypy/issues/8166"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:216ba43f-b776-8577-7f9c-e75d7480b57b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD26A:3022B5:CD114F:10E2B79:6AFFFB65
html-safe-noncee18fb57950c86fa51a71a75e87f78baeca04efbccc872ba9764eabf56d58a5ec
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjZBOjMwMjJCNTpDRDExNEY6MTBFMkI3OTo2QUZGRkI2NSIsInZpc2l0b3JfaWQiOiI3NjIxMzc4NDYwMTk5NDE4NzI1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac143ffa4270c44f557f68a0fe005eb838ce5d867eb41ea778a3d4660d76d6797a
hovercard-subject-tagissue:539373398
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/8166/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bfeb67cb34fd0e93ab735d621ee572069e9f6dcc6023ab83d039f69ff9d3c7d1/python/mypy/issues/8166
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bfeb67cb34fd0e93ab735d621ee572069e9f6dcc6023ab83d039f69ff9d3c7d1/python/mypy/issues/8166
og:image:altNote: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebrettcannon
hostnamegithub.com
expected-hostnamegithub.com
None0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729
turbo-cache-controlno-preview
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release16a11879678aaf97e2a42c33ee70830aa084fa37
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/8166#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F8166
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F8166
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/issues/8166
Reloadhttps://github.com/python/mypy/issues/8166
Reloadhttps://github.com/python/mypy/issues/8166
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests547 (547)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/8166
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/8166
#10686https://github.com/python/mypy/pull/10686
Recognize platform.system() as well as sys.platformhttps://github.com/python/mypy/issues/8166#top
#10686https://github.com/python/mypy/pull/10686
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
good-second-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-second-issue%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
topic-runtime-semanticsmypy doesn't model runtime semantics correctlyhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-runtime-semantics%22
https://github.com/brettcannon
brettcannonhttps://github.com/brettcannon
on Dec 17, 2019https://github.com/python/mypy/issues/8166#issue-539373398
https://github.com/python/typeshed/issueshttps://github.com/python/typeshed/issues
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Dec 18, 2019https://github.com/python/mypy/issues/8166#issuecomment-567044867
ilevkivskyihttps://github.com/ilevkivskyi
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
good-first-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-first-issue%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
on Dec 18, 2019https://github.com/python/mypy/issues/8166#event-2893662714
https://github.com/neesara
neesarahttps://github.com/neesara
on Dec 20, 2019https://github.com/python/mypy/issues/8166#issuecomment-567866066
@ilevkivskyihttps://github.com/ilevkivskyi
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Dec 20, 2019https://github.com/python/mypy/issues/8166#issuecomment-567928628
https://github.com/neesara
neesarahttps://github.com/neesara
on Jan 1, 2020https://github.com/python/mypy/issues/8166#issuecomment-570035110
JelleZijlstrahttps://github.com/JelleZijlstra
on Jan 2, 2020https://github.com/python/mypy/issues/8166#event-2918629281
https://github.com/joybh98
joybh98https://github.com/joybh98
on Feb 28, 2020https://github.com/python/mypy/issues/8166#issuecomment-592270956
@ilevkivskyihttps://github.com/ilevkivskyi
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Feb 28, 2020https://github.com/python/mypy/issues/8166#issuecomment-592400359
https://github.com/joybh98
joybh98https://github.com/joybh98
on Mar 2, 2020https://github.com/python/mypy/issues/8166#issuecomment-593187457
@ilevkivskyihttps://github.com/ilevkivskyi
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Mar 2, 2020https://github.com/python/mypy/issues/8166#issuecomment-593330117
https://github.com/joybh98
joybh98https://github.com/joybh98
on Mar 7, 2020https://github.com/python/mypy/issues/8166#issuecomment-596077587
@ALLhttps://github.com/ALL
gsneddershttps://github.com/gsnedders
on Oct 24, 2021https://github.com/python/mypy/issues/8166#event-5509608293
squash! Bump mypy from 0.812 to 0.910 in /toolshttps://github.com/web-platform-tests/wpt/commit/264e1c8bc62f63715fceccf18df7f00a8b76bbc1
264e1c8https://github.com/web-platform-tests/wpt/commit/264e1c8bc62f63715fceccf18df7f00a8b76bbc1
fooliphttps://github.com/foolip
on Mar 7, 2022https://github.com/python/mypy/issues/8166#event-6194752311
squash! Bump mypy from 0.812 to 0.910 in /toolshttps://github.com/web-platform-tests/wpt/commit/6268ce98fd78aef54bad00826fa7d46f00e8ba8e
6268ce9https://github.com/web-platform-tests/wpt/commit/6268ce98fd78aef54bad00826fa7d46f00e8ba8e
Bump mypy from 0.812 to 0.931 in /tools (#33082)https://github.com/web-platform-tests/wpt/commit/51ad530bef4a8396c5706f508e46f256c21b2a57
#33082https://github.com/web-platform-tests/wpt/pull/33082
51ad530https://github.com/web-platform-tests/wpt/commit/51ad530bef4a8396c5706f508e46f256c21b2a57
moz-v2v-ghhttps://github.com/moz-v2v-gh
on Mar 22, 2022https://github.com/python/mypy/issues/8166#event-6280533566
Bug 1758345 [wpt PR 33082] - Bump mypy from 0.812 to 0.931 in /tools,…https://github.com/mozilla/gecko-dev/commit/72ea158e7c508831afa36a60c94ba7a84cce960c
1758345https://github.com/mozilla/gecko-dev/commit/17583454bd3652153a0ce4545abcac7491854295
72ea158https://github.com/mozilla/gecko-dev/commit/72ea158e7c508831afa36a60c94ba7a84cce960c
aosmondhttps://github.com/aosmond
on Mar 26, 2022https://github.com/python/mypy/issues/8166#event-6312301009
Bug 1758345 [wpt PR 33082] - Bump mypy from 0.812 to 0.931 in /tools,…https://github.com/aosmond/gecko/commit/ef06c08899dba24683528f3c5e4c2d6cb32edea5
ef06c08https://github.com/aosmond/gecko/commit/ef06c08899dba24683528f3c5e4c2d6cb32edea5
AlexWaygoodhttps://github.com/AlexWaygood
topic-runtime-semanticsmypy doesn't model runtime semantics correctlyhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-runtime-semantics%22
on Mar 29, 2022https://github.com/python/mypy/issues/8166#event-6329819368
JukkaLhttps://github.com/JukkaL
good-first-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-first-issue%22
on Apr 23, 2023https://github.com/python/mypy/issues/8166#event-9075434474
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Apr 23, 2023https://github.com/python/mypy/issues/8166#issuecomment-1519142034
#10686https://github.com/python/mypy/pull/10686
JukkaLhttps://github.com/JukkaL
good-second-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-second-issue%22
on Apr 23, 2023https://github.com/python/mypy/issues/8166#event-9075435874
https://github.com/Avasam
Avasamhttps://github.com/Avasam
on Oct 22, 2023https://github.com/python/mypy/issues/8166#issuecomment-1774204090
https://peps.python.org/pep-0508/https://peps.python.org/pep-0508/
https://peps.python.org/pep-0722/https://peps.python.org/pep-0722/
pypa/setuptools#3979 (comment)https://github.com/pypa/setuptools/pull/3979#discussion_r1367962801
brettcannonhttps://github.com/brettcannon
on Oct 23, 2023https://github.com/python/mypy/issues/8166#event-10743964590
https://github.com/ncoghlan
ncoghlanhttps://github.com/ncoghlan
on Aug 27, 2024https://github.com/python/mypy/issues/8166#issuecomment-2311712993
#9025https://github.com/python/mypy/issues/9025
JelleZijlstrahttps://github.com/JelleZijlstra
platform.system is not treated the same way as sys.platform #19039https://github.com/python/mypy/issues/19039
on May 5, 2025https://github.com/python/mypy/issues/8166#event-17524963506
jwidarhttps://github.com/jwidar
on Sep 16, 2025https://github.com/python/mypy/issues/8166#event-19730826026
Bug 1758345 [wpt PR 33082] - Bump mypy from 0.812 to 0.931 in /tools,…https://github.com/jwidar/LatencyZeroGithub/commit/d03e989d8f1dd1884976213723e1a76800c01d2a
d03e989https://github.com/jwidar/LatencyZeroGithub/commit/d03e989d8f1dd1884976213723e1a76800c01d2a
xflr6https://github.com/xflr6
on Sep 26, 2025https://github.com/python/mypy/issues/8166#event-19946909260
switch platform test to work around mypy bugshttps://github.com/xflr6/graphviz/commit/05fec437cb544814829c019c4925d36eeaf42c0b
05fec43https://github.com/xflr6/graphviz/commit/05fec437cb544814829c019c4925d36eeaf42c0b
switch platform check to work around mypy bugshttps://github.com/xflr6/graphviz/commit/1d8c18e9e49e7579fa47a87ef2ffdf8cc23c6f6b
1d8c18ehttps://github.com/xflr6/graphviz/commit/1d8c18e9e49e7579fa47a87ef2ffdf8cc23c6f6b
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/8166
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/8166
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
good-second-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-second-issue%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
topic-runtime-semanticsmypy doesn't model runtime semantics correctlyhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-runtime-semantics%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.