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
31843d45
Unverified
Commit
31843d45
authored
Jul 15, 2021
by
Henry Schreiner
Committed by
GitHub
Jul 15, 2021
Browse files
docs: reduce visibility of 3.9.0 warning (#3105)
parent
5cd37507
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
24 deletions
+11
-24
README.rst
README.rst
+1
-14
docs/limitations.rst
docs/limitations.rst
+10
-10
No files found.
README.rst
View file @
31843d45
...
...
@@ -13,19 +13,6 @@
.. start
.. warning::
Combining older versions of pybind11 (< 2.6.0) with Python 3.9.0 will
trigger undefined behavior that typically manifests as crashes during
interpreter shutdown (but could also destroy your data. **You have been
warned.**)
We recommend that you update to the latest patch release of Python (3.9.1),
which includes a `fix <https://github.com/python/cpython/pull/22670>`_
that resolves this problem. If you do use Python 3.9.0, please update to
the latest version of pybind11 (2.6.0 or newer), which includes a temporary
workaround specifically when Python 3.9.0 is detected at runtime.
**pybind11** is a lightweight header-only library that exposes C++ types
in Python and vice versa, mainly to create Python bindings of existing
...
...
@@ -110,7 +97,7 @@ goodies:
transparently applied to all entries of one or more NumPy array
arguments.
- Python
’
s slice-based access and assignment operations can be
- Python
'
s slice-based access and assignment operations can be
supported with just a few lines of code.
- Everything is contained in just a few header files; there is no need
...
...
docs/limitations.rst
View file @
31843d45
...
...
@@ -57,16 +57,16 @@ clean, well written patch would likely be accepted to solve them.
Python 3.9.0 warning
^^^^^^^^^^^^^^^^^^^^
Combining older versions of pybind11 (< 2.6.0) with Python on 3.9.0
will
trigger undefined behavior that typically manifests as crashes during
Combining older versions of pybind11 (< 2.6.0) with Python on
exactly
3.9.0
will
trigger undefined behavior that typically manifests as crashes during
interpreter shutdown (but could also destroy your data. **You have been
warned**).
This issue
h
as
been
`fixed in Python <https://github.com/python/cpython/pull/22670>`_. As a
mitigation until
3.9.
1
is
released and commonly used, pybind11 (2.6.0 or newer)
includes a t
em
p
or
ar
y w
orkaround specifically when Python 3.9.0 is detected at
runtime, leaking about 50 bytes of memory when a callback function is
garbage
collected
. For reference; the pybind11 test suite has about 2,000 such
callbacks, but only 49 are garbage collected before the end-of-process. Wheels
built with Python 3.9.0 will correctly avoid the leak when run in Python 3.9.1
.
This issue
w
as
`fixed in Python <https://github.com/python/cpython/pull/22670>`_.
As a mitigation for this bug, pybind11 2.6.0 or newer includes a workaround
specifically when Python
3.9.
0
is
detected at runtime, leaking about 50 bytes
of m
emory w
hen a callback function is garbage collected. For reference, the
pybind11 test suite has about 2,000 such callbacks, but only 49 are
garbage
collected
before the end-of-process. Wheels (even if built with Python 3.9.0)
will correctly avoid the leak when run in Python 3.9.1, and this does not
affect other 3.X versions
.
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