Title: gh-122311: Improve and unify pickle errors by serhiy-storchaka · Pull Request #122771 · python/cpython · GitHub
Open Graph Title: gh-122311: Improve and unify pickle errors by serhiy-storchaka · Pull Request #122771 · python/cpython
X Title: gh-122311: Improve and unify pickle errors by serhiy-storchaka · Pull Request #122771 · python/cpython
Description: Raise PicklingError instead of UnicodeEncodeError, ValueError and AttributeError in both implementations. Chain the original exception to the pickle-specific one as __context__. Include the error message of ImportError and some AttributeError in the PicklingError error message. Unify error messages between Python and C implementations. Refer to documented __reduce__ and __newobj__ callables instead of internal methods (e.g. save_reduce()) or pickle opcodes (e.g. NEWOBJ). Include more details in error messages (what expected, what got). Avoid including a potentially long repr of an arbitrary object in error messages. Issue: gh-122311
Open Graph Description: Raise PicklingError instead of UnicodeEncodeError, ValueError and AttributeError in both implementations. Chain the original exception to the pickle-specific one as __context__. Include the error m...
X Description: Raise PicklingError instead of UnicodeEncodeError, ValueError and AttributeError in both implementations. Chain the original exception to the pickle-specific one as __context__. Include the error m...
Opengraph URL: https://github.com/python/cpython/pull/122771
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c8d4ff53-e856-fa6d-534f-320660406cc0 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D1EE:24A400:1395B18:1AA4DB2:6A557CBF |
| html-safe-nonce | 843faa7c8777e22ce6e91e33cf6f961ed3e861911a197ebd8141629b4bcbbb4d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUVFOjI0QTQwMDoxMzk1QjE4OjFBQTREQjI6NkE1NTdDQkYiLCJ2aXNpdG9yX2lkIjoiODcxOTQ4OTI3NTc5MDcyMDE5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 28416ede10cd583efd95ec7e9b9b5ac14edd2d69be88e7b62fe753f8b65fe70f |
| hovercard-subject-tag | pull_request:2008083643 |
| 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/python/cpython/pull/122771/files |
| twitter:image | https://avatars.githubusercontent.com/u/3659035?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3659035?s=400&v=4 |
| og:image:alt | Raise PicklingError instead of UnicodeEncodeError, ValueError and AttributeError in both implementations. Chain the original exception to the pickle-specific one as __context__. Include the error m... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| 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 | 617ea94e2807dc3052601c560530bb3f8259bc9a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width