-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: a long-standing bug in the handling of Python multiple inheritance #4762
Commits on Jul 25, 2023
-
Equivalent of google/clif@5718e4d
Ralf W. Grosse-Kunstleve committedJul 25, 2023 Configuration menu - View commit details
-
Copy full SHA for c9a56ac - Browse repository at this point
Copy the full SHA c9a56acView commit details
Commits on Jul 26, 2023
-
Ralf W. Grosse-Kunstleve committed
Jul 26, 2023 Configuration menu - View commit details
-
Copy full SHA for bdd938a - Browse repository at this point
Copy the full SHA bdd938aView commit details -
Moving test_PPCCInit() first changes the behavior!
Ralf W. Grosse-Kunstleve committedJul 26, 2023 Configuration menu - View commit details
-
Copy full SHA for 61f7529 - Browse repository at this point
Copy the full SHA 61f7529View commit details -
Resolve new Clang dev C++11 errors:
``` The CXX compiler identification is Clang 17.0.0 ``` ``` pytypes.h:1615:23: error: identifier '_s' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] ``` ``` cast.h:1380:26: error: identifier '_a' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] ```
Ralf W. Grosse-Kunstleve committedJul 26, 2023 Configuration menu - View commit details
-
Copy full SHA for 1fb7dc3 - Browse repository at this point
Copy the full SHA 1fb7dc3View commit details -
``` pytypes.h:1615:12: error: missing space between '""' and suffix identifier ```
Ralf W. Grosse-Kunstleve committedJul 26, 2023 Configuration menu - View commit details
-
Copy full SHA for b9f3380 - Browse repository at this point
Copy the full SHA b9f3380View commit details -
Specifically exclude
__clang__
Ralf W. Grosse-Kunstleve committedJul 26, 2023 Configuration menu - View commit details
-
Copy full SHA for 8ea1b8c - Browse repository at this point
Copy the full SHA 8ea1b8cView commit details
Commits on Jul 27, 2023
-
Snapshot of debugging code (does NOT pass pre-commit checks).
Ralf W. Grosse-Kunstleve committedJul 27, 2023 Configuration menu - View commit details
-
Copy full SHA for 1d4f9ff - Browse repository at this point
Copy the full SHA 1d4f9ffView commit details -
Revert "Snapshot of debugging code (does NOT pass pre-commit checks)."
This reverts commit 1d4f9ff.
Ralf W. Grosse-Kunstleve committedJul 27, 2023 Configuration menu - View commit details
-
Copy full SHA for 775aab5 - Browse repository at this point
Copy the full SHA 775aab5View commit details -
[ci skip] Order Dependence Demo
Ralf W. Grosse-Kunstleve committedJul 27, 2023 Configuration menu - View commit details
-
Copy full SHA for d37b540 - Browse repository at this point
Copy the full SHA d37b540View commit details -
Revert "[ci skip] Order Dependence Demo"
This reverts commit d37b540.
Ralf W. Grosse-Kunstleve committedJul 27, 2023 Configuration menu - View commit details
-
Copy full SHA for 7f8b208 - Browse repository at this point
Copy the full SHA 7f8b208View commit details
Commits on Jul 28, 2023
-
One way to deal with the order dependency issue. This is not the best…
… way, more like a proof of concept.
Ralf W. Grosse-Kunstleve committedJul 28, 2023 Configuration menu - View commit details
-
Copy full SHA for eb09c6c - Browse repository at this point
Copy the full SHA eb09c6cView commit details -
Ralf W. Grosse-Kunstleve committed
Jul 28, 2023 Configuration menu - View commit details
-
Copy full SHA for a77c1c6 - Browse repository at this point
Copy the full SHA a77c1c6View commit details -
Add
all_type_info_add_base_most_derived_first()
, use in `all_type_i……nfo_populate()`
Ralf W. Grosse-Kunstleve committedJul 28, 2023 Configuration menu - View commit details
-
Copy full SHA for eec2d81 - Browse repository at this point
Copy the full SHA eec2d81View commit details -
Revert "One way to deal with the order dependency issue. This is not …
…the best way, more like a proof of concept." This reverts commit eb09c6c.
Ralf W. Grosse-Kunstleve committedJul 28, 2023 Configuration menu - View commit details
-
Copy full SHA for 9c7d267 - Browse repository at this point
Copy the full SHA 9c7d267View commit details -
Ralf W. Grosse-Kunstleve committed
Jul 28, 2023 Configuration menu - View commit details
-
Copy full SHA for 7c7d78d - Browse repository at this point
Copy the full SHA 7c7d78dView commit details -
Add
is_redundant_value_and_holder()
and use to avoid forcing `__ini……t__` overrides when they are not needed.
Ralf W. Grosse-Kunstleve committedJul 28, 2023 Configuration menu - View commit details
-
Copy full SHA for d708836 - Browse repository at this point
Copy the full SHA d708836View commit details
Commits on Jul 31, 2023
-
Streamline implementation and avoid unsafe `reinterpret_cast<instance…
… *>()` introduced with PR pybind#2152 The `reinterpret_cast<instance *>(self)` is unsafe if `__new__` is mocked, which was actually found in the wild: the mock returned `None` for `self`. This was inconsequential because `inst` is currently cast straight back to `PyObject *` to compute `all_type_info()`, which is empty if `self` is not a pybind11 `instance`, and then `inst` is never dereferenced. However, the unsafe detour through `instance *` is easily avoided and the updated implementation is less prone to accidents while debugging or refactoring.
Ralf W. Grosse-Kunstleve committedJul 31, 2023 Configuration menu - View commit details
-
Copy full SHA for cf5958d - Browse repository at this point
Copy the full SHA cf5958dView commit details -
Fix actual undefined behavior exposed by previous changes.
It turns out the previous commit message is incorrect, the `inst` pointer is actually dereferenced, in the `value_and_holder` ctor here: https://github.com/pybind/pybind11/blob/f3e0602802c7840992c97f4960515777cad6a5c7/include/pybind11/detail/type_caster_base.h#L262-L263 ``` 259 // Main constructor for a found value/holder: 260 value_and_holder(instance *i, const detail::type_info *type, size_t vpos, size_t index) 261 : inst{i}, index{index}, type{type}, 262 vh{inst->simple_layout ? inst->simple_value_holder 263 : &inst->nonsimple.values_and_holders[vpos]} {} ```
Ralf W. Grosse-Kunstleve committedJul 31, 2023 Configuration menu - View commit details
-
Copy full SHA for c89561f - Browse repository at this point
Copy the full SHA c89561fView commit details -
Ralf W. Grosse-Kunstleve committed
Jul 31, 2023 Configuration menu - View commit details
-
Copy full SHA for a2f95e1 - Browse repository at this point
Copy the full SHA a2f95e1View commit details -
Experiment: specify indirect bases
Ralf W. Grosse-Kunstleve committedJul 31, 2023 Configuration menu - View commit details
-
Copy full SHA for 4f90d85 - Browse repository at this point
Copy the full SHA 4f90d85View commit details
Commits on Aug 4, 2023
-
Merge branch 'master' into python_multiple_inheritance_test
Ralf W. Grosse-Kunstleve committedAug 4, 2023 Configuration menu - View commit details
-
Copy full SHA for 0a0debd - Browse repository at this point
Copy the full SHA 0a0debdView commit details -
Revert "Experiment: specify indirect bases"
This reverts commit 4f90d85.
Ralf W. Grosse-Kunstleve committedAug 4, 2023 Configuration menu - View commit details
-
Copy full SHA for 52b7993 - Browse repository at this point
Copy the full SHA 52b7993View commit details
Commits on Aug 15, 2023
-
Merge branch 'master' into python_multiple_inheritance_test
Ralf W. Grosse-Kunstleve committedAug 15, 2023 Configuration menu - View commit details
-
Copy full SHA for 33805e2 - Browse repository at this point
Copy the full SHA 33805e2View commit details
Commits on Sep 12, 2023
-
Merge branch 'master' into python_multiple_inheritance_test
Ralf W. Grosse-Kunstleve committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for adb5bad - Browse repository at this point
Copy the full SHA adb5badView commit details
Commits on Oct 30, 2023
-
Merge branch 'master' into python_multiple_inheritance_test
Ralf W. Grosse-Kunstleve committedOct 30, 2023 Configuration menu - View commit details
-
Copy full SHA for c516151 - Browse repository at this point
Copy the full SHA c516151View commit details
Commits on Nov 2, 2023
-
Merge branch 'master' into python_multiple_inheritance_test
Ralf W. Grosse-Kunstleve committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for f3bb31e - Browse repository at this point
Copy the full SHA f3bb31eView commit details
Commits on Nov 5, 2023
-
Add
all_type_info_check_for_divergence()
and some tests.Ralf W. Grosse-Kunstleve committedNov 5, 2023 Configuration menu - View commit details
-
Copy full SHA for 0a9599f - Browse repository at this point
Copy the full SHA 0a9599fView commit details -
Merge branch 'master' into python_multiple_inheritance_test
Ralf W. Grosse-Kunstleve committedNov 5, 2023 Configuration menu - View commit details
-
Copy full SHA for 86ca4e1 - Browse repository at this point
Copy the full SHA 86ca4e1View commit details
Commits on Nov 7, 2023
-
Merge branch 'master' into python_multiple_inheritance_test
Ralf W. Grosse-Kunstleve committedNov 7, 2023 Configuration menu - View commit details
-
Copy full SHA for 9ae6cba - Browse repository at this point
Copy the full SHA 9ae6cbaView commit details -
Call
all_type_info_check_for_divergence()
also from `type_caster_ge……neric::load_impl<>`
Ralf W. Grosse-Kunstleve committedNov 7, 2023 Configuration menu - View commit details
-
Copy full SHA for 5f5fd6a - Browse repository at this point
Copy the full SHA 5f5fd6aView commit details -
``` include/pybind11/detail/type_caster_base.h:795:21: error: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty,-warnings-as-errors] if (matching_bases.size() != 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ !matching_bases.empty() ```
Ralf W. Grosse-Kunstleve committedNov 7, 2023 Configuration menu - View commit details
-
Copy full SHA for df27188 - Browse repository at this point
Copy the full SHA df27188View commit details
Commits on Nov 8, 2023
-
Merge branch 'master' into python_multiple_inheritance_test
Ralf W. Grosse-Kunstleve committedNov 8, 2023 Configuration menu - View commit details
-
Copy full SHA for 52de174 - Browse repository at this point
Copy the full SHA 52de174View commit details -
Revert "Resolve clang-tidy error:"
This reverts commit df27188.
Ralf W. Grosse-Kunstleve committedNov 8, 2023 Configuration menu - View commit details
-
Copy full SHA for 1b157fc - Browse repository at this point
Copy the full SHA 1b157fcView commit details -
Revert "Call
all_type_info_check_for_divergence()
also from `type_c……aster_generic::load_impl<>`" This reverts commit 5f5fd6a.
Ralf W. Grosse-Kunstleve committedNov 8, 2023 Configuration menu - View commit details
-
Copy full SHA for 7a6c436 - Browse repository at this point
Copy the full SHA 7a6c436View commit details -
Revert "Add
all_type_info_check_for_divergence()
and some tests."This reverts commit 0a9599f.
Ralf W. Grosse-Kunstleve committedNov 8, 2023 Configuration menu - View commit details
-
Copy full SHA for 6ab605b - Browse repository at this point
Copy the full SHA 6ab605bView commit details