Title: Regression: Cannot combine @property decorator with @abstractclassmethod · Issue #7134 · python/typeshed · GitHub
Open Graph Title: Regression: Cannot combine @property decorator with @abstractclassmethod · Issue #7134 · python/typeshed
X Title: Regression: Cannot combine @property decorator with @abstractclassmethod · Issue #7134 · python/typeshed
Description: This commit changed the definition of abstractclassmethod and abstractstaticmethod in a way that makes them no longer callable. That means they cannot be used with other decorators (like property) that require a callable. The following p...
Open Graph Description: This commit changed the definition of abstractclassmethod and abstractstaticmethod in a way that makes them no longer callable. That means they cannot be used with other decorators (like property) ...
X Description: This commit changed the definition of abstractclassmethod and abstractstaticmethod in a way that makes them no longer callable. That means they cannot be used with other decorators (like property) ...
Opengraph URL: https://github.com/python/typeshed/issues/7134
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression: Cannot combine @property decorator with @abstractclassmethod","articleBody":"[This commit](https://github.com/python/typeshed/commit/2dc53caffea764f789afabd6a9c66f974918fe00) changed the definition of `abstractclassmethod` and `abstractstaticmethod` in a way that makes them no longer callable. That means they cannot be used with other decorators (like `property`) that require a callable.\r\n\r\nThe following previously type checked without errors, but it no longer works.\r\n\r\n```python\r\n @property\r\n @abc.abstractclassmethod\r\n def foo(self) -> str: ...\r\n```\r\n\r\nThe new declaration of `abstractclassmethod` and `abstractstaticmethod` also completely obscure the signature of the function they're decorating, which is a big problem for type checking (and completion suggestions, etc.).\r\n\r\nI recommend reverting the change for `abstractclassmethod` and `abstractstaticmethod`. If there is a compelling reason to wrap these in a class, then the class should be parameterized with a ParamSpec and should include a `__call__` method so it is still callable. @srittau, do you have a preference?\r\n\r\nI won't be able to incorporate the latest typeshed stubs into pyright or pylance until this is addressed because this regression results in significant problems for internal Microsoft code bases.","author":{"url":"https://github.com/erictraut","@type":"Person","name":"erictraut"},"datePublished":"2022-02-05T03:26:43Z","url":"https://github.com/python/typeshed/issues/7134"}
| 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:d3643456-182d-7f4b-171e-b0248f70c9b4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2A8:157BA1:363D0:49E68:6B001A35 |
| html-safe-nonce | dc4eabb9671a73bd78aea7a48c0f609d662b4b57719890b607fd907f34e4dd1c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkE4OjE1N0JBMTozNjNEMDo0OUU2ODo2QjAwMUEzNSIsInZpc2l0b3JfaWQiOiI2MTUzOTE3MjIwMzk4MzA3ODkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2d3ed479daf9902de001cba6c271900e762a5de3004093bb900e42952806a7e4 |
| hovercard-subject-tag | issue:1124816323 |
| 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/7134/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7bd38ca31bcd0a3193ef23ed3d75d360066a612a3b29c38be422fee2a04d31d1/python/typeshed/issues/7134 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7bd38ca31bcd0a3193ef23ed3d75d360066a612a3b29c38be422fee2a04d31d1/python/typeshed/issues/7134 |
| og:image:alt | This commit changed the definition of abstractclassmethod and abstractstaticmethod in a way that makes them no longer callable. That means they cannot be used with other decorators (like property) ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | erictraut |
| hostname | github.com |
| expected-hostname | github.com |
| None | a2dd2291b1b13cc9c06f27ec92fa3dbaf34116fc24c9347b8539db61884c59f4 |
| 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 | 70121d4e855ee0bb7b75cf15d061d91f8863c0f8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width