mirror of https://github.com/pybind/pybind11
Browse Source
* fix: set __file__ on submodules
The docs state ['The caller is responsible for setting a `__file__` attribute'](https://docs.python.org/3/c-api/module.html), but we
were not doing that, which interferes with pickling objects in submodules using cloudpickle. Users previously had to set the `__file__` attributes manually,
such as in 1fbbe1632e/src/boost_histogram/histogram.py (L83-L90)
.
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: support GraalPy
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: workaround only for GraalPython
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Add GRAALPY_VERSION_NUM to GraalPy workaround
* Fix "GRAALPY_VERSION_NUM not defined" issue
```
/Users/runner/work/pybind11/pybind11/include/pybind11/pybind11.h:1340:32: error: 'GRAALPY_VERSION_NUM' is not defined, evaluates to 0 [-Werror,-Wundef]
^
```
Related ChatGPT conversation: https://chatgpt.com/share/67e6cb99-84b0-8008-99d6-aadc70242cf3
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
pull/5587/head
2 changed files with 14 additions and 0 deletions
Loading…
Reference in new issue