René's URL Explorer Experiment


Title: Align builtin behavior and atexit callbacks with CPython by youknowdot · Pull Request #9442 · RustPython/RustPython · GitHub

Open Graph Title: Align builtin behavior and atexit callbacks with CPython by youknowdot · Pull Request #9442 · RustPython/RustPython

X Title: Align builtin behavior and atexit callbacks with CPython by youknowdot · Pull Request #9442 · RustPython/RustPython

Description: Summary Match CPython 3.15's complex constructor routes: single-positional conversion versus real/imag components, including deprecation warnings and conversion/error priority. Warn before replacing a function's code with a different generator/coroutine kind, after validating its closure requirements and before mutation/JIT locking. Match float power's full special-value ordering: zero exponents, NaNs, infinite exponents/bases, signed zero, finite negative fractional bases, exact odd parity, and signed underflow. Preserve the complete atexit callback snapshot through execution, report SystemExit and continue to later callbacks, and clear the live registry afterward. Release callback entries in reverse order and outside the registry mutex. Retire the three corresponding expected-failure decorators through actual update_lib migrations. test_complex.py, test_funcattrs.py, and test_float.py match CPython d220409a13b77de7a6c30abe16ea90db01528edc exactly. The complex conversion helper retains its returned object through argument validation and releases it before the original-real capability check/warning. Other try_complex callers retain their prior scalar conversion behavior. Existing signed-zero, exact-complex identity, closure, and JIT guards are preserved. The float helper deliberately overlaps #8624's partial float-power correction: its numeric negativity and exact fractional classification are subsumed by the complete CPython special-value ordering. This does not incorporate or modify that PR's separate JIT changes. Finite overflow still raises OverflowError with RustPython's existing math range error text rather than CPython's errno-derived arguments/message; platform-libm diagnostic equivalence is not claimed. Validation Fresh scoped cargo check and strict cargo clippy -- -Dwarnings passed; one guarded native build passed. Combined protected native executable built from base 8c6c94b07174224517b6bf62abab202565382ea7 plus this branch’s complex-constructor, function-code-warning, and float-power native changes: SHA-256 4b4b55bfffd0ba5a691efb6cc8b14aea8ca70976846f7951d07e41dc427b344a. All 23 recorded source hashes verified before/after build; protected binary verified at runtime. Complex: eight unmodified canonical constructor/conversion methods and nine finite warning/order/identity oracles passed (17 total). Function assignment: full canonical test_invalid___code___assignment and four finite warning/error-order oracles passed (5 total). Float power: full unmodified canonical GeneralFloatCases.test_float_pow and four finite special-value/sign/error-priority oracle groups passed (5 total). The complete updater-generated method also passed separately. All 27 combined native tests and the generated-method check passed without skips or expected failures. Matching host CPython runs passed the corresponding 17 + 5 + 5 tests. Updater self-tests passed: 228 tests with PYTHONPATH=scripts. Applicable configured hooks passed, including rustfmt, Ruff, cspell, and redundant-patch checks; diff checks passed. This is focused constructor, code-assignment, and float-power compatibility evidence, not a claim that all arithmetic, JIT execution, or Python 3.15 behavior was tested. No full-module/workspace/CAPI, concurrency, crash, GC, profiler, or stress suites were run for this follow-up. Atexit follow-up and combined validation The callback-only follow-up is applied to head 4fc9eca9fdbb8fa3860371489302783ce62d51d4 without changing its existing native or Lib updates. Fresh scoped check and strict Clippy passed. One completed guarded recovery build produced protected executable SHA-256 37e950d1aead31f11b49092c862f232bcf703a4acd940e1f888e6662e03cf04d; all 607 native inputs, retained source timestamps, compiler artifact provenance and 12 runtime inputs were verified. All 36 tests passed on that same combined executable: the 17 complex, 5 function-assignment and 5 float cases above, plus eight unchanged canonical test._test_atexit.GeneralTest methods and one bounded ordinary Python SystemExit-continuation check. Exact counts were enforced with no skips or expected failures. Earlier interrupted builds have unknown outcomes and supply no success evidence. This does not implement CPython's repeated finalization quiescence loop, change atexit Lib files, retire atexit markers or enable its new threading tests. Existing callback-entry field destruction layout and low-memory behavior are not asserted identical. No concurrency, GC, destructor-reentry, process-shutdown, profiler or stress tests were executed. The finalization/TLS changes owned by #8939 and #8944 remain separate; this patch does not import or modify them. AI assistance OpenAI Codex assisted with implementation, source review, validation, and this description.

