Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

implement PyCallArgs for borrowed types #5013

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

Merged
merged 3 commits into from
Mar 28, 2025
Merged

implement PyCallArgs for borrowed types #5013

merged 3 commits into from
Mar 28, 2025

Conversation

davidhewitt
Copy link
Member

This implements PyCallArgs for Borrowed<'_, 'py, PyTuple>, &Bound<'py, PyTuple>, and &Py<PyTuple>.

While these types are rarer, I did hit a case in pydantic-core where I had an existing Py<PyTuple> which I did not want to transfer ownership of, and adding these implementations avoids a needless reference count op.

src/call.rs Outdated Show resolved Hide resolved
@davidhewitt davidhewitt enabled auto-merge March 28, 2025 08:58
@davidhewitt davidhewitt added this pull request to the merge queue Mar 28, 2025
Merged via the queue into main with commit 1b00b0d Mar 28, 2025
47 of 48 checks passed
@davidhewitt davidhewitt deleted the callargs-borrowed branch March 28, 2025 10:35
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.