Back to home page

EIC code displayed by LXR

 
 

    


Warning, /jana2/src/python/externals/pybind11-2.10.3/docs/limitations.rst is written in an unsupported language. File is not indexed.

0001 Limitations
0002 ###########
0003 
0004 Design choices
0005 ^^^^^^^^^^^^^^
0006 
0007 pybind11 strives to be a general solution to binding generation, but it also has
0008 certain limitations:
0009 
0010 - pybind11 casts away ``const``-ness in function arguments and return values.
0011   This is in line with the Python language, which has no concept of ``const``
0012   values. This means that some additional care is needed to avoid bugs that
0013   would be caught by the type checker in a traditional C++ program.
0014 
0015 - The NumPy interface ``pybind11::array`` greatly simplifies accessing
0016   numerical data from C++ (and vice versa), but it's not a full-blown array
0017   class like ``Eigen::Array`` or ``boost.multi_array``. ``Eigen`` objects are
0018   directly supported, however, with ``pybind11/eigen.h``.
0019 
0020 Large but useful features could be implemented in pybind11 but would lead to a
0021 significant increase in complexity. Pybind11 strives to be simple and compact.
0022 Users who require large new features are encouraged to write an extension to
0023 pybind11; see `pybind11_json <https://github.com/pybind/pybind11_json>`_ for an
0024 example.
0025 
0026 
0027 Known bugs
0028 ^^^^^^^^^^
0029 
0030 These are issues that hopefully will one day be fixed, but currently are
0031 unsolved. If you know how to help with one of these issues, contributions
0032 are welcome!
0033 
0034 - Intel 20.2 is currently having an issue with the test suite.
0035   `#2573 <https://github.com/pybind/pybind11/pull/2573>`_
0036 
0037 - Debug mode Python does not support 1-5 tests in the test suite currently.
0038   `#2422 <https://github.com/pybind/pybind11/pull/2422>`_
0039 
0040 - PyPy3 7.3.1 and 7.3.2 have issues with several tests on 32-bit Windows.
0041 
0042 Known limitations
0043 ^^^^^^^^^^^^^^^^^
0044 
0045 These are issues that are probably solvable, but have not been fixed yet. A
0046 clean, well written patch would likely be accepted to solve them.
0047 
0048 - Type casters are not kept alive recursively.
0049   `#2527 <https://github.com/pybind/pybind11/issues/2527>`_
0050   One consequence is that containers of ``char *`` are currently not supported.
0051   `#2245 <https://github.com/pybind/pybind11/issues/2245>`_
0052 
0053 - The ``cpptest`` does not run on Windows with Python 3.8 or newer, due to DLL
0054   loader changes. User code that is correctly installed should not be affected.
0055   `#2560 <https://github.com/pybind/pybind11/issue/2560>`_
0056 
0057 Python 3.9.0 warning
0058 ^^^^^^^^^^^^^^^^^^^^
0059 
0060 Combining older versions of pybind11 (< 2.6.0) with Python on exactly 3.9.0
0061 will trigger undefined behavior that typically manifests as crashes during
0062 interpreter shutdown (but could also destroy your data. **You have been
0063 warned**).
0064 
0065 This issue was `fixed in Python <https://github.com/python/cpython/pull/22670>`_.
0066 As a mitigation for this bug, pybind11 2.6.0 or newer includes a workaround
0067 specifically when Python 3.9.0 is detected at runtime, leaking about 50 bytes
0068 of memory when a callback function is garbage collected.  For reference, the
0069 pybind11 test suite has about 2,000 such callbacks, but only 49 are garbage
0070 collected before the end-of-process. Wheels (even if built with Python 3.9.0)
0071 will correctly avoid the leak when run in Python 3.9.1, and this does not
0072 affect other 3.X versions.