Title: disallow __new__, __init__ by youknowone · Pull Request #6446 · RustPython/RustPython · GitHub
Open Graph Title: disallow __new__, __init__ by youknowone · Pull Request #6446 · RustPython/RustPython
X Title: disallow __new__, __init__ by youknowone · Pull Request #6446 · RustPython/RustPython
Description: There are currently some code paths that use __new__ and __init__ directly instead of going through the Constructor/Initializer. I plan to change these so that they raise an error. Before doing that, we’ll need to remove any code that actually relies on this behavior. close #6448 Summary by CodeRabbit Refactor Centralized and reworked object and exception initialization to a trait-based initializer/constructor system. Many built-ins and exceptions now use the new initialization pathway (no visible behavior change; construction semantics preserved). Some previous public init implementations were removed and replaced by the new initializer-based flow (e.g., Cursor), preserving external behavior. ✏️ Tip: You can customize this high-level summary in your review settings.
Open Graph Description: There are currently some code paths that use __new__ and __init__ directly instead of going through the Constructor/Initializer. I plan to change these so that they raise an error. Before doing tha...
X Description: There are currently some code paths that use __new__ and __init__ directly instead of going through the Constructor/Initializer. I plan to change these so that they raise an error. Before doing tha...
Opengraph URL: https://github.com/RustPython/RustPython/pull/6446
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f741980c-b596-4201-31be-4967f5ab4e47 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8924:1CEAED:BAFF69:FB9C38:696ABED7 |
| html-safe-nonce | 18f1a04f2689c5350af5d36d218b07be544316ec1c95025cf1945e79aaadc44a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTI0OjFDRUFFRDpCQUZGNjk6RkI5QzM4OjY5NkFCRUQ3IiwidmlzaXRvcl9pZCI6IjE0MDY5NDg1NzExNjMwNDk2ODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fd4f0c8a7b924ae886df94a99b213ce933ff657b1cd9d2d1d99583444d331dbc |
| hovercard-subject-tag | pull_request:3105007513 |
| 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/6446/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 | There are currently some code paths that use __new__ and __init__ directly instead of going through the Constructor/Initializer. I plan to change these so that they raise an error. Before doing tha... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 46ce962e0e18113ea447391b6ace8b02d4d2861e57b4fbab3658698f73d8855b |
| 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 | 30300f30bb3949de255e84a146706a3bdb5c19c9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width