Title: gh-101561: Add typing.override decorator by stroxler · Pull Request #101564 · python/cpython · GitHub
Open Graph Title: gh-101561: Add typing.override decorator by stroxler · Pull Request #101564 · python/cpython
X Title: gh-101561: Add typing.override decorator by stroxler · Pull Request #101564 · python/cpython
Description: The code is pulled almost unchanged from typing_extensions: decorator implementation tests Question that came up was where to put the type variable and what to name it: In typing_extensions the type variables use underscore prefixes to indicate that they are not public, but typing doesn't appear to use that convention so I named the type variable F. I couldn't put the type variable next to all of the other ones (used in generic container definitions) because it relies on Callable which is defined below. If this is a problem I could correct it using a forward reference, or we could try to rearrange the module to put special forms above type variables. Testing the code: First set up the repo, following instructions at https://devguide.python.org/ by running: ./configure --with-pydebug && make -j Then run the typing tests: ./python -m test test_typing -v I ran the full test suite with ./python -m test -j3 and it came back clean except for a test_grp failure which I seem to get on trunk as well - likely something in my build is misconfigured but I'm pretty sure it is unrelated to the changes here. Issue: gh-101561 Make sure the docs build: cd Doc make venv make html
Open Graph Description: The code is pulled almost unchanged from typing_extensions: decorator implementation tests Question that came up was where to put the type variable and what to name it: In typing_extensions the ...
X Description: The code is pulled almost unchanged from typing_extensions: decorator implementation tests Question that came up was where to put the type variable and what to name it: In typing_extensions the ...
Opengraph URL: https://github.com/python/cpython/pull/101564
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:ab8a5c96-cc4c-2540-f0ec-4c7ebc25c2ff |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | ED3E:2F4DD4:7B703A:A6A72E:69697A6C |
| html-safe-nonce | 7b1f934f96ebebd6bec065d65ee9b6ab079ed435960fdf86fc8d7fe1233d6960 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDNFOjJGNERENDo3QjcwM0E6QTZBNzJFOjY5Njk3QTZDIiwidmlzaXRvcl9pZCI6Ijc4MzUyOTkzMDkzMjg4OTA0NzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c5493c65978abe08e6f03d5284700847d6de6ff0089871a5df44f611466a6b26 |
| hovercard-subject-tag | pull_request:1229170473 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/python/cpython/pull/101564/checks |
| twitter:image | https://avatars.githubusercontent.com/u/966970?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/966970?s=400&v=4 |
| og:image:alt | The code is pulled almost unchanged from typing_extensions: decorator implementation tests Question that came up was where to put the type variable and what to name it: In typing_extensions the ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f33e4b94c8824ab2b434d82a94139432fb5ebee9df4b75304140ad22508c4a77 |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 48f380098b30acbb700b04f1724481ca10d574fc |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width