Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
a6887b60
"example/example-numpy-vectorize.py" did not exist on "1dc960c37f7d8c46016700992bf279592adbe6c8"
Commit
a6887b60
authored
Aug 19, 2020
by
Henry Schreiner
Committed by
Henry Schreiner
Aug 20, 2020
Browse files
docs: update changelog and versionadded
parent
110e6c12
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
84 additions
and
9 deletions
+84
-9
CONTRIBUTING.md
CONTRIBUTING.md
+10
-7
docs/advanced/classes.rst
docs/advanced/classes.rst
+5
-2
docs/advanced/exceptions.rst
docs/advanced/exceptions.rst
+2
-0
docs/advanced/functions.rst
docs/advanced/functions.rst
+2
-0
docs/advanced/pycpp/numpy.rst
docs/advanced/pycpp/numpy.rst
+6
-0
docs/changelog.rst
docs/changelog.rst
+51
-0
docs/upgrade.rst
docs/upgrade.rst
+8
-0
No files found.
CONTRIBUTING.md
View file @
a6887b60
...
@@ -60,7 +60,7 @@ system with CMake 3.14+:
...
@@ -60,7 +60,7 @@ system with CMake 3.14+:
python3
-m
venv venv
python3
-m
venv venv
source
venv/bin/activate
source
venv/bin/activate
pip
install
-r
tests/requirements.txt
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
cmake
--build
build
-j4
```
```
...
@@ -71,9 +71,10 @@ Tips:
...
@@ -71,9 +71,10 @@ Tips:
*
You can select any name for your environment folder; if it contains "env" it
*
You can select any name for your environment folder; if it contains "env" it
will be ignored by git.
will be ignored by git.
*
If you don’t have CMake 3.14+, just add “cmake” to the pip install command.
*
If you don’t have CMake 3.14+, just add “cmake” to the pip install command.
*
You can use
`-DPYBIND11_FINDPYTHON=ON`
instead of setting the
*
You can use
`-DPYBIND11_FINDPYTHON=ON`
to use FindPython on CMake 3.12+
`PYTHON_EXECUTABLE`
- the new search algorithm can find virtual environments,
*
In classic mode, you may need to set
`-DPYTHON_EXECUTABLE=/path/to/python`
.
Conda, and more.
FindPython uses
`-DPython_ROOT_DIR=/path/to`
or
`-DPython_EXECUTABLE=/path/to/python`
.
### Configuration options
### Configuration options
...
@@ -104,10 +105,12 @@ The valid options are:
...
@@ -104,10 +105,12 @@ The valid options are:
*
Use
`cmake build -LH`
to list the CMake options with help.
*
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
*
Use
`ccmake`
if available to see a curses (terminal) gui, or
`cmake-gui`
for
a completely graphical interface (not present in the PyPI package).
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
`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
*
You can use
`-DCMAKE_EXPORT_COMPILE_COMMANDS=ON`
to generate the
`.json`
file
that some tools expect.
that some tools expect.
...
...
docs/advanced/classes.rst
View file @
a6887b60
...
@@ -149,8 +149,7 @@ memory for the C++ portion of the instance will be left uninitialized, which
...
@@ -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
will generally leave the C++ instance in an invalid state and cause undefined
behavior if the C++ instance is subsequently used.
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
The default pybind11 metaclass will throw a ``TypeError`` when it detects
that ``__init__`` was not called by a derived class.
that ``__init__`` was not called by a derived class.
...
@@ -597,6 +596,8 @@ For more information, see :ref:`the documentation on exceptions <unraisable_exce
...
@@ -597,6 +596,8 @@ For more information, see :ref:`the documentation on exceptions <unraisable_exce
pybind11 does not support C++ destructors marked ``noexcept(false)``.
pybind11 does not support C++ destructors marked ``noexcept(false)``.
.. versionadded:: 2.6
.. _implicit_conversions:
.. _implicit_conversions:
Implicit conversions
Implicit conversions
...
@@ -1147,6 +1148,8 @@ error:
...
@@ -1147,6 +1148,8 @@ error:
.. note:: This attribute is currently ignored on PyPy
.. note:: This attribute is currently ignored on PyPy
.. versionadded:: 2.6
Custom automatic downcasters
Custom automatic downcasters
============================
============================
...
...
docs/advanced/exceptions.rst
View file @
a6887b60
...
@@ -188,3 +188,5 @@ You can convert them to Python exceptions and then discard as unraisable.
...
@@ -188,3 +188,5 @@ You can convert them to Python exceptions and then discard as unraisable.
third_party::log(e);
third_party::log(e);
}
}
}
}
.. versionadded:: 2.6
docs/advanced/functions.rst
View file @
a6887b60
...
@@ -390,6 +390,8 @@ argument annotations when registering the function:
...
@@ -390,6 +390,8 @@ argument annotations when registering the function:
Note that, as in Python, you cannot combine this with a ``py::args`` argument.
Note that, as in Python, you cannot combine this with a ``py::args`` argument.
This feature does *not* require Python 3 to work.
This feature does *not* require Python 3 to work.
.. versionadded:: 2.6
.. _nonconverting_arguments:
.. _nonconverting_arguments:
Non-converting arguments
Non-converting arguments
...
...
docs/advanced/pycpp/numpy.rst
View file @
a6887b60
...
@@ -387,6 +387,9 @@ operation on the C++ side:
...
@@ -387,6 +387,9 @@ operation on the C++ side:
py::array a = /* A NumPy array */;
py::array a = /* A NumPy array */;
py::array b = a[py::make_tuple(0, py::ellipsis(), 0)];
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
Memory view
===========
===========
...
@@ -428,3 +431,6 @@ We can also use ``memoryview::from_memory`` for a simple 1D contiguous buffer:
...
@@ -428,3 +431,6 @@ We can also use ``memoryview::from_memory`` for a simple 1D contiguous buffer:
.. note::
.. note::
``memoryview::from_memory`` is not available in Python 2.
``memoryview::from_memory`` is not available in Python 2.
.. versionchanged:: 2.6
``memoryview::from_memory`` added.
docs/changelog.rst
View file @
a6887b60
...
@@ -11,6 +11,24 @@ v2.6.0 (IN PROGRESS)
...
@@ -11,6 +11,24 @@ v2.6.0 (IN PROGRESS)
See :ref:`upgrade-guide-2.6` for help upgrading to the new version.
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.
* Minimum CMake required increased to 3.4.
`#2338 <https://github.com/pybind/pybind11/pull/2338>`_ and
`#2338 <https://github.com/pybind/pybind11/pull/2338>`_ and
`#2370 <https://github.com/pybind/pybind11/pull/2370>`_
`#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.
...
@@ -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
`#2265 <https://github.com/pybind/pybind11/pull/2265>`_ and
`#2346 <https://github.com/pybind/pybind11/pull/2346>`_
`#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>`_
...
...
docs/upgrade.rst
View file @
a6887b60
...
@@ -13,6 +13,14 @@ modernization and other useful information.
...
@@ -13,6 +13,14 @@ modernization and other useful information.
v2.6
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:
CMake support:
--------------
--------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment