Skip to content

Commit 22bf704

Browse files
committed
Merge branch 'master' into smart_holder
2 parents 5d949b7 + a80b223 commit 22bf704

File tree

5 files changed

+62
-14
lines changed

5 files changed

+62
-14
lines changed

docs/changelog.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,49 @@ Starting with version 1.8.0, pybind11 releases use a `semantic versioning
1010
IN DEVELOPMENT
1111
--------------
1212

13+
v2.8.1 (Oct 27, 2021)
14+
---------------------
15+
16+
Changes and additions:
17+
1318
* The simple namespace creation shortcut added in 2.8.0 was deprecated due to
1419
usage of CPython internal API, and will be removed soon. Use
1520
``py::module_::import("types").attr("SimpleNamespace")``.
1621
`#3374 <https://github.com/pybinyyd/pybind11/pull/3374>`_
1722

23+
* Add C++ Exception type to throw and catch ``AttributeError``. Useful for
24+
defining custom ``__setattr__`` and ``__getattr__`` methods.
25+
`#3387 <https://github.com/pybind/pybind11/pull/3387>`_
26+
27+
Fixes:
28+
29+
* Fixed the potential for dangling references when using properties with
30+
``std::optional`` types.
31+
`#3376 <https://github.com/pybind/pybind11/pull/3376>`_
32+
33+
* Modernize usage of ``PyCodeObject`` on Python 3.9+ (moving toward support for
34+
Python 3.11a1)
35+
`#3368 <https://github.com/pybind/pybind11/pull/3368>`_
36+
37+
* A long-standing bug in ``eigen.h`` was fixed (originally PR #3343). The bug
38+
was unmasked by newly added ``static_assert``'s in the Eigen 3.4.0 release.
39+
`#3352 <https://github.com/pybind/pybind11/pull/3352>`_
40+
41+
* Support multiple raw inclusion of CMake helper files (Conan.io does this for
42+
multi-config generators).
43+
`#3420 <https://github.com/pybind/pybind11/pull/3420>`_
44+
45+
* Fix harmless warning on upcoming CMake 3.22.
46+
`#3368 <https://github.com/pybind/pybind11/pull/3368>`_
47+
48+
* Fix 2.8.0 regression with MSVC 2017 + C++17 mode + Python 3.
49+
`#3407 <https://github.com/pybind/pybind11/pull/3407>`_
50+
51+
* Fix 2.8.0 regression that caused undefined behavior (typically
52+
segfaults) in ``make_key_iterator``/``make_value_iterator`` if dereferencing
53+
the iterator returned a temporary value instead of a reference.
54+
`#3348 <https://github.com/pybind/pybind11/pull/3348>`_
55+
1856

1957
v2.8.0 (Oct 4, 2021)
2058
--------------------

docs/release.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To release a new version of pybind11:
2727
``include/pybind11/detail/common.h``. PATCH should be a simple integer.
2828
- Update the version HEX just below, as well.
2929
- Update ``pybind11/_version.py`` (match above)
30-
- Run ``nox -s tests_packaging``` to ensure this was done correctly.
30+
- Run ``nox -s tests_packaging`` to ensure this was done correctly.
3131
- Ensure that all the information in ``setup.cfg`` is up-to-date, like
3232
supported Python versions.
3333
- Add release date in ``docs/changelog.rst``.
@@ -50,13 +50,15 @@ To release a new version of pybind11:
5050
- Make a GitHub release (this shows up in the UI, sends new release
5151
notifications to users watching releases, and also uploads PyPI packages).
5252
(Note: if you do not use an existing tag, this creates a new lightweight tag
53-
for you, so you could skip the above step).
54-
- GUI method: click "Create a new release" on the far right, fill in the tag
55-
name (if you didn't tag above, it will be made here), fill in a release
56-
name like "Version X.Y.Z", and optionally copy-and-paste the changelog into
57-
the description (processed as markdown by Pandoc). Check "pre-release" if
58-
this is a beta/RC. You can get partway there with
59-
``cat docs/changelog.rst | pandoc -f rst -t gfm``.
53+
for you, so you could skip the above step.)
54+
55+
- GUI method: Under `releases <https://github.com/pybind/pybind11/releases>`_
56+
click "Draft a new release" on the far right, fill in the tag name
57+
(if you didn't tag above, it will be made here), fill in a release name
58+
like "Version X.Y.Z", and copy-and-paste the markdown-formatted (!) changelog
59+
into the description (usually ``cat docs/changelog.rst | pandoc -f rst -t gfm``).
60+
Check "pre-release" if this is a beta/RC.
61+
6062
- CLI method: with ``gh`` installed, run ``gh release create vX.Y.Z -t "Version X.Y.Z"``
6163
If this is a pre-release, add ``-p``.
6264

@@ -65,15 +67,15 @@ To release a new version of pybind11:
6567
- Update version macros in ``include/pybind11/detail/common.h`` (set PATCH to
6668
``0.dev1`` and increment MINOR).
6769
- Update ``_version.py`` to match
68-
- Run ``nox -s tests_packaging``` to ensure this was done correctly.
70+
- Run ``nox -s tests_packaging`` to ensure this was done correctly.
6971
- Add a spot for in-development updates in ``docs/changelog.rst``.
7072
- ``git add``, ``git commit``, ``git push``
7173

7274
If a version branch is updated, remember to set PATCH to ``1.dev1``.
7375

7476
If you'd like to bump homebrew, run:
7577

76-
.. code-block::
78+
.. code-block:: console
7779
7880
brew bump-formula-pr --url https://github.com/pybind/pybind11/archive/vX.Y.Z.tar.gz
7981

tools/pybind11Common.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Adds the following functions::
2020
#]======================================================]
2121

2222
# CMake 3.10 has an include_guard command, but we can't use that yet
23+
# include_guard(global) (pre-CMake 3.10)
2324
if(TARGET pybind11::lto)
2425
return()
2526
endif()

tools/pybind11NewTools.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# All rights reserved. Use of this source code is governed by a
66
# BSD-style license that can be found in the LICENSE file.
77

8+
if(CMAKE_VERSION VERSION_LESS 3.12)
9+
message(FATAL_ERROR "You cannot use the new FindPython module with CMake < 3.12")
10+
endif()
11+
12+
include_guard(GLOBAL)
13+
814
get_property(
915
is_config
1016
TARGET pybind11::headers
@@ -16,10 +22,6 @@ else()
1622
set(_pybind11_quiet "")
1723
endif()
1824

19-
if(CMAKE_VERSION VERSION_LESS 3.12)
20-
message(FATAL_ERROR "You cannot use the new FindPython module with CMake < 3.12")
21-
endif()
22-
2325
if(NOT Python_FOUND
2426
AND NOT Python3_FOUND
2527
AND NOT Python2_FOUND)

tools/pybind11Tools.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
# All rights reserved. Use of this source code is governed by a
66
# BSD-style license that can be found in the LICENSE file.
77

8+
# include_guard(global) (pre-CMake 3.10)
9+
if(TARGET pybind11::python_headers)
10+
return()
11+
endif()
12+
813
# Built-in in CMake 3.5+
914
include(CMakeParseArguments)
1015

0 commit comments

Comments
 (0)