Skip to content

Commit 43e1d0a

Browse files
Merge branch 'master' into pep695-generic-docstring
2 parents 13ceb09 + cc69a37 commit 43e1d0a

File tree

9 files changed

+45
-32
lines changed

9 files changed

+45
-32
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ repos:
2525

2626
# Clang format the codebase automatically
2727
- repo: https://github.com/pre-commit/mirrors-clang-format
28-
rev: "v20.1.5"
28+
rev: "v20.1.7"
2929
hooks:
3030
- id: clang-format
3131
types_or: [c++, c, cuda]
3232

3333
# Ruff, the Python auto-correcting linter/formatter written in Rust
3434
- repo: https://github.com/astral-sh/ruff-pre-commit
35-
rev: v0.11.12
35+
rev: v0.12.2
3636
hooks:
37-
- id: ruff
37+
- id: ruff-check
3838
args: ["--fix", "--show-fixes"]
3939
- id: ruff-format
4040

4141
# Check static types with mypy
4242
- repo: https://github.com/pre-commit/mirrors-mypy
43-
rev: "v1.16.0"
43+
rev: "v1.16.1"
4444
hooks:
4545
- id: mypy
4646
args: []
@@ -142,7 +142,7 @@ repos:
142142

143143
# Check schemas on some of our YAML files
144144
- repo: https://github.com/python-jsonschema/check-jsonschema
145-
rev: 0.33.0
145+
rev: 0.33.2
146146
hooks:
147147
- id: check-readthedocs
148148
- id: check-github-workflows

README.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
**pybind11 (v3) — Seamless interoperability between C++ and Python**
55

6-
|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |GitHub Discussions| |CI| |Build status|
6+
|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |GitHub Discussions|
7+
8+
|CI| |Build status| |SPEC 4 — Using and Creating Nightly Wheels|
79

810
|Repology| |PyPI package| |Conda-forge| |Python Versions|
911

@@ -210,3 +212,5 @@ to the terms and conditions of this license.
210212
:target: https://pypi.org/project/pybind11/
211213
.. |GitHub Discussions| image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
212214
:target: https://github.com/pybind/pybind11/discussions
215+
.. |SPEC 4 — Using and Creating Nightly Wheels| image:: https://img.shields.io/badge/SPEC-4-green?labelColor=%23004811&color=%235CA038
216+
:target: https://scientific-python.org/specs/spec-0004/

