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

PEP 623: wstr, wstr_length, state changes #3087

Merged
merged 1 commit into from
Apr 11, 2023
Merged

PEP 623: wstr, wstr_length, state changes #3087

merged 1 commit into from
Apr 11, 2023

Conversation

ijl
Copy link
Contributor

@ijl ijl commented Apr 7, 2023

https://peps.python.org/pep-0623/

Following members are removed from the Unicode structures:

    wstr
    wstr_length
    state.compact
    state.ready

Note state.compact is still present as of v3.12.0a7.

state.interned has changed width from 2 to 1 bits.

@ijl
Copy link
Contributor Author

ijl commented Apr 7, 2023

I've tested this in orjson's CI on 3.7 to 3.11 for arm7, aarch64, amd64, and s390x, 3.12 for amd64.

@adamreichold
Copy link
Member

The one concern I see here is that this is auto-generated code that we need now extend with new functionality (supporting both CPython 3.11 and 3.12) manually. We might want to just generate the same code using the CPython 3.12 headers and #[cfg(Py_3_12)] only the complete generated output but I am honestly not sure whether the result would be better than this localized change. But it does commit us somewhat to maintaining this by hand from now on.

@davidhewitt
Copy link
Member

I think we're probably stuck maintaining this by hand for now; I think there's some willingness upstream to make state a private implementation detail and just use accessor functions (and we'd just offer an opaque type here), however that would take a few years to make it through.

Note that we don't have 3.12 in CI yet - #2709 and #2817

I'm ok with landing this change without CI but I'd rather we take away the CHANGELOG entry in that case, as I don't think we can claim to support any 3.12 functionality without CI.

https://peps.python.org/pep-0623/

	Following members are removed from the Unicode structures:

	    wstr
	    wstr_length
	    state.compact
	    state.ready

Note state.compact is still present as of v3.12.0a7.

state.interned has changed width from 2 to 1 bits.
@ijl
Copy link
Contributor Author

ijl commented Apr 11, 2023

Ok, I've removed the newsfragment entry.

@adamreichold adamreichold added the CI-skip-changelog Skip checking changelog entry label Apr 11, 2023
@adamreichold
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 11, 2023

Build succeeded:

@bors bors bot merged commit b4d4904 into PyO3:main Apr 11, 2023
@davidhewitt
Copy link
Member

Thanks - will ship this in 0.18.3 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-changelog Skip checking changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants