Skip to content
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

testing smart_holder as default #2872

Closed
wants to merge 207 commits into from
Closed

Commits on Feb 23, 2021

  1. Adding test_unique_ptr_member (for desired PyCLIF behavior).

    See also: pybind#2583
    
    Does not build with upstream master or
    pybind#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 =============================================================================
    ```
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    dcc440b View commit details
    Browse the repository at this point in the history
  2. unique_ptr or shared_ptr return

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    e96a186 View commit details
    Browse the repository at this point in the history
  3. new test_variant_unique_shared with vptr_holder prototype

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    cd1f610 View commit details
    Browse the repository at this point in the history
  4. moving prototype code to pybind11/vptr_holder.h, adding type_caster s…

    …pecialization to make the bindings involving unique_ptr passing compile, but load and cast implementations are missing
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    9447b50 View commit details
    Browse the repository at this point in the history
  5. disabling GitHub Actions on pull_request (for this PR)

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c518aac View commit details
    Browse the repository at this point in the history
  6. disabling AppVeyor (for this PR)

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    0f78357 View commit details
    Browse the repository at this point in the history
  7. TRIGGER_SEGSEV macro, annotations for GET_STACK (vptr::get), GET_INT_…

    …STACK (pointee)
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b0806e7 View commit details
    Browse the repository at this point in the history
  8. adding test_promotion_of_disowned_to_shared

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    e82720e View commit details
    Browse the repository at this point in the history
  9. Copying tests as-is from xxx_value_ptr_xxx_holder branch.

    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 (pybind#1138)
      pass_unique_pointee  BUILD_FAIL (as documented)
      make_shared_pointee  OK
      pass_shared_pointee  OK
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    e839ffb View commit details
    Browse the repository at this point in the history
  10. Copying tests as-is from xxx_value_ptr_xxx_holder branch.

    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 committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    971d611 View commit details
    Browse the repository at this point in the history
  11. Demonstration of Undefined Behavior in handling of shared_ptr holder.

    Based on https://godbolt.org/z/4fdjaW by jorgbrown@ (thanks Jorg!).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    46a15af View commit details
    Browse the repository at this point in the history
  12. Additional demonstration of Undefined Behavior in handling of shared_…

    …ptr holder.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    204e713 View commit details
    Browse the repository at this point in the history
  13. fixing up-down mixup in comment

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    47e46c4 View commit details
    Browse the repository at this point in the history
  14. Demonstration of Undefined Behavior in handling of polymorphic pointers.

    (This demo does NOT involve smart pointers at all, unlike the otherwise similar test_smart_ptr_private_first_base.)
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    aa98993 View commit details
    Browse the repository at this point in the history
  15. minor test_private_first_base.cpp simplification (after discovering t…

    …hat this can be wrapped with Boost.Python, using boost::noncopyable)
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    cd645e4 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d4a9613 View commit details
    Browse the repository at this point in the history
  17. Snapshot of WIP, TODO: shared_ptr deleter with on/off switch

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    0ef2c55 View commit details
    Browse the repository at this point in the history
  18. Adding vptr_deleter.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c5e112c View commit details
    Browse the repository at this point in the history
  19. Adding from/as unique_ptr<T> and unique_ptr<T, D>.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    3c0c2e9 View commit details
    Browse the repository at this point in the history
  20. Adding from_shared_ptr. Some polishing.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    06151c7 View commit details
    Browse the repository at this point in the history
  21. New tests/core/smart_holder_poc_test.cpp, using Catch2.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6830a31 View commit details
    Browse the repository at this point in the history
  22. Adding in vptr_deleter_guard_flag.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    e20abab View commit details
    Browse the repository at this point in the history
  23. Improved labeling of TEST_CASEs.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    fea0ebf View commit details
    Browse the repository at this point in the history
  24. Shuffling existing TEST_CASEs into systematic matrix.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b9428a8 View commit details
    Browse the repository at this point in the history
  25. Implementing all [S]uccess tests.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    a4e0351 View commit details
    Browse the repository at this point in the history
  26. Implementing all [E]xception tests.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    673ef13 View commit details
    Browse the repository at this point in the history
  27. Testing of exceptions not covered by the from-as matrix.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    149738a View commit details
    Browse the repository at this point in the history
  28. Adding top-level comment.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    d5bb169 View commit details
    Browse the repository at this point in the history
  29. Converting from methods to factory functions (no functional change).

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b667d32 View commit details
    Browse the repository at this point in the history
  30. Removing obsolete and very incomplete test (replaced by Catch2-based …

    …test).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    739aead View commit details
    Browse the repository at this point in the history
  31. Removing stray file.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    a76d5eb View commit details
    Browse the repository at this point in the history
  32. Adding type_caster_bare_interface_demo.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    179466e View commit details
    Browse the repository at this point in the history
  33. Adding shared_ptr<mpty>, shared_ptr<mpty const> casters.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    1c9b8eb View commit details
    Browse the repository at this point in the history
  34. Adding unique_ptr<mpty>, unique_ptr<mpty const> casters.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c599d3c View commit details
    Browse the repository at this point in the history
  35. Pure copy of class class_ implementation in pybind11.h (master commit

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c225f40 View commit details
    Browse the repository at this point in the history
  36. classh.h: renaming of class_ to classh + namespace; forking test_clas…

    …sh_wip from test_type_caster_bare_interface_demo.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    1bedec6 View commit details
    Browse the repository at this point in the history
  37. Hard-coding smart_holder into classh.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    1c5c52f View commit details
    Browse the repository at this point in the history
  38. Adding mpty::mtxt string member.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    83ef538 View commit details
    Browse the repository at this point in the history
  39. Adding isinstance<mpty> in type_caster::load functions.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6cb94e4 View commit details
    Browse the repository at this point in the history
  40. Adding rvalue_ref, renaming const_value_ref to lvalue_ref & removing …

    …const.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    8ed0206 View commit details
    Browse the repository at this point in the history
  41. Retrieving smart_holder pointer in type_caster<mpty>::load, and using…

    … it cast_op operators.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    e90f6b0 View commit details
    Browse the repository at this point in the history
  42. Factoring out smart_holder_type_caster_load.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    f98322c View commit details
    Browse the repository at this point in the history
  43. Retrieving smart_holder pointer in type_caster<std::shared_ptr<mpty[ …

    …const]>>::load, and using it cast_op operators.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    f91e754 View commit details
    Browse the repository at this point in the history
  44. Improved error messaging: Cannot disown nullptr (as_unique_ptr).

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    efb5cf2 View commit details
    Browse the repository at this point in the history
  45. Retrieving smart_holder pointer in type_caster<std::unique_ptr<mpty[ …

    …const]>>::load, and using it cast_op operators.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    4ba4faa View commit details
    Browse the repository at this point in the history
  46. Pure clang-format --style=file -i change.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    4aedb51 View commit details
    Browse the repository at this point in the history
  47. Pure clang-format --style=file -i change, with two `clang-format of…

    …f` directives.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b64294f View commit details
    Browse the repository at this point in the history
  48. Fixing oversight (discovered by flake8).

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    f04515b View commit details
    Browse the repository at this point in the history
  49. flake8 cleanup

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    e24cf09 View commit details
    Browse the repository at this point in the history
  50. Systematically setting mtxt for all rtrn_mpty_* functions (preparatio…

    …n, the values are not actually used yet).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b8226c0 View commit details
    Browse the repository at this point in the history
  51. static cast handle for rtrn_cptr works by simply dropping in code fro…

    …m type_caster_base (marked with comments).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    14b585c View commit details
    Browse the repository at this point in the history
  52. static cast handle for rtrn_cref works by simply dropping in code fro…

    …m type_caster_base (marked with comments). rtrn_mref and rtrn_mptr work via const_cast (to add const).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c2137a9 View commit details
    Browse the repository at this point in the history
  53. static cast handle for rtrn_valu works by simply dropping in code fro…

    …m type_caster_base (marked with comments). rtrn_rref raises a RuntimeError, to be investigated.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    1a4b6c0 View commit details
    Browse the repository at this point in the history
  54. Copying type_caster_generic::cast into type_caster<mpty> as-is (prepa…

    …ration for handling smart pointers).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    0f3a21f View commit details
    Browse the repository at this point in the history
  55. Pure clang-format change (applied to original type_caster_generic::ca…

    …st).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    d4029ec View commit details
    Browse the repository at this point in the history
  56. Adding comment re potential use_count data race.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    012c160 View commit details
    Browse the repository at this point in the history
  57. static handle cast implementations for rtrn_shmp, rtrn_shcp.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    8bc1548 View commit details
    Browse the repository at this point in the history
  58. Adding MISSING comments in operator std::unique_ptr<mpty[ const]>.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    233709c View commit details
    Browse the repository at this point in the history
  59. static handle cast implementations for rtrn_uqmp, rtrn_uqcp.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    19eec17 View commit details
    Browse the repository at this point in the history
  60. Bug fix: vptr_deleter_armed_flag_ptr has to live on the heap.

    See new bullet point in comment section near the top.
    
    The variable was also renamed to reflect its function more accurately.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6c3c590 View commit details
    Browse the repository at this point in the history
  61. Fixing bugs discovered by ASAN. The code is now ASAN, MSAN, UBSAN clean.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    19dc356 View commit details
    Browse the repository at this point in the history
  62. Making test_type_caster_bare_interface_demo.cpp slightly more realist…

    …ic, ASAN, MSAN, UBSAN clean.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    2b12cc9 View commit details
    Browse the repository at this point in the history
  63. Calling deregister_instance after disowning via unique_ptr.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    9e03cc7 View commit details
    Browse the repository at this point in the history
  64. Removing enable_shared_from_this stub, simplifying existing code, cla…

    …ng-format.
    
    Open question, with respect to the original code:
    https://github.com/pybind/pybind11/blob/76a160070b369f8d82b945c97924227e8b835c94/include/pybind11/pybind11.h#L1510
    To me it looks like the exact situation marked as `std::shared_ptr<Good> gp1 = not_so_good.getptr();` here: https://en.cppreference.com/w/cpp/memory/enable_shared_from_this
    The comment there is: `// undefined behavior (until C++17) and std::bad_weak_ptr thrown (since C++17)`
    Does the existing code have UB pre C++17?
    
    I'll leave handling of enable_shared_from_this for later, as the need arises.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    5223e91 View commit details
    Browse the repository at this point in the history
  65. Cosmetical change around helper functions.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    7fd3d51 View commit details
    Browse the repository at this point in the history
  66. Using type_caster_base<mpty>::src_and_type directly, removing copy. A…

    …lso renaming one cast to cast_const_raw_ptr, for clarity.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    dc0f63e View commit details
    Browse the repository at this point in the history
  67. Fixing clang-format oversight.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    cef065f View commit details
    Browse the repository at this point in the history
  68. Using factored-out make_constructor (PR pybind#2798), removing duplic…

    …ate code.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    fd11b71 View commit details
    Browse the repository at this point in the history
  69. Inserting additional assert to ensure a returned unique_ptr is always…

    … a new Python instance.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    47b0352 View commit details
    Browse the repository at this point in the history
  70. Adding minor comment (change to internals needed to distinguish unini…

    …tialized/disowned in error message).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    d189fa3 View commit details
    Browse the repository at this point in the history
  71. Factoring out find_existing_python_instance().

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    5cbc400 View commit details
    Browse the repository at this point in the history
  72. Moving factored-out make_constructor to test_classh_wip.cpp, restorin…

    …g previous version of cast.h. This is currently the most practical approach. See PR pybind#2798 for background.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    0d6bceb View commit details
    Browse the repository at this point in the history
  73. Copying classh type_casters from test_classh_wip.cpp UNMODIFIED, as a…

    … baseline for generalizing the code.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    bd0c8fa View commit details
    Browse the repository at this point in the history
  74. Using pybind11/detail/classh_type_casters.h from test_classh_wip.cpp.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6dae732 View commit details
    Browse the repository at this point in the history
  75. Adding & using PYBIND11_CLASSH_TYPE_CASTERS define.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    a2400b4 View commit details
    Browse the repository at this point in the history
  76. Adding test_classh_inheritance, currently failing (passes with class_).

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    a7b0745 View commit details
    Browse the repository at this point in the history
  77. Removing .clang-format before git rebase master (where the file was a…

    …dded).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    689e253 View commit details
    Browse the repository at this point in the history
  78. Bringing back .clang-format, the previous rm was a bad idea.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c87145c View commit details
    Browse the repository at this point in the history
  79. Folding in modified_type_caster_generic_load_impl, just enough to pas…

    …s test_class_wip. test_classh_inheritance is still failing, but with a different error: [RuntimeError: Incompatible type (as_raw_ptr_unowned).]
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    cc50eaa View commit details
    Browse the repository at this point in the history
  80. Minimal changes needed to pass test_classh_inheritance.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    acb2c33 View commit details
    Browse the repository at this point in the history
  81. First pass adjusting try_implicit_casts and try_load_foreign_module_l…

    …ocal to capture loaded_v_h, but untested and guarded with pybind11_failure("Untested"). This was done mainly to determine general feasibility. Note the TODO in pybind11.h, where type_caster_generic::local_load is currently hard-coded. test_classh_wip and test_classh_inheritance still pass, as before.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    a11dfba View commit details
    Browse the repository at this point in the history
  82. Decoupling generic_type from type_caster_generic.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    d0c351b View commit details
    Browse the repository at this point in the history
  83. Changes and tests covering classh_type_casters try_implicit_casts.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    ed01fae View commit details
    Browse the repository at this point in the history
  84. Minimal test covering classh_type_casters load_impl Case 2b.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    d3ef4a9 View commit details
    Browse the repository at this point in the history
  85. Removing stray isinstance<T>(src): it interferes with the py::module_…

    …local feature. Adding missing #includes.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    299bba4 View commit details
    Browse the repository at this point in the history
  86. Tests for classh py::module_local() feature.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    ce626e0 View commit details
    Browse the repository at this point in the history
  87. Pure renaming of function names in test_classh_inheritance, similar t…

    …o the systematic approach used in test_class_wip. NO functional changes.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    f646967 View commit details
    Browse the repository at this point in the history
  88. Pure renaming of function and variable names, for better generalizati…

    …on when convoluting with inheritance. NO functional changes.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    678ecb9 View commit details
    Browse the repository at this point in the history
  89. Adopting systematic naming scheme from test_classh_wip. NO functional…

    … changes.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6e825d3 View commit details
    Browse the repository at this point in the history
  90. Moving const after type name, for functions that cover a systematic s…

    …cheme. NO functional changes.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    4bd7394 View commit details
    Browse the repository at this point in the history
  91. Adding smart_holder_type_caster_load::loaded_as_shared_ptr, currently…

    … bypassing smart_holder shared_ptr tracking completely, but the tests pass and are sanitizer clean.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    45dfd26 View commit details
    Browse the repository at this point in the history
  92. Removing rtti_held from smart_holder. See updated comment.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    49bf91f View commit details
    Browse the repository at this point in the history
  93. Cleaning up loaded_as_raw_ptr_unowned, loaded_as_shared_ptr.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    f7ce730 View commit details
    Browse the repository at this point in the history
  94. Factoring out convert_type and folding into loaded_as_unique_ptr.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    877218b View commit details
    Browse the repository at this point in the history
  95. Folding convert_type into lvalue_ref and rvalue_ref paths. Some smart…

    …_holder_type_caster_load cleanup.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    be411c8 View commit details
    Browse the repository at this point in the history
  96. Using unique_ptr in local_load to replace static variable. Also addin…

    …g local_load_safety_guard.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    73cb257 View commit details
    Browse the repository at this point in the history
  97. Converting test_unique_ptr_member to using classh: fully working, ASA…

    …N, MSAN, UBSAN clean.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    149be46 View commit details
    Browse the repository at this point in the history
  98. Removing debugging comments (GET_STACK, GET_INT_STACK). cast.h is ide…

    …ntical to current master again, pybind11.h only has the generic_type::initialize(..., &type_caster_generic::local_load) change.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    60dc8f3 View commit details
    Browse the repository at this point in the history
  99. Purging obsolete pybind11/vptr_holder.h and associated test.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b93c240 View commit details
    Browse the repository at this point in the history
  100. Moving several tests to github.com/rwgk/rwgk_tbx/tree/main/pybind11_t…

    …ests
    
    rwgk/rwgk_tbx@a2c2f88
    
    These tests are from experimenting, and for demonstrating UB in pybind11 multiple inheritance handling ("first_base"), to be fixed later.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    a0cf20c View commit details
    Browse the repository at this point in the history
  101. Adding py::smart_holder support to py::class_, purging py::classh com…

    …pletely.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    8e5ca01 View commit details
    Browse the repository at this point in the history
  102. Renaming files in include directory, creating pybind11/smart_holder.h.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    173032c View commit details
    Browse the repository at this point in the history
  103. Renaming all "classh" to "smart_holder" in pybind11/detail/smart_hold…

    …er_type_casters.h.
    
    The user-facing macro is now PYBIND11_SMART_HOLDER_TYPE_CASTERS.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6e460b8 View commit details
    Browse the repository at this point in the history
  104. Systematically renaming tests to use "class_sh" in the name.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b71f6ff View commit details
    Browse the repository at this point in the history
  105. Renaming test_type_caster_bare_interface_demo to test_type_caster_bar…

    …e_interface.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    1613268 View commit details
    Browse the repository at this point in the history
  106. Renaming new tests/core subdirectory to tests/pure_cpp.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    9ef2cce View commit details
    Browse the repository at this point in the history
  107. Adding new tests to CMake config, resetting CI config.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6ab0a02 View commit details
    Browse the repository at this point in the history
  108. Changing CMake file so that test_class_sh_module_local.py actually runs.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    8b04ea0 View commit details
    Browse the repository at this point in the history
  109. clang-tidy fixes.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    e67d5a5 View commit details
    Browse the repository at this point in the history
  110. 32-bit compatibility.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    02c4e24 View commit details
    Browse the repository at this point in the history
  111. Reusing type_caster_base make_copy_constructor, make_move_constructor…

    … with a trick.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    76a090e View commit details
    Browse the repository at this point in the history
  112. CMake COMPARE NATURAL is not available with older versions.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b1ef8b6 View commit details
    Browse the repository at this point in the history
  113. Adding copyright notices to new header files.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6f6a1ad View commit details
    Browse the repository at this point in the history
  114. Explicitly define copy/move constructors/assignments.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    ed68519 View commit details
    Browse the repository at this point in the history
  115. Adding new header files to tests/extra_python_package/test_files.py.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    259d824 View commit details
    Browse the repository at this point in the history
  116. Adding tests/pure_cpp/CMakeLists.txt.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    ef3f789 View commit details
    Browse the repository at this point in the history
  117. Making use of the new find_existing_python_instance() function factor…

    …ed out with PR pybind#2822.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    86dc9bd View commit details
    Browse the repository at this point in the history
  118. Moving define PYBIND11_SMART_HOLDER_TYPE_CASTERS(T) down in the file.…

    … NO functional changes. Preparation for follow-up work (to keep that diff smaller).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    93e3d58 View commit details
    Browse the repository at this point in the history
  119. Reintroducing py::classh, this time as a simple alias for py::class_<…

    …U, py::smart_holder>.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    098630e View commit details
    Browse the repository at this point in the history
  120. Replacing detail::is_smart_holder<H> in cast.h with detail::is_smart_…

    …holder_type_caster<T>.
    
    Moving get_local_load_function_ptr, init_instance_for_type to smart_holder_type_caster_class_hooks.
    Expanding static_assert in py::type::handle_of<> to accommodate smart_holder_type_casters.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    7ed08cb View commit details
    Browse the repository at this point in the history
  121. Fixing oversight.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c9477c4 View commit details
    Browse the repository at this point in the history
  122. Adding classu alias for class_<U, std::unique_ptr<U>>.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    7151287 View commit details
    Browse the repository at this point in the history
  123. Giving up on idea to use legacy init_instance only if is_base_of<type…

    …_caster_generic, type_caster<T>. There are use cases in the wild that define both a custom type_caster and class_.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    290f2d6 View commit details
    Browse the repository at this point in the history
  124. Removing test_type_caster_bare_interface, which was moved to the sepa…

    …rate PR pybind#2834.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    13d861f View commit details
    Browse the repository at this point in the history
  125. Moving up is_smart_holder_type_caster, to also use in cast_is_tempora…

    …ry_value_reference.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    8c87dc4 View commit details
    Browse the repository at this point in the history
  126. Adding smart_holder_type_casters for unique_ptr with custom deleter. …

    …SEVERE CODE DUPLICATION. This commit is to establish a baseline for consolidating the unique_ptr code.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    aacc8ac View commit details
    Browse the repository at this point in the history
  127. Unification of unique_ptr, unique_ptr_with_deleter code in smart_hold…

    …er_poc.h. Leads to more fitting error messages. Enables use of unique_ptr<T, D> smart_holder_type_casters also for unique_ptr<T>.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6e515cc View commit details
    Browse the repository at this point in the history
  128. Copying files as-is from branch test_unique_ptr_member (PR pybind#2672).

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c3617bf View commit details
    Browse the repository at this point in the history
  129. Adding comment, simplifying naming, cmake addition.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    d5cbfa8 View commit details
    Browse the repository at this point in the history
  130. Introducing PYBIND11_USE_SMART_HOLDER_AS_DEFAULT macro (tested only u…

    …ndefined; there are many errors with the macro defined).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    3d34ba3 View commit details
    Browse the repository at this point in the history
  131. Removing test_type_caster_bare_interface, which was moved to the sepa…

    …rate PR pybind#2834.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    98b2751 View commit details
    Browse the repository at this point in the history
  132. Fixing oversight introduced with commit 95425f1.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    26525b6 View commit details
    Browse the repository at this point in the history
  133. Setting record.default_holder correctly for PYBIND11_USE_SMART_HOLDER…

    …_AS_DEFAULT.
    
    With this test_class.cpp builds and even mostly runs, except
    `test_multiple_instances_with_same_pointer`, which segfaults because it is
    using a `unique_ptr` holder but `smart_holder` `type_caster`.
    
    Also adding `static_assert`s to generate build errors for such situations,
    but guarding with `#if 0` to first pivot to test_factory_constructors.cpp.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6ed9cc9 View commit details
    Browse the repository at this point in the history
  134. Fixing up cast.h and smart_holder.h after rebase.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    7070b52 View commit details
    Browse the repository at this point in the history
  135. Removing detail/smart_holder_type_casters.h in separate commit.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    07dab2e View commit details
    Browse the repository at this point in the history
  136. Commenting out const in def_buffer(... const). With this, test_buffer…

    …s builds and runs with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT. Explanation why the const needs to be removed, or fix elsewhere, is still needed, but left for later.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    3f8da23 View commit details
    Browse the repository at this point in the history
  137. Adding test_class_sh_factory_constructors, reproducing test_factory_c…

    …onstructors failure. Using py::class_ in this commit, to be changed to py::classh for debugging.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    9f6fa1c View commit details
    Browse the repository at this point in the history
  138. Removing include/pybind11/detail/smart_holder_type_casters.h from CMa…

    …keLists.txt, test_files.py (since it does not exist in this branch).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    5bd693e View commit details
    Browse the repository at this point in the history
  139. Adding // DANGER ZONE reminders.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    16748f5 View commit details
    Browse the repository at this point in the history
  140. Converting as many py::class_ to py::classh as possible, not breaking…

    … tests.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    e6e441d View commit details
    Browse the repository at this point in the history
  141. Adding initimpl::construct() overloads, resulting in test_class_sh_fa…

    …ctory_constructors feature parity for py::class_ and py::classh.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    dfa00a1 View commit details
    Browse the repository at this point in the history
  142. Adding enable_if !is_smart_holder_type_caster to existing initimpl::c…

    …onstruct(). With this test_factory_constructors.cpp builds with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    9dd82f1 View commit details
    Browse the repository at this point in the history
  143. Disabling shared_ptr&, shared_ptr* tests when building with PYBIND11_…

    …USE_SMART_HOLDER_AS_DEFAULT for now, pending work on smart_holder_type_caster<shared_ptr>.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    fba0729 View commit details
    Browse the repository at this point in the history
  144. Factoring out struct and class definitions into anonymous namespace. …

    …Preparation for building with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c4e4da8 View commit details
    Browse the repository at this point in the history
  145. Simplifying from_unique_ptr(): typename D = std::default_delete<T> is…

    … not needed. Factoring out is_std_default_delete<T>() for consistentcy between ensure_compatible_rtti_uqp_del() and from_unique_ptr().
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    0b73ef4 View commit details
    Browse the repository at this point in the history
  146. Introducing PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS. Using it in t…

    …est_smart_ptr.cpp. With this test_smart_ptr builds with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT and all but one test run successfully.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    576a456 View commit details
    Browse the repository at this point in the history
  147. Introducing 1. type_caster_for_class_, used in PYBIND11_MAKE_OPAQUE, …

    …and 2. default_holder_type, used in stl_bind.h.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    f65cb0c View commit details
    Browse the repository at this point in the history
  148. Using __VA_ARGS__ in PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    4665ff6 View commit details
    Browse the repository at this point in the history
  149. Replacing condense_for_macro with much simpler approach.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    6582fb3 View commit details
    Browse the repository at this point in the history
  150. Softening static_assert, to only check specifically that smart_holder…

    … is not mixed with type_caster_base, and unique_ptr/shared_ptr holders are not mixed with smart_holder_type_casters.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    4a9bc72 View commit details
    Browse the repository at this point in the history
  151. Adding PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS in test_class.cpp (…

    …with this all but one test succeed with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    f439b2b View commit details
    Browse the repository at this point in the history
  152. Adding remaining PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS. static_a…

    …ssert for "necessary conditions" for both types of default holder, static_assert for "strict conditions" guarded by new PYBIND11_STRICT_ASSERTS_CLASS_HOLDER_VS_TYPE_CASTER_MIX. All tests build & run as before with unique_ptr as the default holder, all tests build for smart_holder as the default holder, even with the strict static_assert.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    efa7adb View commit details
    Browse the repository at this point in the history
  153. Introducing check_is_smart_holder_type_caster() function for runtime …

    …check, and reinterpreting record.default_holder as "uses_unique_ptr_holder". With this test_smart_ptr succeeds. (All 42 tests build, 35 tests succeed, 5 run but have some failures, 2 segfault.)
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    523bfd3 View commit details
    Browse the repository at this point in the history
  154. Bug fix: Adding have_value() to smart_holder_type_caster_load. With t…

    …his test_builtin_casters succeeds. (All 42 tests build, 36 tests succeed, 5 run but have some failures, 1 segfault.)
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    706ffbd View commit details
    Browse the repository at this point in the history
  155. Adding unowned_void_ptr_from_direct_conversion to modified_type_caste…

    …r_generic_load_impl. This fixes the last remaining segfault (test_numpy_dtypes). New stats for all tests combined: 12 failed, 458 passed.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    8176a36 View commit details
    Browse the repository at this point in the history
  156. Adding "Lazy allocation for unallocated values" (for old-style __init…

    …__) into load_value_and_holder. Deferring destruction of disowned holder until clear_instance, to remain inspectable for "uninitialized" or "disowned" detection. New stats for all tests combined: 5 failed, 465 passed.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    5068524 View commit details
    Browse the repository at this point in the history
  157. Changing std::shared_ptr pointer/reference to const pointer/reference…

    …. New stats for all tests combined: 4 failed, 466 passed.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    64e6a80 View commit details
    Browse the repository at this point in the history
  158. Adding return_value_policy::move to permissible policies for unique_p…

    …tr returns. New stats for all tests combined: 3 failed, 467 passed.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    2f79cd9 View commit details
    Browse the repository at this point in the history
  159. Overlooked flake8 fixes.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    40a3afa View commit details
    Browse the repository at this point in the history
  160. Manipulating failing ConstructorStats test to pass, to be able to run…

    … all tests with ASAN.
    
    This version of the code is ASAN clean with unique_ptr or smart_holder as the default.
    
    This change needs to be reverted after adopting the existing move-only-if-refcount-is-1
    logic used by type_caster_base.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    095d265 View commit details
    Browse the repository at this point in the history
  161. Adding copy constructor and move constructor tracking to atyp. Prepar…

    …ation for a follow-up change in smart_holder_type_caster, to make this test sensitive to the changing behavior.
    
    [skip ci]
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    dab4495 View commit details
    Browse the repository at this point in the history
  162. Removing operator T&&() && from smart_holder_type_caster, for compa…

    …tibility with the behavior of type_caster_base. Enables reverting 2 of 3 test manipulations applied under commit 249df7c. The manipulation in test_factory_constructors.py is NOT reverted in this commit.
    
    [skip ci]
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    20446f1 View commit details
    Browse the repository at this point in the history
  163. Fixing unfortunate editing mishap. This reverts the last remaining te…

    …st manipulation in commit 249df7c and makes all existing unit tests pass with smart_holder as default holder.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    bb79703 View commit details
    Browse the repository at this point in the history
  164. GitHub CI clang-tidy fixes.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    8736910 View commit details
    Browse the repository at this point in the history
  165. Adding messages to terse static_asserts, for pre-C++17 compatibility.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    52238cb View commit details
    Browse the repository at this point in the history
  166. Using @pytest.mark.parametrize to run each assert separately (to see …

    …all errors, not just the first).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    3346a61 View commit details
    Browse the repository at this point in the history
  167. Systematically removing _atyp from function names, to make the test c…

    …ode simpler.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b792080 View commit details
    Browse the repository at this point in the history
  168. Using re.match to accommodate variable number of intermediate MvCtor.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    2003b50 View commit details
    Browse the repository at this point in the history
  169. Also removing operator T() from smart_holder_type_caster, to fix gc…

    …c compilation errors. The only loss is pass_rref in test_class_sh_basic.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    823934f View commit details
    Browse the repository at this point in the history
  170. Systematically replacing detail::enable_if_t<...smart_holder...> wi…

    …th `typename std::enable_if<...smart_holder...>::type`. Attempt to work around MSVC 2015 issues, to be tested via GitHub CI. The idea for this change originates from this comment: pybind#1616 (comment)
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    1909436 View commit details
    Browse the repository at this point in the history
  171. Importing re before pytest after observing a PyPy CI flake when impor…

    …ting pytest first.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    823ae0a View commit details
    Browse the repository at this point in the history
  172. Copying MSVC 2015 compatibility change from branch pr2672_use_smart_h…

    …older_as_default.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    0bfa993 View commit details
    Browse the repository at this point in the history
  173. Introducing is_smart_holder_type_caster_base_tag, to keep smart_holde…

    …r code more disconnected.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    44bdc14 View commit details
    Browse the repository at this point in the history
  174. Working around MSVC 2015 bug.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c51dec4 View commit details
    Browse the repository at this point in the history
  175. Expanding comment for MSVC 2015 workaround.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    23cbc2b View commit details
    Browse the repository at this point in the history
  176. Systematically changing std::enable_if back to detail::enable_if_t, e…

    …ffectively reverting commit 5d4b689.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    e0e3ff0 View commit details
    Browse the repository at this point in the history
  177. Removing unused smart_holder_type_caster_load::loaded_as_rvalue_ref (…

    …it was an oversight that it was not removed with commit 23036a4).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    795b2bc View commit details
    Browse the repository at this point in the history
  178. Removing py::classu, because it does not seem useful enough.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    ceb0ea7 View commit details
    Browse the repository at this point in the history
  179. Reverting commit 6349531 by un-commenting const in `def_buffer(...)…

    …`. To make this possible, `operator T const&` and `operator T const*` in `smart_holder_type_caster` need to be marked as `const` member functions.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    3709ab3 View commit details
    Browse the repository at this point in the history
  180. Adding construct() overloads for constructing smart_holder from alias…

    … unique_ptr, shared_ptr returns.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    53c1064 View commit details
    Browse the repository at this point in the history
  181. Adding test_class_sh_factory_constructors.cpp to tests/CMakeLists.txt…

    … (fixes oversight, this should have been added long before).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    2bf0721 View commit details
    Browse the repository at this point in the history
  182. Compatibility with old clang versions (clang 3.6, 3.7 C++11).

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    fa54ccb View commit details
    Browse the repository at this point in the history
  183. Cleaning up changes to existing unit tests.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    010cdec View commit details
    Browse the repository at this point in the history
  184. Systematically adding SMART_HOLDER_WIP tag. Removing minor UNTESTED t…

    …ags (only the throw are not actually exercised, investing time there has a high cost but very little benefit).
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    413c23b View commit details
    Browse the repository at this point in the history
  185. Splitting out smart_holder_type_casters again, into new detail/smart_…

    …holder_type_casters_inline_include.h.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    b222aa4 View commit details
    Browse the repository at this point in the history
  186. Splitting out smart_holder_init_inline_include.h.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    348d893 View commit details
    Browse the repository at this point in the history
  187. Adding additional new include files to CMakeLists.txt, tests/extra_py…

    …thon_package/test_files.py.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    8cac3e0 View commit details
    Browse the repository at this point in the history
  188. clang-format cleanup of most smart_holder code.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    4ffa561 View commit details
    Browse the repository at this point in the history
  189. Adding source code comments in response to review.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    81cd3cc View commit details
    Browse the repository at this point in the history
  190. Simple micro-benchmark ("ubench") comparing runtime performance for s…

    …everal holders.
    
    Tested using github.com/rwgk/pybind11_scons and Google-internal build system.
    Sorry, no cmake support at the moment.
    
    First results: https://docs.google.com/spreadsheets/d/1InapCYws2Gt-stmFf_Bwl33eOMo3aLE_gc9adveY7RU/edit#gid=0
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    baf51b4 View commit details
    Browse the repository at this point in the history
  191. Breaking out number_bucket.h, adding hook for also collecting perform…

    …ance data for PyCLIF.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    0964419 View commit details
    Browse the repository at this point in the history
  192. Accounting for ubench in MANIFEST.in (simply prune, for now).

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    1e8fe10 View commit details
    Browse the repository at this point in the history
  193. Smarter determination of call_repetitions.

    [skip ci]
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    227de40 View commit details
    Browse the repository at this point in the history
  194. Also scaling performance data to PyCLIF.

    [skip ci]
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    fb505c0 View commit details
    Browse the repository at this point in the history
  195. Adding ubench/python/number_bucket.clif here for general visibility.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    a886a56 View commit details
    Browse the repository at this point in the history
  196. Fix after rebase

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    044056a View commit details
    Browse the repository at this point in the history
  197. Merging detail/smart_holder_init_inline_include.h into detail/init.h.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    3d31698 View commit details
    Browse the repository at this point in the history
  198. Renaming detail/is_smart_holder_type_caster.h -> detail/smart_holder_…

    …sfinae_hooks_only.h.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    658cf3b View commit details
    Browse the repository at this point in the history
  199. Renaming is_smart_holder_type_caster -> type_uses_smart_holder_type_c…

    …aster for clarity.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    3a303ee View commit details
    Browse the repository at this point in the history
  200. Renaming type_caster_type_is_smart_holder_type_caster -> wrapped_type…

    …_uses_smart_holder_type_caster for clarity.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    ce40fb6 View commit details
    Browse the repository at this point in the history
  201. Renaming is_smart_holder_type_caster_base_tag -> smart_holder_type_ca…

    …ster_base_tag for simplicity.
    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c56bd3a View commit details
    Browse the repository at this point in the history
  202. Adding copyright notices and minor colateral cleanup.

    Ralf W. Grosse-Kunstleve committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    62afdc0 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2021

  1. iwyu cleanup (comprehensive only for cast.h and smart_holder*.h files).

    Ralf W. Grosse-Kunstleve committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    4f5f441 View commit details
    Browse the repository at this point in the history
  2. Fixing git rebase master accident.

    Ralf W. Grosse-Kunstleve committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    f5dadd4 View commit details
    Browse the repository at this point in the history
  3. Moving large pragma warning block from pybind11.h to detail/common.h.

    Ralf W. Grosse-Kunstleve committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    4bae719 View commit details
    Browse the repository at this point in the history
  4. Fixing another git rebase master accident.

    Ralf W. Grosse-Kunstleve committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    4255d6c View commit details
    Browse the repository at this point in the history
  5. PYBIND11_USE_SMART_HOLDER_AS_DEFAULT

    Ralf W. Grosse-Kunstleve committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    7559a54 View commit details
    Browse the repository at this point in the history