Skip to content

Commit 679978f

Browse files
committed
chore: add more to deprecation page
[skip ci] Signed-off-by: Henry Schreiner <[email protected]>
1 parent 67fa89c commit 679978f

File tree

3 files changed

+65
-4
lines changed

3 files changed

+65
-4
lines changed

docs/advanced/deprecated.rst

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,63 @@
1+
.. _deprecated:
2+
13
Deprecated
24
##########
35

6+
The following features were deprecated before pybind11 3.0, and may be removed
7+
in minor releases of pybind11 3.x.
8+
9+
.. list-table:: Deprecated Features
10+
:header-rows: 1
11+
:widths: 30 15 10
12+
13+
* - Feature
14+
- Deprecated Version
15+
- Year
16+
* - ``py::metaclass()``
17+
- 2.1
18+
- 2017
19+
* - ``PYBIND11_PLUGIN``
20+
- 2.2
21+
- 2017
22+
* - ``py::set_error()`` replacing ``operator()``
23+
- 2.12
24+
- 2024
25+
* - ``get_type_overload``
26+
- 2.6
27+
- 2020
28+
* - ``call()``
29+
- 2.0
30+
- 2016
31+
* - ``.str()``
32+
- ?
33+
-
34+
* - ``.get_type()``
35+
- 2.6
36+
-
37+
* - ``==`` and ``!=``
38+
- 2.2
39+
- 2017
40+
* - ``.check()``
41+
- ?
42+
-
43+
* - ``object(handle, bool)``
44+
- ?
45+
-
46+
* - ``error_already_set.clear()``
47+
- 2.2
48+
- 2017
49+
* - ``obj.attr(…)`` as ``bool``
50+
- ?
51+
-
52+
* - ``.contains``
53+
- ? (maybe 2.4)
54+
-
55+
* - ``py::capsule`` two-argument with destructor
56+
- ?
57+
-
58+
59+
60+
461
.. _deprecated_enum:
562

663
``py::enum_``

docs/upgrade.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ long-standing obstacle when using pybind11-bound functions with Python features
5454
that rely on pickling, such as multiprocessing and caching tools.
5555
See #5580 <https://github.com/pybind/pybind11/pull/5580>_ for details.
5656

57+
Anything producing a deprecation warning in the 2.x series may be removed in a
58+
future minor release of 3.x. Most of these are still present in 3.0 in order to ease
59+
transition. The new :doc:`deprecated` page details deprecations.
60+
5761
Migration Recommendations
5862
-------------------------
5963

tools/pybind11Config.cmake.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ maximum version of CMake to 3.27+, then FindPython is the default (since
6868
FindPythonInterp/FindPythonLibs has been removed via policy `CMP0148`).
6969
7070
Starting in pybind11 3.0, the new mode is the default, but we provide backward
71-
compatible names (`PYTHON_*` vs. the new `Python_* names). Set the mode
71+
compatible names (``PYTHON_*`` vs. the new ``Python_*`` names). Set the mode
7272
explicitly to avoid the compatibility defines. You can specify this mode
73-
explicitly by setting `PYBIND11_FINDPYTHON` to `COMPAT`, but if you are changing
74-
your CMakeLists anyway, please just use the `ON` mode. A future release may
75-
default to `ON`.
73+
explicitly by setting ``PYBIND11_FINDPYTHON`` to ``COMPAT``, but if you are changing
74+
your CMakeLists anyway, please just use the ``ON`` mode. A future release may
75+
default to ``ON``.
7676
7777
New FindPython mode
7878
^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)