Title: sys.version_info is assumed to be (3, 5), even on Python 3.6 · Issue #2836 · python/mypy · GitHub
Open Graph Title: sys.version_info is assumed to be (3, 5), even on Python 3.6 · Issue #2836 · python/mypy
X Title: sys.version_info is assumed to be (3, 5), even on Python 3.6 · Issue #2836 · python/mypy
Description: Running Python 3.6, I noticed that any type hints that I add to the stub files with a if sys.version_info >= (3, 6): condition, don't have any effect. After investigating this a little, it seems that semanal.py uses the PYTHON3_VERSION v...
Open Graph Description: Running Python 3.6, I noticed that any type hints that I add to the stub files with a if sys.version_info >= (3, 6): condition, don't have any effect. After investigating this a little, it seems th...
X Description: Running Python 3.6, I noticed that any type hints that I add to the stub files with a if sys.version_info >= (3, 6): condition, don't have any effect. After investigating this a little, it s...
Opengraph URL: https://github.com/python/mypy/issues/2836
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sys.version_info is assumed to be (3, 5), even on Python 3.6","articleBody":"Running Python 3.6, I noticed that any type hints that I add to the stub files with a `if sys.version_info >= (3, 6):` condition, don't have any effect.\r\n\r\nAfter investigating this a little, it seems that [semanal.py](https://github.com/python/mypy/blob/ae47a3edc5ff69845398cbefa7652b51362f5c1c/mypy/semanal.py#L3030) uses the `PYTHON3_VERSION` value inside [default.py](https://github.com/python/mypy/blob/452a64fd1a361204a3123abca57a312e15baa9a3/mypy/defaults.py#L2) module as sys.version_info and it is currently hardcoded as `3.5`.\r\n\r\nUsing `mypy.ini` config file with the following content fixes the issue:\r\n\r\n```\r\n[mypy]\r\n python_version = 3.6\r\n```\r\n\r\nBut still the default behaviour is confusing and probably should be changed.\r\n\r\n","author":{"url":"https://github.com/5j9","@type":"Person","name":"5j9"},"datePublished":"2017-02-09T04:05:49Z","url":"https://github.com/python/mypy/issues/2836"}
| 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:42c76fd8-b8c4-cbe2-84d5-0708a7ff7df5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC66:144E47:36D391A:48CE919:6B0046BE |
| html-safe-nonce | 39a3797364232907ed1af8aae6df8dbf2639b03e28fbefd1e31765c5a52a4fcc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzY2OjE0NEU0NzozNkQzOTFBOjQ4Q0U5MTk6NkIwMDQ2QkUiLCJ2aXNpdG9yX2lkIjoiMzE3NDA4NDA0NTg5ODI3MDM5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 06cb582b05eaf0f1c4ef798da3d40956409ad9d18a51085ecc4f3cab301c20c5 |
| hovercard-subject-tag | issue:206398726 |
| 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/mypy/2836/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7dadf9617e785f16574d5517182a897cf313b896f25fe118789cc926f4675c7c/python/mypy/issues/2836 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7dadf9617e785f16574d5517182a897cf313b896f25fe118789cc926f4675c7c/python/mypy/issues/2836 |
| og:image:alt | Running Python 3.6, I noticed that any type hints that I add to the stub files with a if sys.version_info >= (3, 6): condition, don't have any effect. After investigating this a little, it seems th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 5j9 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width