Skip to content

Commit 945be5b

Browse files
committed
Merge branch 'master' into sh_merge_master
2 parents 114c0f2 + cf7d2e6 commit 945be5b

File tree

6 files changed

+54
-13
lines changed

6 files changed

+54
-13
lines changed

.github/workflows/pip.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ jobs:
9999
- uses: actions/download-artifact@v3
100100

101101
- name: Publish standard package
102-
uses: pypa/gh-action-pypi-publish@v1.6.4
102+
uses: pypa/gh-action-pypi-publish@v1.8.1
103103
with:
104104
password: ${{ secrets.pypi_password }}
105-
packages_dir: standard/
105+
packages-dir: standard/
106106

107107
- name: Publish global package
108-
uses: pypa/gh-action-pypi-publish@v1.6.4
108+
uses: pypa/gh-action-pypi-publish@v1.8.1
109109
with:
110110
password: ${{ secrets.pypi_password_global }}
111-
packages_dir: global/
111+
packages-dir: global/

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ repos:
7070

7171
# Ruff, the Python auto-correcting linter written in Rust
7272
- repo: https://github.com/charliermarsh/ruff-pre-commit
73-
rev: v0.0.251
73+
rev: v0.0.254
7474
hooks:
7575
- id: ruff
7676
args: ["--fix", "--show-fixes"]
@@ -85,7 +85,7 @@ repos:
8585

8686
# PyLint has native support - not always usable, but works for us
8787
- repo: https://github.com/PyCQA/pylint
88-
rev: "v2.16.1"
88+
rev: "v2.16.4"
8989
hooks:
9090
- id: pylint
9191
files: ^pybind11
@@ -101,7 +101,7 @@ repos:
101101

102102
# Check static types with mypy
103103
- repo: https://github.com/pre-commit/mirrors-mypy
104-
rev: "v0.991"
104+
rev: "v1.0.1"
105105
hooks:
106106
- id: mypy
107107
args: []

docs/changelog.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,47 @@ Changes:
2121
``dec_ref()`` are now enabled by default again.
2222
`#4246 <https://github.com/pybind/pybind11/pull/4246>`_
2323

24+
* ``py::initialize_interpreter()`` using ``PyConfig_InitPythonConfig()``
25+
instead of ``PyConfig_InitIsolatedConfig()``, to obtain complete
26+
``sys.path``.
27+
`#4473 <https://github.com/pybind/pybind11/pull/4473>`_
28+
29+
* Cast errors now always include Python type information, even if
30+
``PYBIND11_DETAILED_ERROR_MESSAGES`` is not defined. This increases binary
31+
sizes slightly (~1.5%) but the error messages are much more informative.
32+
`#4463 <https://github.com/pybind/pybind11/pull/4463>`_
33+
34+
2435
Build system improvements:
2536

2637
* Update clang-tidy to 15 in CI.
2738
`#4387 <https://github.com/pybind/pybind11/pull/4387>`_
2839

40+
* Moved the linting framework over to Ruff.
41+
`#4483 <https://github.com/pybind/pybind11/pull/4483>`_
42+
43+
Version 2.10.4 (Mar 16, 2023)
44+
----------------------------
45+
46+
Changes:
47+
48+
* ``python3 -m pybind11`` gained a ``--version`` option (prints the version and
49+
exits).
50+
`#4526 <https://github.com/pybind/pybind11/pull/4526>`_
51+
52+
Bug Fixes:
53+
54+
* Fix a warning when pydebug is enabled on Python 3.11.
55+
`#4461 <https://github.com/pybind/pybind11/pull/4461>`_
56+
57+
* Ensure ``gil_scoped_release`` RAII is non-copyable.
58+
`#4490 <https://github.com/pybind/pybind11/pull/4490>`_
59+
60+
* Ensure the tests dir does not show up with new versions of setuptools.
61+
`#4510 <https://github.com/pybind/pybind11/pull/4510>`_
62+
63+
* Better stacklevel for a warning in setuptools helpers.
64+
`#4516 <https://github.com/pybind/pybind11/pull/4516>`_
2965

3066
Version 2.10.3 (Jan 3, 2023)
3167
----------------------------

pybind11/__main__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import sys
55
import sysconfig
66

7+
from ._version import __version__
78
from .commands import get_cmake_dir, get_include, get_pkgconfig_dir
89

910

@@ -25,6 +26,12 @@ def print_includes() -> None:
2526

2627
def main() -> None:
2728
parser = argparse.ArgumentParser()
29+
parser.add_argument(
30+
"--version",
31+
action="version",
32+
version=__version__,
33+
help="Print the version and exit.",
34+
)
2835
parser.add_argument(
2936
"--includes",
3037
action="store_true",

tests/conftest.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import difflib
99
import gc
1010
import multiprocessing
11-
import os
1211
import re
12+
import sys
1313
import textwrap
1414
import traceback
1515

@@ -25,17 +25,16 @@
2525

2626

2727
@pytest.fixture(scope="session", autouse=True)
28-
def always_forkserver_on_unix():
29-
if os.name == "nt":
28+
def use_multiprocessing_forkserver_on_linux():
29+
if sys.platform != "linux":
30+
# The default on Windows and macOS is "spawn": If it's not broken, don't fix it.
3031
return
3132

3233
# Full background: https://github.com/pybind/pybind11/issues/4105#issuecomment-1301004592
3334
# In a nutshell: fork() after starting threads == flakiness in the form of deadlocks.
3435
# It is actually a well-known pitfall, unfortunately without guard rails.
3536
# "forkserver" is more performant than "spawn" (~9s vs ~13s for tests/test_gil_scoped.py,
3637
# visit the issuecomment link above for details).
37-
# Windows does not have fork() and the associated pitfall, therefore it is best left
38-
# running with defaults.
3938
multiprocessing.set_start_method("forkserver")
4039

4140

tests/test_modules.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def test_importing():
6363
from pybind11_tests.modules import OD
6464

6565
assert OD is OrderedDict
66-
assert str(OD([(1, "a"), (2, "b")])) == "OrderedDict([(1, 'a'), (2, 'b')])"
6766

6867

6968
def test_pydoc():

0 commit comments

Comments
 (0)