Title: Implement property.__name__ attribute by ever0de · Pull Request #6230 · RustPython/RustPython · GitHub
Open Graph Title: Implement property.__name__ attribute by ever0de · Pull Request #6230 · RustPython/RustPython
X Title: Implement property.__name__ attribute by ever0de · Pull Request #6230 · RustPython/RustPython
Description: Add getter and setter for the name attribute on property objects. The getter returns the explicitly set name if available, otherwise falls back to the getter function's name. Raises AttributeError if no name is available, matching CPython 3.13 behavior. The implementation handles edge cases: Returns None when explicitly set to None Propagates non-AttributeError exceptions from getter's getattr Raises property-specific AttributeError when getter lacks name This fix enables test_property_name in test_property.py to pass. Summary by CodeRabbit New Features Property objects now expose a readable and writable name attribute. When not explicitly set, name is derived from the property's getter. Bug Fixes Improved error handling around property names: missing or non-existent names are treated consistently, while unexpected errors are surfaced for clearer diagnostics.
Open Graph Description: Add getter and setter for the name attribute on property objects. The getter returns the explicitly set name if available, otherwise falls back to the getter function's name. Raises AttributeEr...
X Description: Add getter and setter for the name attribute on property objects. The getter returns the explicitly set name if available, otherwise falls back to the getter function's name. Raises Attribu...
Opengraph URL: https://github.com/RustPython/RustPython/pull/6230
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9bb5ab79-39e5-cfd9-244d-b1049fe0c634 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D008:2F21B4:C6370D:1011194:696B2A57 |
| html-safe-nonce | 57b15026526d70151ded492126df486bd794588efb00a29f7369c72d252fb15e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDA4OjJGMjFCNDpDNjM3MEQ6MTAxMTE5NDo2OTZCMkE1NyIsInZpc2l0b3JfaWQiOiIzNjY3NzczNzEzMTYwMDIyNjE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f639c1d8f70e0c414444abe4e77b56c1cdc7eadb4e09fb71ba3c2eb6f449a4a3 |
| hovercard-subject-tag | pull_request:2967196117 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/RustPython/RustPython/pull/6230/files |
| twitter:image | https://avatars.githubusercontent.com/u/27040963?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/27040963?s=400&v=4 |
| og:image:alt | Add getter and setter for the name attribute on property objects. The getter returns the explicitly set name if available, otherwise falls back to the getter function's name. Raises AttributeEr... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| 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