Title: Add callable validation to `codecs.register_error` by ever0de · Pull Request #6229 · RustPython/RustPython · GitHub
Open Graph Title: Add callable validation to `codecs.register_error` by ever0de · Pull Request #6229 · RustPython/RustPython
X Title: Add callable validation to `codecs.register_error` by ever0de · Pull Request #6229 · RustPython/RustPython
Description: Validate that the handler argument passed to codecs.register_error is callable, raising TypeError with message 'handler must be callable' if it is not. This fix enables test_badregistercall in test_codeccallbacks.py to pass. Summary by CodeRabbit Bug Fixes Improved error handler registration with enhanced validation to ensure handlers are callable, returning appropriate error messages when validation fails.
Open Graph Description: Validate that the handler argument passed to codecs.register_error is callable, raising TypeError with message 'handler must be callable' if it is not. This fix enables test_badregistercall...
X Description: Validate that the handler argument passed to codecs.register_error is callable, raising TypeError with message 'handler must be callable' if it is not. This fix enables test_badregi...
Opengraph URL: https://github.com/RustPython/RustPython/pull/6229
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:6a6a7198-bb8b-0bd2-f0dd-9bf82eeebca8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9C7E:1B30D4:12495A:19B3FE:696A6BAC |
| html-safe-nonce | 1e8f8b149f710529a04fc3e941963c22e5e342c3bedec7b5e32f4efd416e1949 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzdFOjFCMzBENDoxMjQ5NUE6MTlCM0ZFOjY5NkE2QkFDIiwidmlzaXRvcl9pZCI6Ijg3NzAwMTkyNDgxODUxNzQ5NTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6fcdbb4ac37580504698b8fee5e80204bc0f6409d395e56477abe8b25a82b2e1 |
| hovercard-subject-tag | pull_request:2963043188 |
| 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/6229/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 | Validate that the handler argument passed to codecs.register_error is callable, raising TypeError with message 'handler must be callable' if it is not. This fix enables test_badregistercall... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6fea32d5b7276b841b7a803796d9715bc6cfb31ed549fdf9de2948ac25d12ba6 |
| 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 | f2d9f6432a5a115ec709295ae70623f33bb80aee |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width