René's URL Explorer Experiment


Title: Add basic capi error support by bschoenmaeckers · Pull Request #7787 · RustPython/RustPython · GitHub

Open Graph Title: Add basic capi error support by bschoenmaeckers · Pull Request #7787 · RustPython/RustPython

X Title: Add basic capi error support by bschoenmaeckers · Pull Request #7787 · RustPython/RustPython

Description: This is the next step in adding c-api support. It also contains utilities to handle errors for implementing other c-api functions. Summary by CodeRabbit New Features Expanded C API for exception handling, object/type inspection (type flags, type retrieval/is-type), runtime constant access, and thread/state restore entrypoints. Refactor Interpreter startup now initializes and registers global exception state when the main interpreter is created. Several VM/type APIs made public to support C-API usage. Chores Centralized FFI result handling and error propagation for native interop. Tests / CI C-API tests run in a dedicated CI step.

Open Graph Description: This is the next step in adding c-api support. It also contains utilities to handle errors for implementing other c-api functions. Summary by CodeRabbit New Features Expanded C API for exceptio...

X Description: This is the next step in adding c-api support. It also contains utilities to handle errors for implementing other c-api functions. Summary by CodeRabbit New Features Expanded C API for exceptio...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:712de3e7-2c0b-9399-1373-d96e287ae90f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idED66:23021C:574204:74D619:6A5B31FA
html-safe-nonce5bbb83e9b54c112871293d180751a80e508d16dd7fb4ad0949b93dfa24049c54
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDY2OjIzMDIxQzo1NzQyMDQ6NzRENjE5OjZBNUIzMUZBIiwidmlzaXRvcl9pZCI6Ijc3NDEzNzQ0MzA0ODUwOTkwMDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacfb4d3b3aaa549ee74bfc8b1243ad9cd297baba968d7d6b36905be354967addff
hovercard-subject-tagpull_request:3632176520
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/7787/files
twitter:imagehttps://avatars.githubusercontent.com/u/7943856?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/7943856?s=400&v=4
og:image:altThis is the next step in adding c-api support. It also contains utilities to handle errors for implementing other c-api functions. Summary by CodeRabbit New Features Expanded C API for exceptio...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
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
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/7787/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F7787%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F7787%2Ffiles
Sign up https://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/7787/files
Reloadhttps://github.com/RustPython/RustPython/pull/7787/files
Reloadhttps://github.com/RustPython/RustPython/pull/7787/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
RustPython https://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Notifications https://github.com/login?return_to=%2FRustPython%2FRustPython
Fork 1.5k https://github.com/login?return_to=%2FRustPython%2FRustPython
Star 22.2k https://github.com/login?return_to=%2FRustPython%2FRustPython
Code https://github.com/RustPython/RustPython
Issues 291 https://github.com/RustPython/RustPython/issues
Pull requests 101 https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects https://github.com/RustPython/RustPython/projects
Models https://github.com/RustPython/RustPython/models
Wiki https://github.com/RustPython/RustPython/wiki
Security and quality 0 https://github.com/RustPython/RustPython/security
Insights https://github.com/RustPython/RustPython/pulse
Code https://github.com/RustPython/RustPython
Issues https://github.com/RustPython/RustPython/issues
Pull requests https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects https://github.com/RustPython/RustPython/projects
Models https://github.com/RustPython/RustPython/models
Wiki https://github.com/RustPython/RustPython/wiki
Security and quality https://github.com/RustPython/RustPython/security
Insights https://github.com/RustPython/RustPython/pulse
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
bschoenmaeckers:capi-errorshttps://github.com/bschoenmaeckers/RustPython/tree/capi-errors
Conversation 53 https://github.com/RustPython/RustPython/pull/7787
Commits 17 https://github.com/RustPython/RustPython/pull/7787/commits
Checks 24 https://github.com/RustPython/RustPython/pull/7787/checks
Files changed https://github.com/RustPython/RustPython/pull/7787/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
Add basic capi error support https://github.com/RustPython/RustPython/pull/7787/files#top
Show all changes 17 commits https://github.com/RustPython/RustPython/pull/7787/files
2562f9d Add basic capi error support bschoenmaeckers May 5, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/2562f9dd748e54fd5d467c300d9adb69fec06391
40d97ea Add missing symbols to make tests compile again bschoenmaeckers May 5, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/40d97ea83cf8bfca8c2b50197f775c3354f5e895
6b79cb5 Add `pyerrors` to dictionary bschoenmaeckers May 5, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/6b79cb5e06e56a5b4a5b6901f67fdbda60ee2e19
71438c6 Return exception in `Py_GetConstantBorrowed` bschoenmaeckers May 5, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/71438c698f5c25303982c4a81c50bf3e3816fa51
d708bfe Remove `allow(dead_code)` bschoenmaeckers May 5, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/d708bfe52f35524610de622eb6ffd401311df399
bbf3656 Fix windows bschoenmaeckers May 5, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/bbf365658b18722d8f5fca7235c51c6188b74508
bccd38e Load stdlib when calling `Py_InitializeEx` bschoenmaeckers May 5, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/bccd38e9816d4e4a8181b1bfc2d29fc90861044a
9e20cf7 Debug tests bschoenmaeckers May 5, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/9e20cf7be626f4bbc6b7c9478dc0e43aa8c65c2f
268856b Revert "Load stdlib when calling `Py_InitializeEx`" bschoenmaeckers May 6, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/268856b7fab6ae804aa03c7d35802029a6cdc981
8432c17 Disable tests on windows for now bschoenmaeckers May 6, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/8432c1783af996b75974303f9f916c76945d51a5
130321e Truncate `PyType_GetFlags` to be always 32 bits bschoenmaeckers May 6, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/130321e36fb27c867929bd23685f7e3c53e619db
30ac061 Add test for exception type checking bschoenmaeckers May 6, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/30ac0610b1ffe627c9d8cbf2480d2ab4246ee539
4e4f7df Remove subclass type flags bschoenmaeckers May 6, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/4e4f7df6bd267bad857cc81e40d82173ec80573b
22985ca Merge remote-tracking branch 'origin/main' into capi-errors bschoenmaeckers May 9, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/22985ca5603d1b1ff31c3e7f131eb81b76a833a2
b2c2f69 Use latest pyo3 to make test work on windows bschoenmaeckers May 9, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/b2c2f6913fc1c2dbacc607c1f1b2e5f37a4768eb
d18d259 Revert "Use latest pyo3 to make test work on windows" bschoenmaeckers May 10, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/d18d259aa62c77714f8e2504e6d9931e36fe5744
4e7bcbf `set_main_interpreter` -> `init_main_interpreter` bschoenmaeckers May 13, 2026 https://github.com/RustPython/RustPython/pull/7787/commits/4e7bcbfced3e995be15494aa75de11d048e27948
Clear filters https://github.com/RustPython/RustPython/pull/7787/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
cpython.txt https://github.com/RustPython/RustPython/pull/7787/files#diff-157b2289f5afc1eb8c72f9a497cf3ea0082dc3f3baaf1d424889fdb3e4cc0b96
ci.yaml https://github.com/RustPython/RustPython/pull/7787/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
lib.rs https://github.com/RustPython/RustPython/pull/7787/files#diff-0fe0f9956005679e0794f572fbd45f07f96cde7ab1f3ff7e6c15bd7fa1ee7878
object.rs https://github.com/RustPython/RustPython/pull/7787/files#diff-fe583114535c5e006ae5797e6bb26bf8ab5a13accf9ab4a0de27b2a99d34b63c
pyerrors.rs https://github.com/RustPython/RustPython/pull/7787/files#diff-182ff1f3912ef23ede35e910440a570c251f3a564eef94cf5ca876939b3ca81d
pylifecycle.rs https://github.com/RustPython/RustPython/pull/7787/files#diff-c498326566a6c12f9e3f63e6dacd72d09baf5335e74b2cd4da2f68324380fcb8
pystate.rs https://github.com/RustPython/RustPython/pull/7787/files#diff-91ad907d67bdcddff34fdea7b99464a162d6c314d66bd7a2a7bd2adbb2ff5bd2
util.rs https://github.com/RustPython/RustPython/pull/7787/files#diff-853d32ddc8c3e49303b0d62040d07d6197a113b14e9e0fb3879fb87ac4dcebbd
type.rs https://github.com/RustPython/RustPython/pull/7787/files#diff-fb88962f9343ca7b8d31bfe34f5063136575e05eadae6fccb3b64658e14b0d6c
mod.rs https://github.com/RustPython/RustPython/pull/7787/files#diff-fe30ecf7c6b462e46e0874a55a05ea0edba83cefad5ac7a86e7137fa8f86ba74
lib.rs https://github.com/RustPython/RustPython/pull/7787/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759
.cspell.dict/cpython.txthttps://github.com/RustPython/RustPython/pull/7787/files#diff-157b2289f5afc1eb8c72f9a497cf3ea0082dc3f3baaf1d424889fdb3e4cc0b96
View file https://github.com/bschoenmaeckers/RustPython/blob/4e7bcbfced3e995be15494aa75de11d048e27948/.cspell.dict/cpython.txt
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7787/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7787/files#diff-157b2289f5afc1eb8c72f9a497cf3ea0082dc3f3baaf1d424889fdb3e4cc0b96
https://github.com/RustPython/RustPython/pull/7787/files#diff-157b2289f5afc1eb8c72f9a497cf3ea0082dc3f3baaf1d424889fdb3e4cc0b96
.github/workflows/ci.yamlhttps://github.com/RustPython/RustPython/pull/7787/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
View file https://github.com/bschoenmaeckers/RustPython/blob/4e7bcbfced3e995be15494aa75de11d048e27948/.github/workflows/ci.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7787/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7787/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
https://github.com/RustPython/RustPython/pull/7787/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
crates/capi/src/lib.rshttps://github.com/RustPython/RustPython/pull/7787/files#diff-0fe0f9956005679e0794f572fbd45f07f96cde7ab1f3ff7e6c15bd7fa1ee7878
View file https://github.com/bschoenmaeckers/RustPython/blob/4e7bcbfced3e995be15494aa75de11d048e27948/crates/capi/src/lib.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7787/{{ revealButtonHref }}
crates/capi/src/object.rshttps://github.com/RustPython/RustPython/pull/7787/files#diff-fe583114535c5e006ae5797e6bb26bf8ab5a13accf9ab4a0de27b2a99d34b63c
View file https://github.com/bschoenmaeckers/RustPython/blob/4e7bcbfced3e995be15494aa75de11d048e27948/crates/capi/src/object.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7787/{{ revealButtonHref }}
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
crates/capi/src/pyerrors.rshttps://github.com/RustPython/RustPython/pull/7787/files#diff-182ff1f3912ef23ede35e910440a570c251f3a564eef94cf5ca876939b3ca81d
View file https://github.com/bschoenmaeckers/RustPython/blob/4e7bcbfced3e995be15494aa75de11d048e27948/crates/capi/src/pyerrors.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7787/{{ revealButtonHref }}
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7787/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.