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
Domain: github.com
{"@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-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3708df7f-a920-bc0f-e3e3-97176fb217fd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB42:3F9D33:18739BE:20E3943:6AFFF125 |
| html-safe-nonce | 429b4061ad332e1ab9d3e656813d63a087810d10f233fb8d13d1646ed1cd062b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjQyOjNGOUQzMzoxODczOUJFOjIwRTM5NDM6NkFGRkYxMjUiLCJ2aXNpdG9yX2lkIjoiMTg0MzU4NzA5MjY2ODQ3NzczMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c17c37b3c5819de9e927e5ae05e88550b622925459303b6f093b532ce00e66c9 |
| hovercard-subject-tag | issue:2285206662 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typing/1732/issue_layout |
| twitter:image | https://opengraph.githubassets.com/28faa751bdef1b1b5686281283f7e9ec416e147db5560120116ff71f677c1e45/python/typing/issues/1732 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/28faa751bdef1b1b5686281283f7e9ec416e147db5560120116ff71f677c1e45/python/typing/issues/1732 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | srittau |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typing git https://github.com/python/typing.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 24604008 |
| octolytics-dimension-repository_nwo | python/typing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24604008 |
| octolytics-dimension-repository_network_root_nwo | python/typing |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width