Skip to content

Update PyClassGetterGenerator to allow IntoPyObject conversion for Deref::Target#4990

Draft
bschoenmaeckers wants to merge 3 commits intoPyO3:mainfrom
bschoenmaeckers:container-specilization
Draft

Update PyClassGetterGenerator to allow IntoPyObject conversion for Deref::Target#4990
bschoenmaeckers wants to merge 3 commits intoPyO3:mainfrom
bschoenmaeckers:container-specilization

Conversation

@bschoenmaeckers
Copy link
Member

Alternative implementation for #4987 as of comment #4987 (comment).

pub const VALUE: bool = true;
}

probe!(IsDerefIntoPyObject);
Copy link
Member Author

Choose a reason for hiding this comment

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

I would like to implement this for T: Deref, for<'a, 'py> &'a T::Target: IntoPyObject<'py> but that will overflow the recursion limit because of the interaction with the Deref implementation of Bound. Is their another way to make this work for user defined wrappers?

@bschoenmaeckers bschoenmaeckers force-pushed the container-specilization branch from b5b0477 to 77b8a47 Compare March 18, 2025 15:37
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.

1 participant