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/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:f7a79bc2-a1f2-a8d9-5d01-e3076f5717ba |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E22A:3410DA:480611:5CBB28:696AE275 |
| html-safe-nonce | 2f5108e6f80ca31f9e79f4326d85e58f72f8d1bf12b24c4c61aefb2e809437bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjJBOjM0MTBEQTo0ODA2MTE6NUNCQjI4OjY5NkFFMjc1IiwidmlzaXRvcl9pZCI6IjI3NjY0NjIxMzAxNzEwNzcyMzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 97ddcb3d61a7a04bcd91d42def524658afb20420b2afb462b74f0b3b77045fef |
| hovercard-subject-tag | pull_request:2963043188 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/checks |
| 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 | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-cache |
| 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 full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3d84d50b3c75fa36755c3cf392edbc09e626f979 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width