Title: [BREAKING CHANGE] Writing magic method names as full name by youknowone · Pull Request #5842 · RustPython/RustPython · GitHub
Open Graph Title: [BREAKING CHANGE] Writing magic method names as full name by youknowone · Pull Request #5842 · RustPython/RustPython
X Title: [BREAKING CHANGE] Writing magic method names as full name by youknowone · Pull Request #5842 · RustPython/RustPython
Description: Better interface for users of RustPython as library and AI programming models. Summary by CodeRabbit Refactor All Python special (magic) methods and attributes have been renamed to use explicit double underscore (dunder) names (e.g., __len__, __getitem__, __name__) across built-in types, standard library modules, and exception handling. Removed magic method annotation flags in favor of explicit dunder method naming, enhancing consistency with Python conventions. Updated all internal and external calls to use the new dunder method names. Setter methods for special attributes renamed to match dunder conventions. Context manager methods (__enter__, __exit__) and other protocol methods renamed accordingly. Exception handling methods and attributes now consistently use dunder names. Suppression of non-snake-case warnings added automatically for setter methods. Python magic method bindings in core types and modules were renamed from generic or attribute-based names to explicit dunder names for clarity and standardization. Documentation Removed outdated example demonstrating the use of deprecated magic attribute in documentation. Style Improved naming consistency and alignment with Python’s special method naming conventions. These updates unify the Python interface naming, improve clarity, and maintain compatibility without changing functionality visible to end-users.
Open Graph Description: Better interface for users of RustPython as library and AI programming models. Summary by CodeRabbit Refactor All Python special (magic) methods and attributes have been renamed to use explicit ...
X Description: Better interface for users of RustPython as library and AI programming models. Summary by CodeRabbit Refactor All Python special (magic) methods and attributes have been renamed to use explicit ...
Opengraph URL: https://github.com/RustPython/RustPython/pull/5842
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:908a5376-1a1d-5635-9b1f-892e7a4ff39c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A54E:D7362:26D31E9:3345588:696B2AF3 |
| html-safe-nonce | 2c798e4fdd48232b1d68a0eb710f73df0cc027289c1a24c5afd2613e4d5d10f6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTRFOkQ3MzYyOjI2RDMxRTk6MzM0NTU4ODo2OTZCMkFGMyIsInZpc2l0b3JfaWQiOiIzODQzNDQ3OTIxNDk0OTI4MTE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 644e2d61388f4649f4c2ed9a588e975449542bea6392f1ebc026192d49f29e9d |
| hovercard-subject-tag | pull_request:2621724964 |
| 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/5842/files |
| twitter:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| og:image:alt | Better interface for users of RustPython as library and AI programming models. Summary by CodeRabbit Refactor All Python special (magic) methods and attributes have been renamed to use explicit ... |
| 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