René's URL Explorer Experiment


Title: Spec: Version and platform checking underspecified · Issue #1732 · python/typing · GitHub

Open Graph Title: Spec: Version and platform checking underspecified · Issue #1732 · python/typing

X Title: Spec: Version and platform checking underspecified · Issue #1732 · python/typing

Description: Currently, the "Version and platform checking" section of the typing spec is very barebones. It basically says: Type checkers are expected to understand simple version and platform checks. [...] Don’t expect a checker to understand obfus...

Open Graph Description: Currently, the "Version and platform checking" section of the typing spec is very barebones. It basically says: Type checkers are expected to understand simple version and platform checks. [...] Do...

X Description: Currently, the "Version and platform checking" section of the typing spec is very barebones. It basically says: Type checkers are expected to understand simple version and platform checks...

Opengraph URL: https://github.com/python/typing/issues/1732

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Spec: Version and platform checking underspecified","articleBody":"Currently, the [\"Version and platform checking\" section](https://typing.readthedocs.io/en/latest/spec/directives.html#version-and-platform-checking) of the typing spec is very barebones. It basically says:\r\n\r\n> Type checkers are expected to understand simple version and platform checks. [...] Don’t expect a checker to understand obfuscations like `\"\".join(reversed(sys.platform)) == \"xunil\"`.\r\n\r\nOf course, there's a world of difference between these two forms.\r\n\r\nThe [type stubs document](https://typing.readthedocs.io/en/latest/source/stubs.html#version-and-platform-checks) goes into a bit more of detail, and reflects the currently implemented functionality quite well, as far as I know. It would be a good starting point.\r\n\r\nMaybe it would also make sense to support platform checks using `startswith()`, as that is officially recommended [in the Python docs](https://docs.python.org/3/library/sys.html#sys.platform), and is required to properly support some Unix variants, like FreeBSD, that include the version number in the platform string. See also python/typeshed#11876.","author":{"url":"https://github.com/srittau","@type":"Person","name":"srittau"},"datePublished":"2024-05-08T10:04:23Z","url":"https://github.com/python/typing/issues/1732"}

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:3708df7f-a920-bc0f-e3e3-97176fb217fd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBB42:3F9D33:18739BE:20E3943:6AFFF125
html-safe-nonce429b4061ad332e1ab9d3e656813d63a087810d10f233fb8d13d1646ed1cd062b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjQyOjNGOUQzMzoxODczOUJFOjIwRTM5NDM6NkFGRkYxMjUiLCJ2aXNpdG9yX2lkIjoiMTg0MzU4NzA5MjY2ODQ3NzczMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc17c37b3c5819de9e927e5ae05e88550b622925459303b6f093b532ce00e66c9
hovercard-subject-tagissue:2285206662
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/typing/1732/issue_layout
twitter:imagehttps://opengraph.githubassets.com/28faa751bdef1b1b5686281283f7e9ec416e147db5560120116ff71f677c1e45/python/typing/issues/1732
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/28faa751bdef1b1b5686281283f7e9ec416e147db5560120116ff71f677c1e45/python/typing/issues/1732
og:image:altCurrently, the "Version and platform checking" section of the typing spec is very barebones. It basically says: Type checkers are expected to understand simple version and platform checks. [...] Do...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesrittau
hostnamegithub.com
expected-hostnamegithub.com
None0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729
turbo-cache-controlno-preview
go-importgithub.com/python/typing git https://github.com/python/typing.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id24604008
octolytics-dimension-repository_nwopython/typing
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24604008
octolytics-dimension-repository_network_root_nwopython/typing
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/typing/issues/1732#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fissues%2F1732
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%2Ftyping%2Fissues%2F1732
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%2Ftyping
Reloadhttps://github.com/python/typing/issues/1732
Reloadhttps://github.com/python/typing/issues/1732
Reloadhttps://github.com/python/typing/issues/1732
pythonhttps://github.com/python
typinghttps://github.com/python/typing
Codehttps://github.com/python/typing
Issues206 (206)https://github.com/python/typing/issues
Pull requests27 (27)https://github.com/python/typing/pulls
Discussionshttps://github.com/python/typing/discussions
Actionshttps://github.com/python/typing/actions
Security and qualityhttps://github.com/python/typing/security
Insightshttps://github.com/python/typing/insights
https://github.com/python/typing
New issuehttps://github.com/login?return_to=https://github.com/python/typing/issues/1732
New issuehttps://github.com/login?return_to=https://github.com/python/typing/issues/1732
Spec: Version and platform checking underspecifiedhttps://github.com/python/typing/issues/1732#top
topic: typing specFor improving the typing spechttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20typing%20spec%22
https://github.com/srittau
srittauhttps://github.com/srittau
on May 8, 2024https://github.com/python/typing/issues/1732#issue-2285206662
"Version and platform checking" sectionhttps://typing.readthedocs.io/en/latest/spec/directives.html#version-and-platform-checking
type stubs documenthttps://typing.readthedocs.io/en/latest/source/stubs.html#version-and-platform-checks
in the Python docshttps://docs.python.org/3/library/sys.html#sys.platform
python/typeshed#11876https://github.com/python/typeshed/pull/11876
srittauhttps://github.com/srittau
topic: typing specFor improving the typing spechttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20typing%20spec%22
on May 8, 2024https://github.com/python/typing/issues/1732#event-12741509905
https://github.com/erictraut
erictrauthttps://github.com/erictraut
on May 8, 2024https://github.com/python/typing/issues/1732#issuecomment-2101062381
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 8, 2024https://github.com/python/typing/issues/1732#issuecomment-2101068022
https://mypy-play.net/?mypy=latest&python=3.10&gist=cbd11992b8631d8bbf8d217de99386e2https://mypy-play.net/?mypy=latest&python=3.10&gist=cbd11992b8631d8bbf8d217de99386e2
https://github.com/srittau
srittauhttps://github.com/srittau
on May 8, 2024https://github.com/python/typing/issues/1732#issuecomment-2101084079
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on May 8, 2024https://github.com/python/typing/issues/1732#issuecomment-2101384340
https://github.com/python/mypy/blob/master/mypy/reachability.py#L218https://github.com/python/mypy/blob/master/mypy/reachability.py#L218
https://github.com/python/mypy/blob/master/mypy/reachability.py#L291https://github.com/python/mypy/blob/master/mypy/reachability.py#L291
https://github.com/bytemarx
bytemarxhttps://github.com/bytemarx
on May 9, 2024https://github.com/python/typing/issues/1732#issuecomment-2101765731
https://github.com/python/typeshed/blob/main/stdlib/_socket.pyi#L180https://github.com/python/typeshed/blob/main/stdlib/_socket.pyi#L180
https://github.com/python/typeshed/blob/main/stdlib/_socket.pyi#L414https://github.com/python/typeshed/blob/main/stdlib/_socket.pyi#L414
https://github.com/python/typeshed/blob/main/stdlib/_socket.pyi#L533https://github.com/python/typeshed/blob/main/stdlib/_socket.pyi#L533
https://github.com/python/typeshed/blob/main/stdlib/_socket.pyi#L541https://github.com/python/typeshed/blob/main/stdlib/_socket.pyi#L541
https://github.com/python/typeshed/blob/main/stdlib/mmap.pyi#L103https://github.com/python/typeshed/blob/main/stdlib/mmap.pyi#L103
https://github.com/python/typeshed/blob/main/stdlib/time.pyi#L15https://github.com/python/typeshed/blob/main/stdlib/time.pyi#L15
https://github.com/python/typeshed/blob/main/stdlib/time.pyi#L26https://github.com/python/typeshed/blob/main/stdlib/time.pyi#L26
https://github.com/python/typeshed/blob/main/stdlib/os/__init__.pyi#L87https://github.com/python/typeshed/blob/main/stdlib/os/__init__.pyi#L87
https://github.com/python/typeshed/blob/main/stdlib/os/__init__.pyi#L710https://github.com/python/typeshed/blob/main/stdlib/os/__init__.pyi#L710
@erictrauthttps://github.com/erictraut
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 9, 2024https://github.com/python/typing/issues/1732#issuecomment-2101819547
PEP 729https://peps.python.org/pep-0729/#mandate
@srittauhttps://github.com/srittau
https://peps.python.org/pep-0011/https://peps.python.org/pep-0011/
Recognize platform.system() as well as sys.platform mypy#8166https://github.com/python/mypy/issues/8166
mypy does not recognize os.name mypy#13002https://github.com/python/mypy/issues/13002
@erictrauthttps://github.com/erictraut
@hauntsaninjahttps://github.com/hauntsaninja
https://github.com/ncoghlan
ncoghlanhttps://github.com/ncoghlan
on Aug 27, 2024https://github.com/python/typing/issues/1732#issuecomment-2311735199
python/mypy#9025https://github.com/python/mypy/issues/9025
https://github.com/sanmai-NL
sanmai-NLhttps://github.com/sanmai-NL
on Oct 1, 2024https://github.com/python/typing/issues/1732#issuecomment-2385259173
https://github.com/real-or-random
real-or-randomhttps://github.com/real-or-random
on Mar 31, 2025https://github.com/python/typing/issues/1732#issuecomment-2765327463
python/mypy#8166https://github.com/python/mypy/issues/8166
python/mypy#13002https://github.com/python/mypy/issues/13002
https://github.com/python/mypy/blob/c6af00ff0330d7a940abdafb46f4f7519f6b2d18/mypy/reachability.py#L218-L226https://github.com/python/mypy/blob/c6af00ff0330d7a940abdafb46f4f7519f6b2d18/mypy/reachability.py#L218-L226
JukkaLhttps://github.com/JukkaL
on Mar 31, 2025https://github.com/python/typing/issues/1732#event-17057322359
nit: Fix wrong example code in comment (#18860)https://github.com/python/mypy/commit/7846464a2c8ab1f6fa50dbd081f0addf31e7ab3b
#18860https://github.com/python/mypy/pull/18860
7846464https://github.com/python/mypy/commit/7846464a2c8ab1f6fa50dbd081f0addf31e7ab3b
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/typing/issues/1732
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/typing/issues/1732
topic: typing specFor improving the typing spechttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20typing%20spec%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.