docs/changelog.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ versioning](http://semver.org) policy.
1212
Changes will be added here periodically from the "Suggested changelog
1313
entry" block in pull request descriptions.
1414

15-
## 3.0.0 (RC 3) (June 4, 2025)
16-
17-
Since this is a large release, we are providing a release candidate to give
18-
projects time to test! We also now provide
19-
[SPEC 4](https://scientific-python.org/specs/spec-0004/) nightly wheels. We
20-
are hoping to split up `std.h`; that work is approved to be added during the
21-
RC phase if it's ready in time. We expect the RC phase to last around a week.
15+
## Version 3.0.0 (July 10, 2025)
2216

2317
Pybind11 3.0 includes an ABI bump, the first required bump in many years
2418
on Unix (Windows has had required bumps more often). This release contains
@@ -129,8 +123,10 @@ New Features:
129123

130124
- `pybind11/conduit/pybind11_platform_abi_id.h` was factored out, to
131125
maximize reusability of `PYBIND11_PLATFORM_ABI_ID` (for other
132-
Python/C++ binding systems).
133-
[#5375](https://github.com/pybind/pybind11/pull/5375)
126+
Python/C++ binding systems). Separately, a note was added to explain
127+
that the conduit feature only covers from-Python-to-C++ conversions.
128+
[#5375](https://github.com/pybind/pybind11/pull/5375) \|
129+
[#5740](https://github.com/pybind/pybind11/pull/5740)
134130

135131
- Added support for finding pybind11 using pkgconf distributed on pypi.
136132
[#5552](https://github.com/pybind/pybind11/pull/5552)

docs/release.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use
5050
- Add a release branch if this is a new MINOR version, or update the existing
5151
release branch if it is a patch version
5252

53-
- New branch: ``git checkout -b vX.Y``, ``git push -u origin vX.Y``
53+
- NOTE: This documentation assumes your ``upstream`` is ``https://github.com/pybind/pybind11.git``
54+
55+
- New branch: ``git checkout -b vX.Y``, ``git push -u upstream vX.Y``
5456

5557
- Update branch: ``git checkout vX.Y``, ``git merge <release branch>``, ``git push``
5658

@@ -63,7 +65,7 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use
6365

6466
- Last-minute consistency check: same as tag?
6567

66-
- ``git push --tags``
68+
- Push the new tag: ``git push upstream vX.Y.Z``
6769

6870
- Update stable
6971

include/pybind11/detail/common.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
/* -- start version constants -- */
2020
#define PYBIND11_VERSION_MAJOR 3
2121
#define PYBIND11_VERSION_MINOR 0
22-
#define PYBIND11_VERSION_MICRO 0
22+
#define PYBIND11_VERSION_MICRO 1
2323
// ALPHA = 0xA, BETA = 0xB, GAMMA = 0xC (release candidate), FINAL = 0xF (stable release)
2424
// - The release level is set to "alpha" for development versions.
2525
// Use 0xA0 (LEVEL=0xA, SERIAL=0) for development versions.
2626
// - For stable releases, set the serial to 0.
27-
#define PYBIND11_VERSION_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA
28-
#define PYBIND11_VERSION_RELEASE_SERIAL 4
27+
#define PYBIND11_VERSION_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
28+
#define PYBIND11_VERSION_RELEASE_SERIAL 0
2929
// String version of (micro, release level, release serial), e.g.: 0a0, 0b1, 0rc1, 0
30-
#define PYBIND11_VERSION_PATCH 0rc4
30+
#define PYBIND11_VERSION_PATCH 1a0
3131
/* -- end version constants -- */
3232

3333
#if !defined(Py_PACK_FULL_VERSION)

pyproject.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,6 @@ messages_control.disable = [
143143
"consider-using-f-string", # triggers in _version.py incorrectly
144144
]
145145

146-
[tool.ruff]
147-
src = ["src"]
148-
149146
[tool.ruff.lint]
150147
extend-select = [
151148
"B", # flake8-bugbear
@@ -166,17 +163,21 @@ extend-select = [
166163
"YTT", # flake8-2020
167164
]
168165
ignore = [
169-
"PLR", # Design related pylint
170-
"PT011", # Too broad with raises in pytest
171-
"SIM118", # iter(x) is not always the same as iter(x.keys())
166+
"PLR", # Design related pylint
167+
"PT011", # Too broad with raises in pytest
168+
"SIM118", # iter(x) is not always the same as iter(x.keys())
169+
"PLC0415", # We import in functions for various reasons
172170
]
173-
unfixable = ["T20"]
174171
isort.known-first-party = ["env", "pybind11_cross_module_tests", "pybind11_tests"]
175172
isort.required-imports = ["from __future__ import annotations"]
176173

177174

178175
[tool.ruff.lint.per-file-ignores]
179-
"tests/**" = ["EM", "N", "E721"]
176+
"tests/**" = [
177+
"EM",
178+
"N",
179+
"E721",
180+
]
180181
"tests/test_call_policies.py" = ["PLC1901"]
181182

182183
[tool.repo-review]

tests/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ def __init__(self, string):
7777
def __str__(self):
7878
return self.string
7979

80+
__hash__ = None
81+
8082
def __eq__(self, other):
8183
# Ignore constructor/destructor output which is prefixed with "###"
8284
a = [
@@ -94,6 +96,8 @@ def __eq__(self, other):
9496
class Unordered(Output):
9597
"""Custom comparison for output without strict line ordering"""
9698

99+
__hash__ = None
100+
97101
def __eq__(self, other):
98102
a = _split_and_sort(self.string)
99103
b = _split_and_sort(other)
@@ -116,6 +120,8 @@ def __enter__(self):
116120
def __exit__(self, *args):
117121
self.out, self.err = self.capfd.readouterr()
118122

123+
__hash__ = None
124+
119125
def __eq__(self, other):
120126
a = Output(self.out)
121127
b = other
@@ -155,6 +161,8 @@ def __call__(self, thing):
155161
self.string = self.sanitizer(thing)
156162
return self
157163

164+
__hash__ = None
165+
158166
def __eq__(self, other):
159167
a = self.string
160168
b = _strip_and_dedent(other)

tests/test_class_sh_basic.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ def test_cannot_disown_use_count_ne_1(pass_f, rtrn_f):
135135
assert str(exc_info.value) == ("Cannot disown use_count != 1 (load_as_unique_ptr).")
136136

137137

138-
def test_unique_ptr_roundtrip(num_round_trips=1000):
138+
def test_unique_ptr_roundtrip():
139139
# Multiple roundtrips to stress-test instance registration/deregistration.
140+
num_round_trips = 1000
140141
recycled = m.atyp("passenger")
141142
for _ in range(num_round_trips):
142143
id_orig = id(recycled)
@@ -164,8 +165,9 @@ def test_rtrn_unique_ptr_cref():
164165
assert obj0 is obj1
165166

166167

167-
def test_unique_ptr_cref_roundtrip(num_round_trips=1000):
168+
def test_unique_ptr_cref_roundtrip():
168169
# Multiple roundtrips to stress-test implementation.
170+
num_round_trips = 1000
169171
orig = m.atyp("passenger")
170172
mtxt_orig = m.get_mtxt(orig)
171173
recycled = orig

tests/test_warnings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
def test_warning_simple(
2020
expected_category, expected_message, expected_value, module_function
2121
):
22-
with pytest.warns(Warning) as excinfo:
22+
with pytest.warns(Warning, match="This is") as excinfo:
2323
value = module_function()
2424

2525
assert issubclass(excinfo[0].category, expected_category)

0 commit comments

Comments
 (0)