Skip to content

Commit 06eb7f8

Browse files
committed
Apply fix from pybind#1494
1 parent 5c8746f commit 06eb7f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/pybind11/detail/class.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ extern "C" inline int pybind11_clear(PyObject *self) {
441441
/// Give instances of this type a `__dict__` and opt into garbage collection.
442442
inline void enable_dynamic_attributes(PyHeapTypeObject *heap_type) {
443443
auto type = &heap_type->ht_type;
444-
#if defined(PYPY_VERSION)
444+
// https://github.com/pybind/pybind11/pull/1494
445+
#if defined(PYPY_VERSION) && (PYPY_VERSION_NUM < 0x06000000)
445446
pybind11_fail(std::string(type->tp_name) + ": dynamic attributes are "
446447
"currently not supported in "
447448
"conjunction with PyPy!");

0 commit comments

Comments
 (0)