Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: boostorg/python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: boostorg/python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 7 commits
  • 18 files changed
  • 2 contributors

Commits on Nov 7, 2025

  1. Use strong reference APIs.

    For the free-threaded build, it is not safe use borrowed references.
    Another thread could deallocate the object and cause the reference to
    become invalid.  Replace API calls that borrow references with strong
    reference APIs.
    nascheme committed Nov 7, 2025
    Configuration menu
    Copy the full SHA
    cabb466 View commit details
    Browse the repository at this point in the history
  2. Add work-around to crash in ~object_base().

    For the free-threaded build (and possibly the debug build), it is not
    safe to call Py_DECREF() if there is no valid Python thread-state.
    nascheme committed Nov 7, 2025
    Configuration menu
    Copy the full SHA
    6f5f3b6 View commit details
    Browse the repository at this point in the history
  3. Use re-entrant mutex to protect global state.

    Add pymutex.hpp which implements a re-entrant mutex on top of Python's
    PyMutex.  Add BOOST_PYTHON_LOCK_STATE() macro that uses RAII to lock
    mutable global state as required.
    nascheme committed Nov 7, 2025
    Configuration menu
    Copy the full SHA
    cfbefe8 View commit details
    Browse the repository at this point in the history
  4. Set the Py_MOD_GIL_NOT_USED flag on modules.

    This indicates that the free-threaded build of Python can keep the
    GIL disabled when the module is loaded.  Without this module flag,
    importing the module will cause the GIL to be re-enabled.  A warning
    is emitted if this happens.
    nascheme committed Nov 7, 2025
    Configuration menu
    Copy the full SHA
    fc68878 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2025

  1. Add "nogil" option for BOOST_PYTHON_MODULE_INIT.

    Implement optional arguments for BOOST_PYTHON_MODULE_INIT and allow the
    boost::python::mod_gil_not_used() option.  This sets the
    Py_MOD_GIL_NOT_USED flag for the extension module.
    
    To define a module that supports free-threaded Python, define it
    like this:
    
        BOOST_PYTHON_MODULE(my_module, boost::python::mod_gil_not_used())
        {
            ...
        }
    nascheme authored and stefanseefeld committed Dec 2, 2025
    Configuration menu
    Copy the full SHA
    5013564 View commit details
    Browse the repository at this point in the history
  2. Update Linux CI scripts, more Python versions.

    Update scripts to use actions/setup-python to install different Python
    versions.  Add run-faber.sh and get-py-env.py scripts.  Add
    test-ubuntu-py-ver.yml CI script to test with different Python versions.
    nascheme authored and stefanseefeld committed Dec 2, 2025
    Configuration menu
    Copy the full SHA
    e89f86b View commit details
    Browse the repository at this point in the history
  3. Improve test coverage.

    stefanseefeld committed Dec 2, 2025
    Configuration menu
    Copy the full SHA
    32da86d View commit details
    Browse the repository at this point in the history
Loading