Title: Clarify `warnings.deprecated` public API · Issue #150076 · python/cpython · GitHub
Open Graph Title: Clarify `warnings.deprecated` public API · Issue #150076 · python/cpython
X Title: Clarify `warnings.deprecated` public API · Issue #150076 · python/cpython
Description: Documentation The current docs only specify that it sets the __deprecated__ attribute on the deprecated item. Pydantic relies on its full API: the fact that it’s a class, and that its instances have all passed parameters in attributes: d...
Open Graph Description: Documentation The current docs only specify that it sets the __deprecated__ attribute on the deprecated item. Pydantic relies on its full API: the fact that it’s a class, and that its instances hav...
X Description: Documentation The current docs only specify that it sets the __deprecated__ attribute on the deprecated item. Pydantic relies on its full API: the fact that it’s a class, and that its instances hav...
Opengraph URL: https://github.com/python/cpython/issues/150076
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Clarify `warnings.deprecated` public API","articleBody":"### Documentation\n\nThe current docs only specify that it sets the `__deprecated__` attribute on the deprecated item.\n\nPydantic relies on its full API: the fact that it’s a class, and that its instances have all passed parameters in attributes: `deprecated(**kw).__dict__ == kw` basically.\n\nTwo questions:\n\n1. Is that safe or might `deprecated` get e.g. refactored into a function at some point?\n2. Can we subclass it and add parameters? Will type checkers understand this and still mark a `@our_deprecated_subclass(...) def ...` as deprecated? See https://github.com/python/typing/issues/2256\n\nmaybe related to #138165\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-153879\n* gh-154487\n* gh-154488\n* gh-154489\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/flying-sheep","@type":"Person","name":"flying-sheep"},"datePublished":"2026-05-19T11:29:38Z","url":"https://github.com/python/cpython/issues/150076"}
| 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:d0f2e51e-1cb1-9a1f-634c-f0a8f3e96f48 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 974E:199D0B:257977:30C1D5:6AFF8491 |
| html-safe-nonce | ba7fd7f0ba590214bb3886adab1be89e626c65955fa3460967240166136c4546 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzRFOjE5OUQwQjoyNTc5Nzc6MzBDMUQ1OjZBRkY4NDkxIiwidmlzaXRvcl9pZCI6IjIwNjYyNjA4MDE3MDU5Njg3ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8fff7e7a08cea0008fb9ed4d65b1d3777cbb10c9832d41a7c73116972f0d3ad1 |
| hovercard-subject-tag | issue:4476950318 |
| 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/cpython/150076/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dfb6a1db60e32ac1707b13e5a88113dcfb157378297b3a98e10e4ae8c9f7a027/python/cpython/issues/150076 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dfb6a1db60e32ac1707b13e5a88113dcfb157378297b3a98e10e4ae8c9f7a027/python/cpython/issues/150076 |
| og:image:alt | Documentation The current docs only specify that it sets the __deprecated__ attribute on the deprecated item. Pydantic relies on its full API: the fact that it’s a class, and that its instances hav... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | flying-sheep |
| hostname | github.com |
| expected-hostname | github.com |
| None | 19488db4031f00b04ea79b4c70b5dd32cfa873a8d20b3877f3896b8e2d195946 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| 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 | 7952f5285f4ba685d70c4c7540ad3cc9dc9746b8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width