Skip to content

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.

@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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy