Title: Policy regarding python version specific stub changes · Issue #874 · python/mypy · GitHub
Open Graph Title: Policy regarding python version specific stub changes · Issue #874 · python/mypy
X Title: Policy regarding python version specific stub changes · Issue #874 · python/mypy
Description: With Python 3.5 collections.OrderedDict supports reversed() for views of its keys, items and values. In order for mypy to support this, the stub for collections needs to be updated. As a direct result though, mypy wouldn't detect illegal...
Open Graph Description: With Python 3.5 collections.OrderedDict supports reversed() for views of its keys, items and values. In order for mypy to support this, the stub for collections needs to be updated. As a direct res...
X Description: With Python 3.5 collections.OrderedDict supports reversed() for views of its keys, items and values. In order for mypy to support this, the stub for collections needs to be updated. As a direct res...
Opengraph URL: https://github.com/python/mypy/issues/874
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Policy regarding python version specific stub changes","articleBody":"With Python 3.5 collections.OrderedDict supports `reversed()` for views of its keys, items and values. In order for mypy to support this, the stub for collections needs to be updated. As a direct result though, mypy wouldn't detect illegal code for python \u003c 3.5:\n\n```\nfrom collections import OrderedDict\nOD=OrderedDict()\nfor k in reversed(OD.keys()):\n pass\n```\n\nThis is a specific instance of a general problem: how do we deal with different typing behaviour from version to version of python? Should the stubs only keep up with the most current version of python? It would actually be better to always use the most version-specific version of a stub (i.e. `stubs/3.3/collections.pyi` if using py3.3), or to have the ability to tell mypy to type check against a specific minor version of python.\n","author":{"url":"https://github.com/JamesGuthrie","@type":"Person","name":"JamesGuthrie"},"datePublished":"2015-09-15T13:36:17Z","url":"https://github.com/python/mypy/issues/874"}
| 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:e74c0334-8416-3267-f3d1-3dc434424de1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E15A:2714DE:2C0AE68:3BD6FDF:6B005038 |
| html-safe-nonce | 5bed01f4f2a385819d586302ec172307a55568f7c6463cd8aa9a0666ac4f6252 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTVBOjI3MTRERToyQzBBRTY4OjNCRDZGREY6NkIwMDUwMzgiLCJ2aXNpdG9yX2lkIjoiMzI3NjY2MjEwMjc0MzMzOTA2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 13bf01421e9d7fd4ffdf1615f91b661feeda2afd0216007e579c25068bba75e8 |
| hovercard-subject-tag | issue:106557904 |
| 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/874/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fd8522c5562cddf8195574ce0a942bbc3f7aeb77e377cd02f51ebdd7a08e4bba/python/mypy/issues/874 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fd8522c5562cddf8195574ce0a942bbc3f7aeb77e377cd02f51ebdd7a08e4bba/python/mypy/issues/874 |
| og:image:alt | With Python 3.5 collections.OrderedDict supports reversed() for views of its keys, items and values. In order for mypy to support this, the stub for collections needs to be updated. As a direct res... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JamesGuthrie |
| hostname | github.com |
| expected-hostname | github.com |
| None | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| 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 | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width