- 09 Feb, 2021 31 commits
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
classh.h: renaming of class_ to classh + namespace; forking test_classh_wip from test_type_caster_bare_interface_demo.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
minor test_private_first_base.cpp simplification (after discovering that this can be wrapped with Boost.Python, using boost::noncopyable)
-
Ralf W. Grosse-Kunstleve authored
(This demo does NOT involve smart pointers at all, unlike the otherwise similar test_smart_ptr_private_first_base.)
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Based on https://godbolt.org/z/4fdjaW by jorgbrown@ (thanks Jorg!).
-
Ralf W. Grosse-Kunstleve authored
https://github.com/rwgk/pybind11/tree/xxx_value_ptr_xxx_holder Systematically exercising casting between shared_ptr<base>, shared_ptr<derived>.
-
Ralf W. Grosse-Kunstleve authored
https://github.com/rwgk/pybind11/tree/xxx_value_ptr_xxx_holder Systematically exercising returning and passing unique_ptr<T>, shared_ptr<T> with unique_ptr, shared_ptr holder. Observations: test_holder_unique_ptr: make_unique_pointee OK pass_unique_pointee BUILD_FAIL (as documented) make_shared_pointee Abort free(): double free detected pass_shared_pointee RuntimeError: Unable to load a custom holder type from a default-holder instance test_holder_shared_ptr: make_unique_pointee Segmentation fault (#1138) pass_unique_pointee BUILD_FAIL (as documented) make_shared_pointee OK pass_shared_pointee OK
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
moving prototype code to pybind11/vptr_holder.h, adding type_caster specialization to make the bindings involving unique_ptr passing compile, but load and cast implementations are missing
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
See also: https://github.com/pybind/pybind11/issues/2583 Does not build with upstream master or https://github.com/pybind/pybind11/pull/2047, but builds with https://github.com/RobotLocomotion/pybind11 and almost runs: ``` Running tests in directory "/usr/local/google/home/rwgk/forked/EricCousineau-TRI/pybind11/tests": ================================================================================= test session starts ================================================================================= platform linux -- Python 3.8.5, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 rootdir: /usr/local/google/home/rwgk/forked/EricCousineau-TRI/pybind11/tests, inifile: pytest.ini collected 2 items test_unique_ptr_member.py .F [100%] ====================================================================================== FAILURES ======================================================================================= _____________________________________________________________________________ test_pointee_and_ptr_owner ______________________________________________________________________________ def test_pointee_and_ptr_owner(): obj = m.pointee() assert obj.get_int() == 213 m.ptr_owner(obj) with pytest.raises(ValueError) as exc_info: > obj.get_int() E Failed: DID NOT RAISE <class 'ValueError'> test_unique_ptr_member.py:17: Failed ============================================================================= 1 failed, 1 passed in 0.06s ============================================================================= ```
-
- 01 Feb, 2021 1 commit
-
-
Yannick Jadoul authored
* Make sure all warnings in pytest get turned into errors * Suppress DeprecationWarnings in test_int_convert and test_numpy_int_convert * PyLong_AsLong only shouts "Deprecated!" on Python>=3.8 * Fix remaining warnings on PyPy and CPython 3.10-dev
-
- 31 Jan, 2021 2 commits
-
-
Henry Schreiner authored
* chore: get PyPy 3.7 wheels using NumPy 1.20 * Add Valgrind suppressions after NumPy update Co-authored-by:Yannick Jadoul <yannick.jadoul@belgacom.net>
-
Yannick Jadoul authored
* Demonstrate issue with weakref constructor overloads * Fix weakref constructor to convert on being passed a non-weakref object * Improve on nonlocal-scoped variable in test_weakref * Keep backwards-compatibility by introducing PYBIND11_OBJECT_CVT_DEFAULT macro * Simplify test_weakref
-
- 29 Jan, 2021 1 commit
-
-
Ralf W. Grosse-Kunstleve authored
* Changing pybind11::str to exclusively hold PyUnicodeObject
-
- 27 Jan, 2021 1 commit
-
-
Henry Fredrick Schreiner authored
-
- 25 Jan, 2021 1 commit
-
-
Yannick Jadoul authored
* Always call PyNumber_Index when casting from Python to a C++ integral type, also pre-3.8 * Fixed on PyPy * Simplify use of PyNumber_Index, following @rwgk's idea, and ignore warnings in >=3.8 * Reproduce mismatch between pre-3.8 and post-3.8 behavior on __index__ throwing TypeError * Fix tests on 3.6 <= Python < 3.8 * No, I don't have an uninitialized variable * Fix use of __index__ on Python 2 * Make types in test_int_convert more ~boring~ descriptive
-
- 24 Jan, 2021 1 commit
-
-
crimsoncor authored
* Force the builtin module key to be the correct type. Previously it was always going to be a std::string which converted into unicode. Python 2 appears to want module keys to be normal str types, so this was breaking code that expected plain string types in the builtins.keys() data structure * Add a simple unit test to ensure all built-in keys are str * Update the unit test so it will also run on pypy * Run pre-commit. Co-authored-by:Jesse Clemens <jesse.clemens@sony.com>
-
- 19 Jan, 2021 2 commits
-
-
Henry Schreiner authored
-
Henry Schreiner authored
* style: avoid using unintialized variables Tested with cmake --warn-unintialized -S . -B build * refactor: use function for possibly uninit vars
-