Skip to content

Basic introspection of #[derive(IntoPyObject)] - #5365

Merged
davidhewitt merged 1 commit into
PyO3:mainfrom
Tpt:tpt/into-py-object
Aug 31, 2025
Merged

davidhewitt merged 1 commit into
PyO3:mainfrom
Tpt:tpt/into-py-object

Conversation

@Tpt

@Tpt Tpt commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor

Struct fields are not supported yet

Similar implementation as #5339

Struct fields are not supported yet

@davidhewitt davidhewitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM. Makes sense to leave structs for a follow up.

Comment on lines +387 to +390
ContainerType::Struct(_) => {
// TODO: implement using a Protocol?
builder.push_str("_typeshed.Incomplete")
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for IntoPyObject it's simpler, we can probably declare that we'll always create a dict? Might be able to use a TypedDict

@davidhewitt
davidhewitt added this pull request to the merge queue Aug 31, 2025
Merged via the queue into PyO3:main with commit 564a72f Aug 31, 2025
45 checks passed
@Tpt
Tpt deleted the tpt/into-py-object branch September 1, 2025 16:04
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