Skip to content

Conversation

@Tpt
Copy link
Contributor

@Tpt Tpt commented Dec 1, 2025

Introduces a proc-macro because statics need unique identifiers and we have to find a way to generate them

@Tpt Tpt force-pushed the tpt/inspect-exceptions branch from a78ba53 to ad9fe4e Compare December 1, 2025 11:04
Tpt added 2 commits December 4, 2025 11:05
Uses the new paste dependency (already used in ffi tests) to generate identifiers from proc-macros
@Tpt Tpt force-pushed the tpt/inspect-exceptions branch from ad9fe4e to b6e16e8 Compare December 4, 2025 14:57
@Tpt Tpt marked this pull request as ready for review December 4, 2025 16:06
@davidhewitt
Copy link
Member

Sorry for the slow reply here. I am not super keen on this - see #3475 - my preferred solution would be that we made #[pyclass] work properly for exception types and deprecated this macro rather than extended it. I'm not sure how critical it is we make this macro work with introspection in the meanwhile?

@Tpt
Copy link
Contributor Author

Tpt commented Dec 7, 2025

I'm not sure how critical it is we make this macro work with introspection in the meanwhile?

It's definitely not critical. This MR is mostly useful for completeness (have generated stub files as complete as possible). It does not block any other feature of type stubs generation. I can maybe add #1344 to my TODO after having a first iteration of the stubs generation done (without exceptions support).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants