Title: Fix native ABC instance checks on Python 3.15 by youknowdot · Pull Request #9067 · RustPython/RustPython · GitHub
Open Graph Title: Fix native ABC instance checks on Python 3.15 by youknowdot · Pull Request #9067 · RustPython/RustPython
X Title: Fix native ABC instance checks on Python 3.15 by youknowdot · Pull Request #9067 · RustPython/RustPython
Description: Current revision Targets main after #8950, with one logical commit: 082afb3de1722a1ca279ecb8323ec7a7be003849 (parent 4e3b2f40395a4235841aaca811843d97ed68af0d). The unique patch is byte-identical to the prior reviewed head and now includes main's merged #9082 shared CI fix and #9081 REPL fix; original author attribution and assistance trailers are retained. No files under Lib/ are changed. Normal hooks, whitespace checks, and independent tree/history review passed. The temporary [skip ci] marker is removed and normal CI is enabled for this final head. No new local build or runtime test is claimed. Validation recorded below belongs to earlier revisions unless explicitly stated otherwise. Rebased once after #9082 and #9081 merged to repair the shared Python 3.15 IO reference failure. Normal commit hooks and exact range-diff/patch-equivalence checks pass. Exact-head hosted CI is running; no additional local runtime validation is claimed. Summary Extract the native ABC instance-check fallback from #8954, matching the Python 3.15.0 reference used by #8950. If reading an instance's __class__ raises AttributeError, use its actual type for ABC checks. Other exceptions still propagate unchanged. This preserves virtual-subclass registration and negative-cache invalidation for such instances. The unique commit changes native _abc and preserves the original Python regression for missing __class__, registration, and propagation of other exceptions. The pure-Python _py_abc fallback remains outside this PR's unique change. Reference: CPython 3.15.0 source. Scope The unique commit changes no files under Lib/ and inherits .python-version 3.15.0 from #8950. The former shared Python 3.14.8 version pin and TextIOWrapper deletion change have been removed. The Python 3.15.0 TextIOWrapper setter checks attachment before rejecting _CHUNK_SIZE deletion, so the old I/O prerequisite does not belong in this stack. Validation Independent source review against the exact CPython 3.15.0 reference passed. The unique native implementation and original Python regression are preserved; the comparison above contains only the two files described here. Configured commit hooks passed for 74c9775a5a9ae1f5fbdba476f4fb5a616da5f293. No local build or runtime tests were run for this new Python 3.15 stack. Previous local and hosted results belong to the older Python 3.14.8 heads and do not validate this head. Normal hosted CI on this exact head is pending. AI-assisted with OpenAI Codex. Summary by CodeRabbit New Features RustPython now targets Python 3.15, with updated runtime version information. Improved compatibility for sequence multiplication, logarithms, time conversion, and several standard-library behaviors. Bug Fixes Fixed ABC instance checks when an object’s __class__ attribute is unavailable. Corrected edge-case handling for memory-mapped searches, struct formats, CSV dialect attributes, and built-in module creation. Improved error messages for formatting and invalid AST construction.
Open Graph Description: Current revision Targets main after #8950, with one logical commit: 082afb3de1722a1ca279ecb8323ec7a7be003849 (parent 4e3b2f40395a4235841aaca811843d97ed68af0d). The unique patch is byte-identical to...
X Description: Current revision Targets main after #8950, with one logical commit: 082afb3de1722a1ca279ecb8323ec7a7be003849 (parent 4e3b2f40395a4235841aaca811843d97ed68af0d). The unique patch is byte-identical to...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9067
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:85ded113-fa91-df26-54ce-2c0f7ddca7bf |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B684:2A7C1C:15E72C9:1CF877E:6B01FE56 |
| html-safe-nonce | a15d7fe966001983d975de83224b70ae783c5a89701b4bd2f3168ee30f71efba |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjg0OjJBN0MxQzoxNUU3MkM5OjFDRjg3N0U6NkIwMUZFNTYiLCJ2aXNpdG9yX2lkIjoiMzc2ODg0NDI3OTQ2MDUyNzcwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f3ac7fafe63518a79d4e7e48f8801e64bc525b7659a0afa36eadaa1aab295c55 |
| hovercard-subject-tag | pull_request:4811439048 |
| 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/9067/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 | Current revision Targets main after #8950, with one logical commit: 082afb3de1722a1ca279ecb8323ec7a7be003849 (parent 4e3b2f40395a4235841aaca811843d97ed68af0d). The unique patch is byte-identical to... |
| 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 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width