Skip to content

Remove workaround code in gil_scoped_acquire that is not needed since #1211 - #2683

Merged
henryiii merged 1 commit into
pybind:masterfrom
albanD:fix_debug_gil_acquire
Nov 23, 2020
Merged

Remove workaround code in gil_scoped_acquire that is not needed since #1211#2683
henryiii merged 1 commit into
pybind:masterfrom
albanD:fix_debug_gil_acquire

Conversation

@albanD

@albanDalbanD commented Nov 20, 2020

Copy link
Copy Markdown
Contributor

Description

Remove code that is not needed since #1211 that causes CPython 3.9 debug build to fail with #2681

I tested this with the following python debug builds:

Let me know if you want me to do other tests.

Suggested changelog entry:

Not sure if this should be added or not. Let me know if it needs updating.

Fix py::gil_scoped_acquire assert with CPython 3.9 debug build

@YannickJadoulYannickJadoul left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let me know if you want me to do other tests.

Is it easy for you to quickly test out 2.7? It's not the main focus, but we still support it officially.

Suggested changelog entry:

Not sure if this should be added or not. Let me know if it needs updating.

Not sure either, but I guess it can't hurt? It's not 3.9-specific, though, or is it?
And maybe issue should be more specific and say "assert"?

@albanD

Copy link
Copy Markdown
ContributorAuthor

It's not 3.9-specific, though, or is it?

From the test I did, this issue does not happen on 3.6 and 3.8. So I guess it is only for 3.9.

Is it easy for you to quickly test out 2.7?

It takes a bit longer because old cpython debug build make your rebuild every single package you need from source.
But tested with latest 2.7 tag on cpython. No crash before or after this change.

@YannickJadoul

Copy link
Copy Markdown
Collaborator

From the test I did, this issue does not happen on 3.6 and 3.8. So I guess it is only for 3.9.

It takes a bit longer because old cpython debug build make your rebuild every single package you need from source.
But tested with latest 2.7 tag on cpython. No crash before or after this change.

OK, AFAIC, this is more than good enough, then :-) Let's build towards the future of Python; not the past. And maybe we can add some debug Python builds in CI.

@YannickJadoulYannickJadoul added this to the v2.6.2 milestone Nov 20, 2020

@henryiiihenryiii left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We really should add some debug tests to the CI, but that shouldn't hold up this PR. LGTM!

@henryiii
henryiii merged commit 087b07c into pybind:masterNov 23, 2020
@github-actionsgithub-actionsBot added the needs changelog Possibly needs a changelog entry label Nov 23, 2020
@henryiiihenryiii removed the needs changelog Possibly needs a changelog entry label Dec 22, 2020
@rwgkrwgk mentioned this pull request Feb 10, 2023
Sign up for freeto 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.

3 participants

@albanD@YannickJadoul@henryiii