Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
a6887b60
Commit
a6887b60
authored
Aug 19, 2020
by
Henry Schreiner
Committed by
Henry Schreiner
Aug 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: update changelog and versionadded
parent
110e6c12
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
84 additions
and
9 deletions
+84
-9
CONTRIBUTING.md
+10
-7
docs/advanced/classes.rst
+5
-2
docs/advanced/exceptions.rst
+2
-0
docs/advanced/functions.rst
+2
-0
docs/advanced/pycpp/numpy.rst
+6
-0
docs/changelog.rst
+51
-0
docs/upgrade.rst
+8
-0
No files found.
CONTRIBUTING.md
View file @
a6887b60
...
...
@@ -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
-D
PYTHON_EXECUTABLE
=
$(
which python
)
-D
DOWNLOAD_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 don’t 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.
...
...
docs/advanced/classes.rst
View file @
a6887b60
...
...
@@ -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
============================
...
...
docs/advanced/exceptions.rst
View file @
a6887b60
...
...
@@ -188,3 +188,5 @@ You can convert them to Python exceptions and then discard as unraisable.
third_party::log(e);
}
}
.. versionadded:: 2.6
docs/advanced/functions.rst
View file @
a6887b60
...
...
@@ -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
...
...
docs/advanced/pycpp/numpy.rst
View file @
a6887b60
...
...
@@ -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.
docs/changelog.rst
View file @
a6887b60
...
...
@@ -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>`_
...
...
docs/upgrade.rst
View file @
a6887b60
...
...
@@ -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:
--------------
...
...
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