Title: Reject excess ctypes paramflags arguments by youknowdot · Pull Request #9621 · RustPython/RustPython · GitHub
Open Graph Title: Reject excess ctypes paramflags arguments by youknowdot · Pull Request #9621 · RustPython/RustPython
X Title: Reject excess ctypes paramflags arguments by youknowdot · Pull Request #9621 · RustPython/RustPython
Description: Summary Reject excess positional arguments in ctypes calls using nonempty argtypes and paramflags when no keywords are supplied, rather than silently dropping them before the foreign call. Preserve CPython's empty-argtypes bypass and include the COM receiver in the count when applicable. Scope This does not implement keyword/name binding, repair malformed paramflags, or change existing empty-prototype call construction. RustPython still invokes converters during assembly before this argument-count error, while CPython validates the constructed call arguments before conversion. Validation Compared with CPython 3.15.0 _build_callargs; CPython 3.15 reproductions confirmed the 0/1 and 1/2 extra-argument errors, as well as its empty-prototype bypass. Independent source review and normal commit hooks (including rustfmt) passed. Sequential local three-way file merges with #9611, #9613, #9615, #9616, #9618 and #9620 were clean. RustPython was not built or executed locally. No tests were added or changed; hosted CI is expected to run the existing ctypes tests. Summary by CodeRabbit Bug Fixes Calls with leftover positional arguments now raise a TypeError when argument types are specified and no keyword arguments are provided. The error reports the expected and supplied argument counts.
Open Graph Description: Summary Reject excess positional arguments in ctypes calls using nonempty argtypes and paramflags when no keywords are supplied, rather than silently dropping them before the foreign call. Preserve...
X Description: Summary Reject excess positional arguments in ctypes calls using nonempty argtypes and paramflags when no keywords are supplied, rather than silently dropping them before the foreign call. Preserve...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9621
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:9bdf3691-0a15-7255-e5d4-722ca543006b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BC30:1087D4:2FC05E1:3FD1D9C:6B01E96A |
| html-safe-nonce | 148b0c52ca04f843c56789f5d5c7ae74e28544be91732168105799254d842c7b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzMwOjEwODdENDoyRkMwNUUxOjNGRDFEOUM6NkIwMUU5NkEiLCJ2aXNpdG9yX2lkIjoiNjU4MTU0Mjc0MDEyMTc0MTY3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 81f54c2922aa2f0395dbc8429bc8280722388d78082eea7ccd56a356284df9f7 |
| hovercard-subject-tag | pull_request:5137949307 |
| 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/9621/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 Reject excess positional arguments in ctypes calls using nonempty argtypes and paramflags when no keywords are supplied, rather than silently dropping them before the foreign call. Preserve... |
| 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