Open Graph Description: Summary Match CPython 3.15's complex constructor routes: single-positional conversion versus real/imag components, including deprecation warnings and conversion/error priority. Warn before rep...

X Description: Summary Match CPython 3.15's complex constructor routes: single-positional conversion versus real/imag components, including deprecation warnings and conversion/error priority. Warn before...

Opengraph URL: https://github.com/RustPython/RustPython/pull/9442

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:94efdd73-f141-8190-36e0-18e40f8b82ff
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9600:EA09B:3422D11:4523641:6B01F79C
html-safe-nonce420deea233f60b74bc71732f7c60e492911e7cfa9af1631b4c8702f5e1093c53
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjAwOkVBMDlCOjM0MjJEMTE6NDUyMzY0MTo2QjAxRjc5QyIsInZpc2l0b3JfaWQiOiI1MTIzNzI3MTkzNzA4NTU4MjM3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1f332ee6b45de9c9747dcecd0252ae3a574d4bfd1e5c3db95e18dfaf72855cd9
hovercard-subject-tagpull_request:5054191293
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9442/files
twitter:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
og:image:altSummary Match CPython 3.15's complex constructor routes: single-positional conversion versus real/imag components, including deprecation warnings and conversion/error priority. Warn before rep...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9442/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9442%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9442%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/9442/files
Reloadhttps://github.com/RustPython/RustPython/pull/9442/files
Reloadhttps://github.com/RustPython/RustPython/pull/9442/files
RustPythonhttps://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Codehttps://github.com/RustPython/RustPython
Issues195 (195)https://github.com/RustPython/RustPython/issues
Pull requests133 (133)https://github.com/RustPython/RustPython/pulls
Discussionshttps://github.com/RustPython/RustPython/discussions
Actionshttps://github.com/RustPython/RustPython/actions
Projectshttps://github.com/RustPython/RustPython/projects
Wikihttps://github.com/RustPython/RustPython/wiki
Security and qualityhttps://github.com/RustPython/RustPython/security
Insightshttps://github.com/RustPython/RustPython/insights
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowonehttps://github.com/youknowone
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
youknowdot:fix/function-code-kind-warning-20261028https://github.com/youknowdot/RustPython/tree/fix/function-code-kind-warning-20261028
Conversation 4 https://github.com/RustPython/RustPython/pull/9442
Commits 3 https://github.com/RustPython/RustPython/pull/9442/commits
Checks 29 https://github.com/RustPython/RustPython/pull/9442/checks
Files changed https://github.com/RustPython/RustPython/pull/9442/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9442/files
Align builtin behavior and atexit callbacks with CPython https://github.com/RustPython/RustPython/pull/9442/files#top
Show all changes 3 commits https://github.com/RustPython/RustPython/pull/9442/files
eaca6bc Align complex construction and code-assignment warnings with CPython youknowdot Oct 28, 2026 https://github.com/RustPython/RustPython/pull/9442/commits/eaca6bce9f673c92d4ffa9518b4e7074e7fbd5c2
4fc9eca Match CPython float power special-value ordering codex Oct 28, 2026 https://github.com/RustPython/RustPython/pull/9442/commits/4fc9eca9fdbb8fa3860371489302783ce62d51d4
413d555 Preserve atexit callback snapshot and continue after SystemExit codex Oct 28, 2026 https://github.com/RustPython/RustPython/pull/9442/commits/413d55514bbd8f601d683254a37f3da0cc492ec2
Clear filters https://github.com/RustPython/RustPython/pull/9442/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9442/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9442/files
test_complex.py https://github.com/RustPython/RustPython/pull/9442/files#diff-3d5c8c4c000b7f6f9cdbedd36358b5f61686d39ff942be840e81f36c81da0ce2
test_float.py https://github.com/RustPython/RustPython/pull/9442/files#diff-101957dfb9ef9c3a34ad39d7ad89a2d7d69290980553f9425acda0d5633ad453
test_funcattrs.py https://github.com/RustPython/RustPython/pull/9442/files#diff-b0b3aee6d1aaec7c1acb05ecf93a2e6c8b843ac8fa376b4197c4f2f5cb5c8f35
complex.rs https://github.com/RustPython/RustPython/pull/9442/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
float.rs https://github.com/RustPython/RustPython/pull/9442/files#diff-4deb5676286995e76a9c87099407a5d64a7a57a6ee9ca97a059e79e649bc0dca
function.rs https://github.com/RustPython/RustPython/pull/9442/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
atexit.rs https://github.com/RustPython/RustPython/pull/9442/files#diff-d191777b82224e11480c52511cf2098be0b173c2476ae73f13d8eda0db73e32d
Lib/test/test_complex.pyhttps://github.com/RustPython/RustPython/pull/9442/files#diff-3d5c8c4c000b7f6f9cdbedd36358b5f61686d39ff942be840e81f36c81da0ce2
View file https://github.com/youknowdot/RustPython/blob/413d55514bbd8f601d683254a37f3da0cc492ec2/Lib/test/test_complex.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9442/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9442/files#diff-3d5c8c4c000b7f6f9cdbedd36358b5f61686d39ff942be840e81f36c81da0ce2
https://github.com/RustPython/RustPython/pull/9442/files#diff-3d5c8c4c000b7f6f9cdbedd36358b5f61686d39ff942be840e81f36c81da0ce2
Lib/test/test_float.pyhttps://github.com/RustPython/RustPython/pull/9442/files#diff-101957dfb9ef9c3a34ad39d7ad89a2d7d69290980553f9425acda0d5633ad453
View file https://github.com/youknowdot/RustPython/blob/413d55514bbd8f601d683254a37f3da0cc492ec2/Lib/test/test_float.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9442/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9442/files#diff-101957dfb9ef9c3a34ad39d7ad89a2d7d69290980553f9425acda0d5633ad453
https://github.com/RustPython/RustPython/pull/9442/files#diff-101957dfb9ef9c3a34ad39d7ad89a2d7d69290980553f9425acda0d5633ad453
Lib/test/test_funcattrs.pyhttps://github.com/RustPython/RustPython/pull/9442/files#diff-b0b3aee6d1aaec7c1acb05ecf93a2e6c8b843ac8fa376b4197c4f2f5cb5c8f35
View file https://github.com/youknowdot/RustPython/blob/413d55514bbd8f601d683254a37f3da0cc492ec2/Lib/test/test_funcattrs.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9442/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9442/files#diff-b0b3aee6d1aaec7c1acb05ecf93a2e6c8b843ac8fa376b4197c4f2f5cb5c8f35
https://github.com/RustPython/RustPython/pull/9442/files#diff-b0b3aee6d1aaec7c1acb05ecf93a2e6c8b843ac8fa376b4197c4f2f5cb5c8f35
crates/vm/src/builtins/complex.rshttps://github.com/RustPython/RustPython/pull/9442/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
View file https://github.com/youknowdot/RustPython/blob/413d55514bbd8f601d683254a37f3da0cc492ec2/crates/vm/src/builtins/complex.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9442/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9442/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
https://github.com/RustPython/RustPython/pull/9442/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
https://github.com/RustPython/RustPython/pull/9442/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
https://github.com/RustPython/RustPython/pull/9442/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
https://github.com/RustPython/RustPython/pull/9442/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
https://github.com/RustPython/RustPython/pull/9442/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
https://github.com/RustPython/RustPython/pull/9442/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
https://github.com/RustPython/RustPython/pull/9442/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
crates/vm/src/builtins/float.rshttps://github.com/RustPython/RustPython/pull/9442/files#diff-4deb5676286995e76a9c87099407a5d64a7a57a6ee9ca97a059e79e649bc0dca
View file https://github.com/youknowdot/RustPython/blob/413d55514bbd8f601d683254a37f3da0cc492ec2/crates/vm/src/builtins/float.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9442/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9442/files#diff-4deb5676286995e76a9c87099407a5d64a7a57a6ee9ca97a059e79e649bc0dca
https://github.com/RustPython/RustPython/pull/9442/files#diff-4deb5676286995e76a9c87099407a5d64a7a57a6ee9ca97a059e79e649bc0dca
crates/vm/src/builtins/function.rshttps://github.com/RustPython/RustPython/pull/9442/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
View file https://github.com/youknowdot/RustPython/blob/413d55514bbd8f601d683254a37f3da0cc492ec2/crates/vm/src/builtins/function.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9442/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9442/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
https://github.com/RustPython/RustPython/pull/9442/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9442/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9442/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.