- Apr 10, 2021
-
-
Ralf W. Grosse-Kunstleve authored
* Using new smart_holder::reclaim_disowned in smart_holder_type_caster for unique_ptr. * Systematically renaming was_disowned to is_disowned (because disowning is now reversible: reclaim_disowned). * Systematically renaming virtual_overrider_self_life_support to trampoline_self_life_support (to reuse existing terminology instead of introducing new one). * Systematically renaming test_class_sh_with_alias to test_class_sh_trampoline_basic. * Adding a Trampolines and std::unique_ptr section to README_smart_holder.rst. * MSVC compatibility.
-
- Apr 09, 2021
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
* Porting subset of absltest code from reproducer provided by @elkhrt. Baseline for debugging ASAN heap-use-after-free. * Moving Py_DECREF to resolve ASAN heap-use-after-free failure. * Fixing trivial formatting issue. * Workaround for clang 3.6 and 3.7.
-
- Apr 06, 2021
-
-
Weiming Zhao authored
-
dependabot[bot] authored
-
Ralf W. Grosse-Kunstleve authored
It was only useful for easily harvest this from the GitHub Actions CI results, mostly out of curiosity: 52 C++ function argument 1 is evaluated first. 90 C++ function argument 2 is evaluated first. These results came for the final CI run for PR #2936; that PR has nothing else to do with the results. Pushing directly. This tiny change is not worth a PR. [skip actions]
-
Ralf W. Grosse-Kunstleve authored
Fixing very minor oversights discovered while proof-reading the initial version for the first time on GitHub. Pushing directly. Not worth a PR.
-
Ralf W. Grosse-Kunstleve authored
* Adding initial README_smart_holder.rst. * Adding README_smart_holder.rst to MANIFEST.in and test_files.py.
-
- Apr 03, 2021
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
* Adding PyGILState_Check() in object_api<>::operator(). * Enabling PyGILState_Check() for Python >= 3.6 only. Possibly, this explains why PyGILState_Check() cannot safely be used with Python 3.4 and 3.5: https://github.com/python/cpython/pull/10267#issuecomment-434881587 * Adding simple micro benchmark. * Reducing test time to minimum (purely for coverage, not for accurate results). * Fixing silly oversight. * Minor code organization improvement in test. * Adding example runtimes. * Removing capsys (just run with `-k test_callback_num_times -s` and using `.format()`.
-
Ralf W. Grosse-Kunstleve authored
-
Eric Cousineau authored
env: Add surrogate for pytest.deprecated_call for ptyest<3.9
-
Jerome Robert authored
* Pybind11Extension add the "/EHsc /bigobj /std:c++14" flags on Windows. This is good for Visual C++ but not for Mingw. * According https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-python2/0410-MINGW-build-extensions-with-GCC.patch sysconfig.get_platform() is the way to check for a Mingw64
-
Robert Haschke authored
-
- Apr 02, 2021
-
-
JYX authored
-
- Mar 26, 2021
-
-
Ralf W. Grosse-Kunstleve authored
* Adding tests to test_class_sh_disowning_mi for expanded coverage. * Setting @pytest.mark.xfail strict=False (some tests pass with PyPy, some don't).
-
- Mar 24, 2021
-
-
Ralf W. Grosse-Kunstleve authored
-
- Mar 23, 2021
-
-
Ralf W. Grosse-Kunstleve authored
* Adding test_class_sh_disowning. * Fixing minor namespace naming inconsistency between test_class_sh_*.cpp files. * Replacing py::overload_cast with plain cast for C++11 compatibility. * Accommodate that the C++ order of evaluation of function arguments is unspecified.
-
- Mar 20, 2021
-
-
Ralf W. Grosse-Kunstleve authored
* Adaption of PyCLIF virtual_py_cpp_mix test. * Removing ValueError: Ownership of instance with virtual overrides in Python cannot be transferred to C++. TODO: static_assert alias class needs to inherit from virtual_overrider_self_life_support. * Bringing back ValueError: "... instance cannot safely be transferred to C++.", but based on dynamic_cast<AliasType>. * Fixing oversight: adding test_class_sh_virtual_py_cpp_mix.cpp to cmake file. * clang <= 3.6 compatibility. * Fixing oversight: dynamic_raw_ptr_cast_if_possible needs special handling for To = void. Adding corresponding missing test in test_class_sh_virtual_py_cpp_mix. Moving dynamic_raw_ptr_cast_if_possible to separate header. * Changing py::detail::virtual_overrider_self_life_support to py::virtual_overrider_self_life_support.
-
- Mar 19, 2021
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
- Mar 17, 2021
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Robert Haschke authored
* Add roundtrip tests for unique_ptr * Implementation for casting from const std::unique_ptr& ... forwarding to smart_holder_type_caster<T>::cast(T*)
-
- Mar 16, 2021
-
-
Ralf W. Grosse-Kunstleve authored
* Initial version of virtual_overrider_self_life_support (enables safely passing unique_ptr to C++). * Clang 3.6, 3.7 compatibility. * Adding missing default constructor. * Restoring test for exception for the case that virtual_overrider_self_life_support is not used. * Fixing oversight: Adding missing holder().ensure_was_not_disowned(). * Adding unit tests for new `struct smart_holder` member functions. * Moving virtual_overrider_self_life_support to separate include file, with iwyu cleanup.
-
- Mar 10, 2021
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
* Adding suppression for pypocketfft. * Generalize existing pypocketfft Valgrind suppression Co-authored-by:Yannick Jadoul <yannick.jadoul@belgacom.net>
-
- Mar 08, 2021
-
-
Boris Staletic authored
Use correct duration representation when casting from datetime.timdelta to std::chrono::duration (#2870) * Use correct duration representation when casting from datetime.timdelta to std::chrono::duration * When asserting datetime/timedelta/date/time we can equality-compare whole objects
-
- Mar 07, 2021
-
-
Ralf W. Grosse-Kunstleve authored
-
- Mar 06, 2021
-
-
Ralf W. Grosse-Kunstleve authored
Shuffling code in test_multiple_inheritance.cpp to separate struct/class definitions from bindings code. (#2890)
-
Ralf W. Grosse-Kunstleve authored
-
- Mar 04, 2021
-
-
Ralf W. Grosse-Kunstleve authored
* WIP: test setup complete, AddInCppUniquePtr failing (reproduces PyCLIF smart_ptrs_test failure). * Fully tested locally. * Adding new tests to cmake file.
-
- Mar 03, 2021
-
-
Ralf W. Grosse-Kunstleve authored
Changing all but one std::runtime_error to std::invalid_argument, which appears as ValueError in the Python interpreter. Adding `test_cannot_disown_use_count_ne_1`. (#2883)
-
Ralf W. Grosse-Kunstleve authored
* shared_ptr<bool> vptr_deleter_armed_flag_ptr (instead of unique_ptr), to fix heap-use-after-free bug. * Fixing generated by some compilers in the pybind11 CI suite.
-
- Feb 28, 2021
-
-
Ralf W. Grosse-Kunstleve authored
Revert "WIP: test setup complete, AddInCppUniquePtr failing (reproduces PyCLIF smart_ptrs_test failure)." This reverts commit 20107030.
-
Ralf W. Grosse-Kunstleve authored
-
- Feb 27, 2021
-
-
Ralf W. Grosse-Kunstleve authored
Changing cast_error("... Python instance was disowned.") to value_error (which changes RuntimeError to ValueError). (#2880) -
Ralf W. Grosse-Kunstleve authored
* Enabling use of smart_holder for types with non-public destructors. * Resolving clang-tidy error (GitHub CI).
-
- Feb 25, 2021
-
-
Ralf W. Grosse-Kunstleve authored
-
Tom de Geus authored
-