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

update complexobject.rs for 3.13 #4521

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

davidhewitt
Copy link
Member

Split from #4379

This updates complexobject.rs for 3.13 structure, and removes the definitions of the private symbols at the same time.

#[cfg(not(GraalPy))]
pub cval: Py_complex,
}

Copy link
Contributor

@ngoldbaum ngoldbaum Sep 3, 2024

Choose a reason for hiding this comment

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

Out of curiosity, do you care about exposing these structs in the same locations as the C API does in all python versions? cpython/complexobject.h first appeared in 3.11 so these definitions are correct on 3.10 and older.

Copy link
Member Author

Choose a reason for hiding this comment

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

Generally I try to keep the locations matching latest CPython we support, to make reconciliation against the headers more straightforward.

If a symbol just didn't exist at all on older python versions then we can cfg it out.

I think having cfg-d implementations at different locations just makes the overall complexity a bit higher.

Of course, I don't think we've been perfect at following this exact strategy (and often lag CPython a bit).

Copy link
Contributor

@ngoldbaum ngoldbaum left a comment

Choose a reason for hiding this comment

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

Looks like this matches what's in 3.13rc1.

@davidhewitt davidhewitt added this pull request to the merge queue Sep 4, 2024
Merged via the queue into PyO3:main with commit 3496f49 Sep 4, 2024
41 of 43 checks passed
@davidhewitt davidhewitt deleted the private-complex-apis branch September 4, 2024 08:55
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