Title: Missing quotations around forward references · Issue #3334 · python/typeshed · GitHub
Open Graph Title: Missing quotations around forward references · Issue #3334 · python/typeshed
X Title: Missing quotations around forward references · Issue #3334 · python/typeshed
Description: I'm in progress updating the Microsoft language server's copy of the typeshed repo in preparation for 3.8, and some type annotations we had been testing have broken on moving up to the latest master of typeshed (microsoft/python-language...
Open Graph Description: I'm in progress updating the Microsoft language server's copy of the typeshed repo in preparation for 3.8, and some type annotations we had been testing have broken on moving up to the latest maste...
X Description: I'm in progress updating the Microsoft language server's copy of the typeshed repo in preparation for 3.8, and some type annotations we had been testing have broken on moving up to the late...
Opengraph URL: https://github.com/python/typeshed/issues/3334
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing quotations around forward references","articleBody":"I'm in progress updating the Microsoft language server's copy of the typeshed repo in preparation for 3.8, and some type annotations we had been testing have broken on moving up to the latest master of typeshed (microsoft/python-language-server#1654).\r\n\r\nSpecifically #3191 removed some quotations around forward references, which broke some testing we had done to verify handling of `Path`'s division overloads.\r\n\r\nAs far as I can tell from PEP 484, forward references should be using strings for types rather than actually referencing them (https://www.python.org/dev/peps/pep-0484/#forward-references), and our type system needs this assumption to be able to evaluate things correctly. In our case, replacing:\r\n\r\n```python\r\n_P = TypeVar('_P', bound=PurePath)\r\n```\r\n\r\nwith:\r\n\r\n```python\r\n_P = TypeVar('_P', bound='PurePath')\r\n```\r\n\r\nMeans we can process the stub, and this seems more reasonable from the point of \"executing\" the stub (if stubs could be run as-is), since PurePath has not yet been defined.\r\n\r\nShould these forward references have been unquoted? Or has there been some change to the spec that isn't documented in the PEP?","author":{"url":"https://github.com/jakebailey","@type":"Person","name":"jakebailey"},"datePublished":"2019-10-09T20:56:57Z","url":"https://github.com/python/typeshed/issues/3334"}
| 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:90d3757d-8a35-7a5a-1f6f-89e791d48223 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 89A8:ADCD1:3EDD63:52EC32:6AFE6184 |
| html-safe-nonce | e85f9418e592ac0e15d26ea75f9b37e8dc40e9ad09afbbca36a5a2677907031e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUE4OkFEQ0QxOjNFREQ2Mzo1MkVDMzI6NkFGRTYxODQiLCJ2aXNpdG9yX2lkIjoiMjAxNjA1ODk1NTE4MzE0ODg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4b69fa6ddf374a925e580f644e75d2e28260d253b496e968df5e020bb9fee46d |
| hovercard-subject-tag | issue:504890813 |
| 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/typeshed/3334/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6be8926fe1758c713105b017ec88dab679b8d99a6190289b5cc97489f37ac846/python/typeshed/issues/3334 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6be8926fe1758c713105b017ec88dab679b8d99a6190289b5cc97489f37ac846/python/typeshed/issues/3334 |
| og:image:alt | I'm in progress updating the Microsoft language server's copy of the typeshed repo in preparation for 3.8, and some type annotations we had been testing have broken on moving up to the latest maste... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jakebailey |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width