Title: General discussion of using `@deprecated()` (from PEP 702) to signal typing-only deprecations · Issue #12092 · python/typeshed · GitHub
Open Graph Title: General discussion of using `@deprecated()` (from PEP 702) to signal typing-only deprecations · Issue #12092 · python/typeshed
X Title: General discussion of using `@deprecated()` (from PEP 702) to signal typing-only deprecations · Issue #12092 · python/typeshed
Description: This is an attempt to centralize discussion about using @(warnings/typing_extensions).deprecated() in typeshed to convey "typing-only" deprecations, not just runtime-related ones. I'm currently trying to use the decorator that way in #12...
Open Graph Description: This is an attempt to centralize discussion about using @(warnings/typing_extensions).deprecated() in typeshed to convey "typing-only" deprecations, not just runtime-related ones. I'm currently try...
X Description: This is an attempt to centralize discussion about using @(warnings/typing_extensions).deprecated() in typeshed to convey "typing-only" deprecations, not just runtime-related ones. I'm...
Opengraph URL: https://github.com/python/typeshed/issues/12092
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"General discussion of using `@deprecated()` (from PEP 702) to signal typing-only deprecations","articleBody":"This is an attempt to centralize discussion about using `@(warnings/typing_extensions).deprecated()` in typeshed to convey \"typing-only\" deprecations, not just runtime-related ones. I'm currently trying to use the decorator that way in #12087, and only just now saw it brought up in [another PR](\u003chttps://github.com/python/typeshed/pull/12088#discussion_r1624723106>) as well. @AlexWaygood made some good points (imo) about things to consider when using `@deprecated()` with an (artificial or natural) overload this way, so I figured moving such discussion to its own dedicated thread was well warranted.\r\n\r\nI linked messages with points in favor of using `@deprecated()` this way below (because I'm too lazy right now to rephrase them into clean bullets, but it'll happen at some point):\r\n- In a message [here](https://github.com/python/typeshed/pull/12088#discussion_r1624804334) from @srittau in a PR comment chain.\r\n- In a PR of mine, e.g. in the first message of #12087, under \"Additional Rationale\", and [in a later comment](https://github.com/python/typeshed/pull/12087#issue-2329849817).\r\n\r\nThen, a few starting questions and concerns quoted from Alex (hope you don't mind):\r\n1. Are we planning on removing the [deprecated] overload eventually?\r\n2. If so, how long a deprecation period are we planning on giving?\r\n3. Should we communicate that deprecation period in the message to the user?\r\n4. How will we remember to remove the deprecated overload when we reach the end of the deprecation period?\r\n5. Should we have a policy around this?\r\n6. Do we need some clear language here to make clear that there's not actually any indication that runtime support for this will ever be removed, it's just a typing-only deprecation?\r\n7. ... the main point I want us to remember is that deprecations can still be really disruptive, but we don't have a good sense of how disruptive at all in our CI at the moment, because mypy doesn't support `@deprecated()` yet, so nothing will show up in mypy_primer.\r\n\r\nHope this is useful and not just me being overzealous.\r\n\r\nEDIT: Also including [a link](https://github.com/python/typeshed/pull/12088#discussion_r1624946548) to a message by @Akuli in one of the comment chains mentioned earlier, which gives an example for making the choice between using `deprecated` vs. removing a function stub entirely, and what consideration can go into that.","author":{"url":"https://github.com/Sachaa-Thanasius","@type":"Person","name":"Sachaa-Thanasius"},"datePublished":"2024-06-03T21:00:11Z","url":"https://github.com/python/typeshed/issues/12092"}
| 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:8a9cbb99-19ee-2985-9cb0-256fff449681 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B96:4D728:2D85585:3BDA336:6B001BCB |
| html-safe-nonce | e74eb40c35a942e9c334423d22913b3f6b65c7ba58a90cedba13386b81b7b78e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Qjk2OjRENzI4OjJEODU1ODU6M0JEQTMzNjo2QjAwMUJDQiIsInZpc2l0b3JfaWQiOiIyNzkzMTI4MjYzNTgzNTM4MTIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a50801ac1bec9cd70a92b7d657cc3cc3252a9a3b58e6c11ccbeebde174220028 |
| hovercard-subject-tag | issue:2332043865 |
| 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/12092/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2a9781a8988ec3a8020e41e3b77503a517aad3d412ba33e147ac3d9e6dc21b20/python/typeshed/issues/12092 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2a9781a8988ec3a8020e41e3b77503a517aad3d412ba33e147ac3d9e6dc21b20/python/typeshed/issues/12092 |
| og:image:alt | This is an attempt to centralize discussion about using @(warnings/typing_extensions).deprecated() in typeshed to convey "typing-only" deprecations, not just runtime-related ones. I'm currently try... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Sachaa-Thanasius |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width