Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove ToBorrowedObject trait #2333

Merged
merged 1 commit into from Apr 26, 2022

Conversation

davidhewitt
Copy link
Member

The ToBorrowedObject trait hasn't ever been functionally useful with PyO3 on stable Rust, as it relied on the nightly feature for specialization.

Since we now took the usage of specialization away, there's no point for this trait to exist at all. It's essentially just a wrapper around ToPyObject, so this PR deprecates the trait and mechanically replaces all PyO3's usage of it with ToPyObject.

Copy link
Member

@mejrs mejrs left a comment

Choose a reason for hiding this comment

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

Thanks, this trait did feel pretty useless :)

src/conversion.rs Outdated Show resolved Hide resolved
@davidhewitt davidhewitt merged commit 1596ab8 into PyO3:main Apr 26, 2022
@davidhewitt davidhewitt deleted the remove-toborrowedobject branch April 26, 2022 05:23
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.

None yet

2 participants