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

Adapt to changed function name in Python 3.13 #4902

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Conversation

ellert
Copy link
Contributor

@ellert ellert commented Oct 24, 2023

Description

According to https://docs.python.org/3.13/whatsnew/3.13.html:

Add PyThreadState_GetUnchecked() function: similar to PyThreadState_Get(), but don't kill the process with a fatal error if it is NULL. The caller is responsible to check if the result is NULL. Previously, the function was private and known as _PyThreadState_UncheckedGet().

As part of preparing for updating Python to version to 3.13 in Fedora 41 (scheduled for October 2024) rebuilds of existing Python packages are attempted against the current Python 3.13 version in a separate development repository. Currently this is Python 3.13.0a1.

F41 Change Proposal: Python 3.13 (System-Wide)

As a maintainer of packages in Fedora, I got two bugs filed against packages I maintain that failed to build in this rebuiild due to the issue this PR proposes to address:

With the proposed change these packages can be built with the Python 3.13.0a1 from the special development repo.

According to https://docs.python.org/3.13/whatsnew/3.13.html:

Add PyThreadState_GetUnchecked() function: similar to
PyThreadState_Get(), but don't kill the process with a fatal error if
it is NULL. The caller is responsible to check if the result is
NULL. Previously, the function was private and known as
_PyThreadState_UncheckedGet().
@rwgk
Copy link
Collaborator

rwgk commented Oct 24, 2023

Thanks! Could you please add a sentence or two to the PR description: How did you test this (platform(s), CPython git hash)? Maybe if interesting: why/context? — This is mainly so others can gauge: might it work for me, too?

Similarly, do you think we could test here (pybind11 CI) already, too? Or is it still too early? (I'd want to be around the center of the earlier-adopter - to - late adopter bell curve.)

@rwgk
Copy link
Collaborator

rwgk commented Oct 24, 2023

Forgot to add: Please tag me here after updating the PR description, to be sure I don't miss it.

@ellert
Copy link
Contributor Author

ellert commented Oct 24, 2023

Forgot to add: Please tag me here after updating the PR description, to be sure I don't miss it.

@rwgk : I have uodated the description as requested.

@rwgk
Copy link
Collaborator

rwgk commented Oct 24, 2023

Awesome, thanks!

@rwgk rwgk merged commit fa27d2f into pybind:master Oct 24, 2023
81 checks passed
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Oct 24, 2023
@rwgk rwgk removed the needs changelog Possibly needs a changelog entry label Oct 24, 2023
@ellert ellert deleted the python-3.13 branch October 24, 2023 17:02
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