Skip to content

Conversation

@henryiii
Copy link
Collaborator

@henryiii henryiii commented Jul 27, 2025

Now that free-threading is no longer experimental, I think we should either always show it, or switch the default to on with a way to opt-out instead. Always showing it doesn't require a bump, so maybe we do that for now?


Created using mini-swe-agent and the propmt:

I'd like to find usages of PYBIND11_MODULE in the docs folder and add py::mod_gil_not_used() as a third argument if there ar
e only two arguments. These are examples, and it's really a good idea to always include that now.

I removed a few of the changes.

Signed-off-by: Henry Schreiner [email protected]

Description

Suggested changelog entry:

  • Show nogil in most examples.

📚 Documentation preview 📚: https://pybind11--5770.org.readthedocs.build/

Created using [mini-swe-agent](https://mini-swe-agent.com) and the propmt:

I'd like to find usages of PYBIND11_MODULE in the docs folder and add py::mod_gil_not_used() as a third argument if there ar
e only two arguments. These are examples, and it's really a good idea to always include that now.

I removed a few of the changes.

Signed-off-by: Henry Schreiner <[email protected]>
@rwgk
Copy link
Collaborator

rwgk commented Jul 27, 2025

@b-pass Here is another Python 3.12 tlock.locked() flake:

https://github.com/pybind/pybind11/actions/runs/16547614513/job/46797808085?pr=5770

cd /home/runner/work/pybind11/pybind11/build/tests/test_embed && /home/runner/work/pybind11/pybind11/build/tests/test_embed/test_embed
Exception ignored in: <module 'threading' from '/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/threading.py'>
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/threading.py", line 1602, in _shutdown
    assert tlock.locked()
           ^^^^^^^^^^^^^^
AssertionError: 
munmap_chunk(): invalid pointer

@henryiii henryiii merged commit 6972597 into pybind:master Jul 28, 2025
145 of 146 checks passed
@henryiii henryiii deleted the henryiii/docs/nogilexamples branch July 28, 2025 05:08
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Jul 28, 2025
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Aug 22, 2025
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