Title: Share pickle configuration conversion by youknowdot · Pull Request #9659 · RustPython/RustPython · GitHub
Open Graph Title: Share pickle configuration conversion by youknowdot · Pull Request #9659 · RustPython/RustPython
X Title: Share pickle configuration conversion by youknowdot · Pull Request #9659 · RustPython/RustPython
Description: Summary Share unpickler option binding and conversion across construction, load, and loads. Derived raw fields finish binding before truth-value and UTF-8/NUL conversion; stream/data setup precedes buffers iteration. Share file setup in CPython's attribute order and retain/traverse the optional readinto reference alongside the other file methods. Reuse truth-value and C-long protocol conversion, then share pickler setup in protocol → file write lookup → buffer callback validation order. Keep callback-bearing inputs rooted and drop replaced initializer state, memo, and configuration outside their locks. No manual FuncArgs parser, tests, snippets, or workflows are added or modified. Validation Final-source stdlib library cargo check and strict threading Clippy passed. Isolated CPython 3.15.0 reference probes cover all six truth/binding paths, unknown and duplicate keywords, codec None/NUL/surrogate errors, protocol bounds, input/setup callback order, and temporary codec-string lifetimes. Independent source review, rustfmt, diff checks, and normal commit hooks passed. RustPython runtime tests, full workspace tests, C-API tests, and non-Linux execution were not run locally because the native execution guard is unavailable. Hosted CI is still required. Existing initializer rollback differences remain outside this patch. Conversion errors reuse the project's established helpers rather than duplicating per-function parsing. References: CPython 3.15 pickle implementation and generated argument bindings. AI assistance OpenAI Codex assisted with source analysis, implementation, reference-case preparation, review, and this description. Model version was not exposed by this runtime. Summary by CodeRabbit Bug Fixes Pickling and unpickling now handle configuration options more consistently, including boolean conversion for import compatibility settings. Invalid encoding and error-handler values are rejected instead of being treated as defaults. Unsupported protocol values and buffer callbacks used with older protocols are rejected. File streams now recognize additional optional reading methods, while still requiring read and readline. Reconfiguring a pickler or unpickler stages new settings before replacing the existing configuration.
Open Graph Description: Summary Share unpickler option binding and conversion across construction, load, and loads. Derived raw fields finish binding before truth-value and UTF-8/NUL conversion; stream/data setup precede...
X Description: Summary Share unpickler option binding and conversion across construction, load, and loads. Derived raw fields finish binding before truth-value and UTF-8/NUL conversion; stream/data setup precede...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9659
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9e3529b6-705f-074f-4a10-92528655c10e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BCEC:AFBD9:150C1B1:1BD0B4B:6B01FA71 |
| html-safe-nonce | 4136b62452802f5df3311666346a69a999b7fd2c7c39022ee06ee2be1d28d645 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0VDOkFGQkQ5OjE1MEMxQjE6MUJEMEI0Qjo2QjAxRkE3MSIsInZpc2l0b3JfaWQiOiIyNzU3NTMzNzc3OTUyNjM1NTA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c65a4edccf103479f87aa00e701f81a431406ff65f0539ac1ae91d96f2571918 |
| hovercard-subject-tag | pull_request:5144950595 |
| 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/9659/files |
| twitter:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| og:image:alt | Summary Share unpickler option binding and conversion across construction, load, and loads. Derived raw fields finish binding before truth-value and UTF-8/NUL conversion; stream/data setup precede... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width