Title: bpo-41559: Change PEP 612 implementation to pure Python by Fidget-Spinner · Pull Request #25449 · python/cpython · GitHub
Open Graph Title: bpo-41559: Change PEP 612 implementation to pure Python by Fidget-Spinner · Pull Request #25449 · python/cpython
X Title: bpo-41559: Change PEP 612 implementation to pure Python by Fidget-Spinner · Pull Request #25449 · python/cpython
Description: Reverted changes in genericaliasobject.c to commit 463c7d3 (right before PEP 612) via a clean git checkout 463c7d3d149283814d879a9bb8411af64e656c8e -- genericaliasobject.c. Implemented PEP 612 behavior only in collections.abc.Callable in pure Python. PR 1/2, another update to typing.py is coming later, but that's not urgent. The intention of this change is to conform more strictly to PEP 612. Specifically, this snippet: As before, parameters_expressions by themselves are not acceptable in places where a type is expected https://www.python.org/dev/peps/pep-0612/#valid-use-locations The current implementation leaks extra behavior into all builtin GenericAlias types just for the sake of collections.abc.Callable, which is out of the scope of the PEP. Since there is no need to support ParamSpec in other places, it's valid to not have them in __parameters__ of all builtin generics. except for collections.abc.Callable. This will also speed up builtin GenericAlias as it has to do less checks, and reduce the amount of confusing code in GenericAlias (though it defers that to collections.abc.Callable.) https://bugs.python.org/issue41559
Open Graph Description: Reverted changes in genericaliasobject.c to commit 463c7d3 (right before PEP 612) via a clean git checkout 463c7d3d149283814d879a9bb8411af64e656c8e -- genericaliasobject.c. Implemented PEP 612 beha...
X Description: Reverted changes in genericaliasobject.c to commit 463c7d3 (right before PEP 612) via a clean git checkout 463c7d3d149283814d879a9bb8411af64e656c8e -- genericaliasobject.c. Implemented PEP 612 beha...
Opengraph URL: https://github.com/python/cpython/pull/25449
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:234cbfea-8d8a-2eac-0ac6-5efc3aac8212 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | DF1E:1DECF9:1CBC4EB:257D782:696B3BF3 |
| html-safe-nonce | 575f90003a985b860266dc4a926991fb773ba01fccb121bec95f088b85ef7f62 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjFFOjFERUNGOToxQ0JDNEVCOjI1N0Q3ODI6Njk2QjNCRjMiLCJ2aXNpdG9yX2lkIjoiNzYwOTA2NzY0MDc5MzU0NTcxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cc76253c54d28d1b6a8ad1d4fa524174c470c234e5cf3410316beef8aa519595 |
| hovercard-subject-tag | pull_request:617235423 |
| 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/25449/checks |
| twitter:image | https://avatars.githubusercontent.com/u/28750310?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/28750310?s=400&v=4 |
| og:image:alt | Reverted changes in genericaliasobject.c to commit 463c7d3 (right before PEP 612) via a clean git checkout 463c7d3d149283814d879a9bb8411af64e656c8e -- genericaliasobject.c. Implemented PEP 612 beha... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width