docs: update changelog and versionadded

This commit is contained in:
Henry Schreiner 2020-08-19 14:53:59 -04:00 committed by Henry Schreiner
parent 110e6c12ce
commit a6887b604a
7 changed files with 84 additions and 9 deletions

View File

@ -60,7 +60,7 @@ system with CMake 3.14+:
python3 -m venv venv
source venv/bin/activate
pip install -r tests/requirements.txt
cmake -S . -B build -DPYTHON_EXECUTABLE=$(which python) -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON
cmake -S . -B build -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON
cmake --build build -j4
```
@ -71,9 +71,10 @@ Tips:
* You can select any name for your environment folder; if it contains "env" it
will be ignored by git.
* If you dont have CMake 3.14+, just add “cmake” to the pip install command.
* You can use `-DPYBIND11_FINDPYTHON=ON` instead of setting the
`PYTHON_EXECUTABLE` - the new search algorithm can find virtual environments,
Conda, and more.
* You can use `-DPYBIND11_FINDPYTHON=ON` to use FindPython on CMake 3.12+
* In classic mode, you may need to set `-DPYTHON_EXECUTABLE=/path/to/python`.
FindPython uses `-DPython_ROOT_DIR=/path/to` or
`-DPython_EXECUTABLE=/path/to/python`.
### Configuration options
@ -104,10 +105,12 @@ The valid options are:
* Use `cmake build -LH` to list the CMake options with help.
* Use `ccmake` if available to see a curses (terminal) gui, or `cmake-gui` for
a completely graphical interface (not present in the PyPI package).
* Use `-G` and the name of a generator to use something different, like `Ninja`
(automatic multithreading!). `cmake --help` lists the generators available.
* Open the `CMakeLists.txt` with QtCreator to generate for that IDE.
* Use `cmake --build build -j12` to build with 12 cores (for example).
* Use `-G` and the name of a generator to use something different. `cmake
--help` lists the generators available.
- On Unix, setting `CMAKE_GENERATER=Ninja` in your environment will give
you automatic mulithreading on all your CMake projects!
* Open the `CMakeLists.txt` with QtCreator to generate for that IDE.
* You can use `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to generate the `.json` file
that some tools expect.

View File

@ -149,8 +149,7 @@ memory for the C++ portion of the instance will be left uninitialized, which
will generally leave the C++ instance in an invalid state and cause undefined
behavior if the C++ instance is subsequently used.
.. versionadded:: 2.5.1
.. versionchanged:: 2.6
The default pybind11 metaclass will throw a ``TypeError`` when it detects
that ``__init__`` was not called by a derived class.
@ -597,6 +596,8 @@ For more information, see :ref:`the documentation on exceptions <unraisable_exce
pybind11 does not support C++ destructors marked ``noexcept(false)``.
.. versionadded:: 2.6
.. _implicit_conversions:
Implicit conversions
@ -1147,6 +1148,8 @@ error:
.. note:: This attribute is currently ignored on PyPy
.. versionadded:: 2.6
Custom automatic downcasters
============================

View File

@ -188,3 +188,5 @@ You can convert them to Python exceptions and then discard as unraisable.
third_party::log(e);
}
}
.. versionadded:: 2.6

View File

@ -390,6 +390,8 @@ argument annotations when registering the function:
Note that, as in Python, you cannot combine this with a ``py::args`` argument.
This feature does *not* require Python 3 to work.
.. versionadded:: 2.6
.. _nonconverting_arguments:
Non-converting arguments

View File

@ -387,6 +387,9 @@ operation on the C++ side:
py::array a = /* A NumPy array */;
py::array b = a[py::make_tuple(0, py::ellipsis(), 0)];
.. versionchanged:: 2.6
``py::ellipsis()`` is now also avaliable in Python 2.
Memory view
===========
@ -428,3 +431,6 @@ We can also use ``memoryview::from_memory`` for a simple 1D contiguous buffer:
.. note::
``memoryview::from_memory`` is not available in Python 2.
.. versionchanged:: 2.6
``memoryview::from_memory`` added.

View File

@ -11,6 +11,24 @@ v2.6.0 (IN PROGRESS)
See :ref:`upgrade-guide-2.6` for help upgrading to the new version.
* Keyword only argument supported in Python 2 or 3 with ``py::kwonly()``.
`#2100 <https://github.com/pybind/pybind11/pull/2100>`_
* Perfect forwarding support for methods.
`#2048 <https://github.com/pybind/pybind11/pull/2048>`_
* Added ``py::error_already_set::discard_as_unraisable()``.
`#2372 <https://github.com/pybind/pybind11/pull/2372>`_
* ``py::hash`` is now public.
`#2217 <https://github.com/pybind/pybind11/pull/2217>`_
* ``py::is_final()`` class modifier to block subclassing (CPython only).
`#2151 <https://github.com/pybind/pybind11/pull/2151>`_
* ``py::memoryview`` update and documentation.
`#2223 <https://github.com/pybind/pybind11/pull/2223>`_
* Minimum CMake required increased to 3.4.
`#2338 <https://github.com/pybind/pybind11/pull/2338>`_ and
`#2370 <https://github.com/pybind/pybind11/pull/2370>`_
@ -36,6 +54,39 @@ See :ref:`upgrade-guide-2.6` for help upgrading to the new version.
`#2265 <https://github.com/pybind/pybind11/pull/2265>`_ and
`#2346 <https://github.com/pybind/pybind11/pull/2346>`_
Smaller or developer focused features:
* Error now thrown when ``__init__`` is forgotten on subclasses.
`#2152 <https://github.com/pybind/pybind11/pull/2152>`_
* If ``__eq__`` defined but not ``__hash__``, ``__hash__`` is now set to
``None``.
`#2291 <https://github.com/pybind/pybind11/pull/2291>`_
* ``py::ellipsis`` now also works on Python 2
`#2360 <https://github.com/pybind/pybind11/pull/2360>`_
* Added missing signature for ``py::array``
`#2363 <https://github.com/pybind/pybind11/pull/2363>`_
* Bugfixes related to more extensive testing
`#2321 <https://github.com/pybind/pybind11/pull/2321>`_
* Pointer to ``std::tuple`` & ``std::pair`` supported in cast.
`#2334 <https://github.com/pybind/pybind11/pull/2334>`_
* Small fixes in NumPy support. ``py::array`` now uses ``py::ssize_t`` as first
argument type.
`#2293 <https://github.com/pybind/pybind11/pull/2293>`_
* PyPy fixes, including support for PyPy3 and PyPy 7.
`#2146 <https://github.com/pybind/pybind11/pull/2146>`_
* CPython 3.9 fixes.
`#2253 <https://github.com/pybind/pybind11/pull/2253>`_
* Debug Python interpreter support.
`#2025 <https://github.com/pybind/pybind11/pull/2025>`_

View File

@ -13,6 +13,14 @@ modernization and other useful information.
v2.6
====
An error is now thrown when ``__init__`` is forgotten on subclasses. This was
incorrect before, but was not checked. Add a call to ``__init__`` if it is
missing.
If ``__eq__`` defined but not ``__hash__``, ``__hash__`` is now set to
``None``, as in normal CPython. You should add ``__hash__`` if you intended the
class to be hashable, possibly using the new ``py::hash`` shortcut.
CMake support:
--------------