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

[smart_holder] git merge master #5436

Merged
merged 5 commits into from
Nov 7, 2024
Merged

Commits on Nov 6, 2024

  1. chore(deps): update pre-commit hooks (pybind#5432)

    * chore(deps): update pre-commit hooks
    
    updates:
    - [github.com/pre-commit/mirrors-clang-format: v18.1.8 → v19.1.3](pre-commit/mirrors-clang-format@v18.1.8...v19.1.3)
    - [github.com/astral-sh/ruff-pre-commit: v0.6.3 → v0.7.2](astral-sh/ruff-pre-commit@v0.6.3...v0.7.2)
    - [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.13.0](pre-commit/mirrors-mypy@v1.11.2...v1.13.0)
    - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0)
    - [github.com/adamchainz/blacken-docs: 1.18.0 → 1.19.1](adamchainz/blacken-docs@1.18.0...1.19.1)
    - [github.com/mgedmin/check-manifest: 0.49 → 0.50](mgedmin/check-manifest@0.49...0.50)
    - [github.com/PyCQA/pylint: v3.2.7 → v3.3.1](pylint-dev/pylint@v3.2.7...v3.3.1)
    - [github.com/python-jsonschema/check-jsonschema: 0.29.2 → 0.29.4](python-jsonschema/check-jsonschema@0.29.2...0.29.4)
    
    * style: pre-commit fixes
    
    ---------
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    pre-commit-ci[bot] authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    5c07fee View commit details
    Browse the repository at this point in the history
  2. Fix incorrect link syntax in upgrade guide (pybind#5434)

    Looks like some markdown spilled into our restructured text
    tjstum authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    f46f5be View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2024

  1. Fixed data race in all_type_info in free-threading mode (pybind#5419)

    * Fix data race all_type_info_populate in free-threading mode
    Description:
    - fixed data race all_type_info_populate in free-threading mode
    - added test
    
    For example, we have 2 threads entering `all_type_info`.
    Both enter `all_type_info_get_cache`` function and
    there is a first one which inserts a tuple (type, empty_vector) to the map
    and second is waiting. Inserting thread gets the (iter_to_key, True) and non-inserting thread
    after waiting gets (iter_to_key, False).
    Inserting thread than will add a weakref and will then call into `all_type_info_populate`.
    However, non-inserting thread is not entering `if (ins.second) {` clause and
    returns `ins.first->second;`` which is just empty_vector.
    Finally, non-inserting thread is failing the check in `allocate_layout`:
    ```c++
    if (n_types == 0) {
        pybind11_fail(
            "instance allocation failed: new instance has no pybind11-registered base types");
    }
    ```
    
    * style: pre-commit fixes
    
    * Addressed PR comments
    
    ---------
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    vfdev-5 and pre-commit-ci[bot] authored Nov 7, 2024
    Configuration menu
    Copy the full SHA
    ce2f005 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dca5623 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    85209ea View commit details
    Browse the repository at this point in the history