1. Jul 21, 2022
    • Ralf W. Grosse-Kunstleve's avatar
    • Ralf W. Grosse-Kunstleve's avatar
      e32f73bf
    • Ralf W. Grosse-Kunstleve's avatar
      4d774ec2
    • Ralf W. Grosse-Kunstleve's avatar
      More systematic gcc & clang coverage (#4083) · 9a296373
      Ralf W. Grosse-Kunstleve authored
      * More systematic gcc coverage, based on https://github.com/pybind/pybind11/pull/4074#issuecomment-1188385580
      
      * Fix complete fail.
      
      * Resolve GCC 11 & 12 "redundant move in return statement" warnings.
      
      * Also add clang 11, 12, 13 (to gather info for warning suppressions).
      
      * Add & use `PYBIND11_DETECTED_CLANG_WITH_MISLEADING_CALL_STD_MOVE_EXPLICITLY_WARNING`
      9a296373
    • Ralf W. Grosse-Kunstleve's avatar
      [smart_holder] `type_caster` ODR guard (#4022) · c557f9a3
      Ralf W. Grosse-Kunstleve authored
      * Insert type_caster_odr_guard<> (an empty struct to start with).
      
      * Add odr_guard_registry() used in type_caster_odr_guard() default constructor.
      
      * Add minimal_real_caster (from PR #3862) to test_async, test_buffers
      
      * VERY MESSY SNAPSHOT of WIP, this was the starting point for cl/454658864, which has more changes on top.
      
      * Restore original test_async, test_buffers from current smart_holder HEAD
      
      * Copy from cl/454991845 snapshot Jun 14, 5:08 PM
      
      * Cleanup of tests. Systematically insert `if (make_caster<T>::translation_unit_local) {`
      
      * Small simplification of odr_guard_impl()
      
      * WIP
      
      * Add PYBIND11_SOURCE_FILE_LINE macro.
      
      * Replace PYBIND11_TYPE_CASTER_UNIQUE_IDENTIFIER with PYBIND11_TYPE_CASTER_SOURCE_FILE_LINE, baked into PYBIND11_TYPE_CASTER macro.
      
      * Add more PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL; resolves "unused" warning when compiling test_custom_type_casters.cpp
      
      * load_type fixes & follow-on cleanup
      
      * Strip ./ from source_file_line
      
      * Add new tests to CMakeLists.txt, disable PYBIND11_WERROR
      
      * Replace C++17 syntax. Compiles with Debian clang 13 C++11 mode, but fails to link. Trying GitHub Actions anyway to see if there are any platforms that support https://en.cppreference.com/w/cpp/language/tu_local before C++20. Note that Debian clang 13 C++17 works locally.
      
      * Show C++ version along with ODR VIOLATION DETECTED message.
      
      * Add source_file_line_basename()
      
      * Introduce PYBIND11_TYPE_CASTER_ODR_GUARD_ON (but not set automatically).
      
      * Minor cleanup.
      
      * Set PYBIND11_TYPE_CASTER_ODR_GUARD_ON automatically.
      
      * Resolve clang-tidy error.
      
      * Compatibility with old compilers.
      
      * Fix off-by-one in source_file_line_basename()
      
      * Report PYBIND11_INTERNALS_ID & C++ Version from pytest_configure()
      
      * Restore use of PYBIND11_WERROR
      
      * Move cpp_version_in_use() from cast.h to pybind11_tests.cpp
      
      * define PYBIND11_DETAIL_ODR_GUARD_IMPL_THROW_DISABLED true in test_odr_guard_1,2.cpp
      
      * IWYU cleanup of detail/type_caster_odr_guard.h
      
      * Replace `throw err;` to resolve clang-tidy error.
      
      * Add new header filename to CMakeLists.txt, test_files.py
      
      * Experiment: Try any C++17 compiler.
      
      * Fix ifdef for pragma GCC diagnostic.
      
      * type_caster_odr_guard_impl() cleanup
      
      * Move type_caster_odr_guard to type_caster_odr_guard.h
      
      * Rename test_odr_guard* to test_type_caster_odr_guard*
      
      * Remove comments that are (now) more distracting than helpful.
      
      * Mark tu_local_no_data_always_false operator bool as explicit (clang-tidy). See also: https://stackoverflow.com/questions/39995573/when-can-i-use-explicit-operator-bool-without-a-cast
      
      * New PYBIND11_TYPE_CASTER_ODR_GUARD_STRICT option (current on by default).
      
      * Add test_type_caster_odr_registry_values(), test_type_caster_odr_violation_detected_counter()
      
      * Report UNEXPECTED: test_type_caster_odr_guard_2.cpp prevailed (but do not fail).
      
      * Apply clang-tidy suggestion.
      
      * Attempt to handle valgrind behavior.
      
      * Another attempt to handle valgrind behavior.
      
      * Yet another attempt to handle valgrind behavior.
      
      * Trying a new direction: show compiler info & std for UNEXPECTED: type_caster_odr_violation_detected_count() == 0
      
      * compiler_info MSVC fix. num_violations == 0 condition.
      
      * assert pybind11_tests.compiler_info is not None
      
      * Introduce `make_caster_intrinsic<T>`, to be able to undo the 2 changes from `load_type` to `load_type<T>`. This is to avoid breaking 2 `pybind11::detail::load_type()` calls found in the wild (Google global testing).
      
      One of the breakages in the wild was: https://github.com/google/tensorstore/blob/0f0f6007670a3588093acd9df77cce423e0de805/python/tensorstore/subscript_method.h#L61
      
      * Add test for stl.h / stl_bind.h mix.
      
      Manually verified that the ODR guard detects the ODR violation:
      
      ```
      C++ Info: Debian Clang 13.0.1 C++17 __pybind11_internals_v4_clang_libstdcpp_cxxabi1002_sh_def__
      =========================================================== test session starts ============================================================
      platform linux -- Python 3.9.12, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
      ...
      ================================================================= FAILURES =================================================================
      _____________________________________________ test_type_caster_odr_violation_detected_counter ______________________________________________
      
          def test_type_caster_odr_violation_detected_counter():
              ...
              else:
      >           assert num_violations == 1
      E           assert 2 == 1
      E             +2
      E             -1
      
      num_violations = 2
      
      test_type_caster_odr_guard_1.py:51: AssertionError
      ========================================================= short test summary info ==========================================================
      FAILED test_type_caster_odr_guard_1.py::test_type_caster_odr_violation_detected_counter - assert 2 == 1
      ======================================================= 1 failed, 5 passed in 0.08s ========================================================
      ```
      
      * Eliminate need for `PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL` macro.
      
      Copying code first developed by @amauryfa. I tried this at an earlier stage, but by itself this was insufficient. In the meantime I added in the TU-local mechanisms: trying again.
      
      Passes local testing:
      ```
      DISABLED std::system_error: ODR VIOLATION DETECTED: pybind11::detail::type_caster<mrc_ns::type_mrc>: SourceLocation1="/usr/local/google/home/rwgk/forked/pybind11/tests/test_type_caster_odr_guard_1.cpp:18", SourceLocation2="/usr/local/google/home/rwgk/forked/pybind11/tests/test_type_caster_odr_guard_2.cpp:19"
      C++ Info: Debian Clang 13.0.1 C++17 __pybind11_internals_v4_clang_libstdcpp_cxxabi1002_sh_def__
      =========================================================== test session starts ============================================================
      platform linux -- Python 3.9.12, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
      cachedir: .pytest_cache
      rootdir: /usr/local/google/home/rwgk/forked/pybind11/tests, configfile: pytest.ini
      collected 6 items
      
      test_type_caster_odr_guard_1.py::test_type_mrc_to_python PASSED
      test_type_caster_odr_guard_1.py::test_type_mrc_from_python PASSED
      test_type_caster_odr_guard_1.py::test_type_caster_odr_registry_values PASSED
      test_type_caster_odr_guard_1.py::test_type_caster_odr_violation_detected_counter PASSED
      test_type_caster_odr_guard_2.py::test_type_mrc_to_python PASSED
      test_type_caster_odr_guard_2.py::test_type_mrc_from_python PASSED
      
      ============================================================ 6 passed in 0.01s =============================================================
      ```
      
      * tu_local_descr with src_loc experiment
      
      * clang-tidy suggested fixes
      
      * Use source_file_line_from_sloc in type_caster_odr_guard_registry
      
      * Disable type_caster ODR guard for __INTEL_COMPILER (see comment). Also turn off printf.
      
      * Add missing include (discovered via google-internal testing).
      
      * Work `scr_loc` into `descr`
      
      * Use `TypeCasterType::name.sloc` instead of `source_file_line.sloc`
      
      Manual re-verification:
      
      ```
      +++ b/tests/test_type_caster_odr_guard_2.cpp
      -    // m.def("pass_vector_type_mrc", mrc_ns::pass_vector_type_mrc);
      +    m.def("pass_vector_type_mrc", mrc_ns::pass_vector_type_mrc);
      ```
      
      ```
      >           assert num_violations == 1
      E           assert 2 == 1
      
      num_violations = 2
      
      test_type_caster_odr_guard_1.py:51: AssertionError
      ```
      
      * Fix small oversight (src_loc::here() -> src_loc{nullptr, 0}).
      
      * Remove PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL macro completely.
      
      * Remove PYBIND11_TYPE_CASTER_SOURCE_FILE_LINE macro completely. Some small extra cleanup.
      
      * Minor tweaks looking at the PR with a fresh eye.
      
      * src_loc comments
      
      * Add new test_descr_src_loc & and fix descr.h `concat()` `src_loc` bug discovered while working on the test.
      
      * Some more work on source code comments.
      
      * Fully document the ODR violations in the ODR guard itself and introduce `PYBIND11_TYPE_CASTER_ODR_GUARD_ON_IF_AVAILABLE`
      
      * Update comment (incl. mention of deadsnakes known to not work as intended).
      
      * Use no-destructor idiom for type_caster_odr_guard_registry, as suggested by @laramiel
      
      * Fix clang-tidy error: 'auto reg' can be declared as 'auto *reg' [readability-qualified-auto,-warnings-as-errors]
      
      * WIP
      
      * Revert "WIP" (tu_local_no_data_always_false_base experiment).
      
      This reverts commit 31e8ac562f91a2e3d480a82feaa76bf2142c9ce7.
      
      * Change `PYBIND11_TYPE_CASTER_ODR_GUARD_ON` to `PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD`, based on a suggestion by @rainwoodman
      
      * Improved `#if` determining `PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD`, based on suggestion by @laramiel
      
      * Make `descr::sloc` `const`, as suggested by @rainwoodman
      
      * Rename macro to `PYBIND11_DETAIL_TYPE_CASTER_ODR_GUARD_IMPL_DEBUG`, as suggested by @laramiel
      
      * Tweak comments some more (add "white hat hacker" analogy).
      
      * Bring back `PYBIND11_CPP17` in determining `PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD`, to hopefully resolve most if not all of the many CI failures (89 failing, 32 successful: https://github.com/pybind/pybind11/runs/7430295771).
      
      * Try another workaround for `__has_builtin`-related breakages (https://github.com/pybind/pybind11/runs/7430720321).
      
      * Remove `defined(__has_builtin)` and subconditions.
      
      * Update "known to not work" expectation in test and comment.
      
      * `pytest.skip` `num_violations == 0` only `#ifdef __NO_INLINE__` (irrespective of the compiler)
      
      * Systematically change all new `#ifdef` to `#if defined` (review suggestion).
      
      * Bring back MSVC comment that got lost while experimenting.
      c557f9a3
    • Ralf W. Grosse-Kunstleve's avatar
      For PyPy only, re-enable old behavior (runs the risk of masking bugs) (#4079) · cb35a3c1
      Ralf W. Grosse-Kunstleve authored
      * For PyPy only, re-enable old behavior (likely to mask bugs), to avoid segfault with unknown root cause.
      
      Change prompted by https://github.com/pybind/pybind11/issues/4075
      
      * Undo the change in tests/test_exceptions.py
      
      I turns out (I forgot) that PyPy segfaults in `test_flaky_exception_failure_point_init` already before the `MISMATCH` code path is reached:
      
      https://github.com/pybind/pybind11/runs/7383663596
      
      ```
      RPython traceback:
      test_exceptions.py .......X.........Error in cpyext, CPython compatibility layer:
        File "pypy_module_cpyext.c", line 14052, in wrapper_second_level__star_3_1
        File "pypy_module_cpyext_1.c", line 35750, in not_supposed_to_fail
      Fatal Python error: Segmentation fault
      Stack (most recent call first, approximate line numbers):
        File "/home/runner/work/pybind11/pybind11/tests/test_exceptions.py", line 306 in test_flaky_exception_failure_point_init
      The function PyErr_NormalizeException was not supposed to fail
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/python.py", line 185 in pytest_pyfunc_call
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_callers.py", line 9 in _multicall
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_manager.py", line 77 in _hookexec
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_hooks.py", line 244 in __call__
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/python.py", line 1716 in runtest
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/runner.py", line 159 in pytest_runtest_call
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_callers.py", line 9 in _multicall
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_manager.py", line 77 in _hookexec
      Fatal error in cpyext, CPython compatibility layer, calling PyErr_NormalizeException
      Either report a bug or consider not using this particular extension
      <SystemError object at 0x7fcc8cea6868>
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_hooks.py", line 244 in __call__
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/runner.py", line 261 in <lambda>
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/runner.py", line 317 in from_call
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/runner.py", line 246 in call_runtest_hook
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/runner.py", line 218 in call_and_report
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/runner.py", line 118 in runtestprotocol
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/runner.py", line 110 in pytest_runtest_protocol
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_callers.py", line 9 in _multicall
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_manager.py", line 77 in _hookexec
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_hooks.py", line 244 in __call__
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/main.py", line 335 in pytest_runtestloop
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_callers.py", line 9 in _multicall
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_manager.py", line 77 in _hookexec
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_hooks.py", line 244 in __call__
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/main.py", line 318 in _main
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/main.py", line 255 in wrap_session
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/main.py", line 314 in pytest_cmdline_main
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_callers.py", line 9 in _multicall
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_manager.py", line 77 in _hookexec
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pluggy/_hooks.py", line 244 in __call__
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/config/__init__.py", line 133 in main
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/_pytest/config/__init__.py", line 181 in console_main
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/site-packages/pytest/__main__.py", line 1 in <module>
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/lib-python/3/runpy.py", line 62 in _run_code
        File "/opt/hostedtoolcache/PyPy/3.7.13/x64/lib-python/3/runpy.py", line 170 in _run_module_as_main
        File "<builtin>/app_main.py", line 109 in run_toplevel
        File "<builtin>/app_main.py", line 652 in run_command_line
        File "<builtin>/app_main.py", line 996 in entry_point
      Segmentation fault (core dumped)
      ```
      
      * Add test_pypy_oserror_normalization
      
      * Disable new `PYPY_VERSION` `#if`, to verify that the new test actually fails.
      
      * Restore PYPY_VERSION workaround and update comment to reflect what was learned.
      
      * [ci skip] Fix trivial oversight in comment.
      cb35a3c1
    • Aaron Gokaslan's avatar
      chore: use explicit defaulting in pyobject macros (#4017) · 42b54507
      Aaron Gokaslan authored
      * Use equals default in pyobject macros
      
      * Remove extra semicolon
      
      * Update clang-tidy equals-default rule to not ignore macros
      
      * Fix formatting
      
      * One last formatting change
      42b54507
  2. Jul 20, 2022
    • Aaron Gokaslan's avatar
      Fix #3812 and fix const of inplace assignments (#4065) · f47f1edf
      Aaron Gokaslan authored
      
      
      * Fix #3812 and fix const of inplace assignments
      
      * Fix missing tests
      
      * Revert operator overloading changes
      
      * calculate answer first for tests
      
      * Simplify tests
      
      * Add more tests
      
      * Add a couple more tests
      
      * Add test_inplace_lshift, test_inplace_rshift for completeness.
      
      * Update tests
      
      * Shortcircuit on self assigment and address reviewer comment
      
      * broaden skip for self assignment
      
      * One more reviewer comment
      
      * Document opt behavior and make consistent
      
      * Revert unnecessary change
      
      * Clarify comment
      
      Co-authored-by: default avatarRalf W. Grosse-Kunstleve <rwgk@google.com>
      f47f1edf
  3. Jul 19, 2022
  4. Jul 16, 2022
  5. Jul 15, 2022
    • Ralf W. Grosse-Kunstleve's avatar
      Disable implicit conversion of `0` to `pybind11::handle`. (#4008) · 1d811910
      Ralf W. Grosse-Kunstleve authored
      * Disable implicit conversion from `0` to `pybind11::handle`.
      
      * Reverse or-ed condition in an attempt to resolve GCC 8.3.0 errors (i386/debian:buster).
      
      * Trying the simpler `std::is_same<T, PyObject *>`
      
      * Add implicit_conversion_from_pytorch_THPObjectPtr_to_handle test.
      
      * Accommodate types with implicit conversions to `PyObject *`, other than `handle` & `handle` subclasses, or integral types.
      
      * Fix copy-paste mishap (picked wrong name).
      
      * Revamp SFINAE construct to actually fix the pytorch issue (already validated against pytorch proper).
      
      The first version of the reduced pytorch code was critically missing the move ctor. The first version of the accompanying test was meaningless.
      
      Note: It turns out the `!std::is_arithmetic<T>` condition is not needed: `int` is not in general implicitly convertible to `PyObject *`, only the literal `0` is.
      
      * Use `NOLINT(performance-noexcept-move-constructor)` for reduced code from the wild (rather than changing the code).
      
      * Use any_of, all_of, negation. It turns out to clang-format nicer.
      
      * Clean up comments for changed code.
      
      * Reduce pytorch situation further, add test for operator ... const.
      
      * Use `none_of` as suggested by @skylion007
      
      * Add `pure_compile_tests_for_handle_from_PyObject_pointers()`
      
      * Fix inconsequential oversight (retested).
      
      * Factor our `is_pyobj_ptr_or_nullptr_t` to make the SFINAE conditions more readable.
      
      * Remove stray line (oversight).
      
      * Make the `pure_compile_tests_for_handle_from_PyObject_pointers()` "rhs-const-complete", too.
      
      * Remove the temporary PYBIND11_UNDO_PR4008 `#ifdef`.
      1d811910
  6. Jul 14, 2022
  7. Jul 13, 2022
  8. Jul 12, 2022
  9. Jul 10, 2022
    • Ralf W. Grosse-Kunstleve's avatar
      Turn off flake8 completely for ubench/ · bcd1800c
      Ralf W. Grosse-Kunstleve authored
      To suppress these new errors (apparently after a flake8 upgrade):
      
      ```
      flake8...................................................................Failed
      - hook id: flake8
      - exit code: 1
      
      ubench/holder_comparison.py:96:38: B023 Function definition does not bind loop variable 'nb1'.
                          assert int(round(nb1.sum())) == data_size
                                           ^
      ubench/holder_comparison.py:96:53: B023 Function definition does not bind loop variable 'data_size'.
                          assert int(round(nb1.sum())) == data_size
                                                          ^
      ubench/holder_comparison.py:99:25: B023 Function definition does not bind loop variable 'nb1'.
                              nb1.sum()
                              ^
      ubench/holder_comparison.py:103:28: B023 Function definition does not bind loop variable 'nb1'.
                          assert nb1.add(nb2) == data_size
                                 ^
      ubench/holder_comparison.py:103:36: B023 Function definition does not bind loop variable 'nb2'.
                          assert nb1.add(nb2) == data_size
                                         ^
      ubench/holder_comparison.py:103:44: B023 Function definition does not bind loop variable 'data_size'.
                          assert nb1.add(nb2) == data_size
                                                 ^
      ubench/holder_comparison.py:106:25: B023 Function definition does not bind loop variable 'nb1'.
                              nb1.add(nb2)
                              ^
      ubench/holder_comparison.py:106:33: B023 Function definition does not bind loop variable 'nb2'.
                              nb1.add(nb2)
                                      ^
      ubench/holder_comparison_extract_sheet_data.py:21:16: B023 Function definition does not bind loop variable 'header_row'.
                  if header_row:
                     ^
      ubench/holder_comparison_extract_sheet_data.py:22:20: B023 Function definition does not bind loop variable 'header'.
                      if header is None:  # type: ignore[unreachable]
                         ^
      ubench/holder_comparison_extract_sheet_data.py:23:36: B023 Function definition does not bind loop variable 'header_row'.
                          print(",".join(header_row))
                                         ^
      ubench/holder_comparison_extract_sheet_data.py:25:28: B023 Function definition does not bind loop variable 'header'.
                          assert header == header_row
                                 ^
      ubench/holder_comparison_extract_sheet_data.py:25:38: B023 Function definition does not bind loop variable 'header_row'.
                          assert header == header_row
                                           ^
      ubench/holder_comparison_extract_sheet_data.py:26:16: B023 Function definition does not bind loop variable 'data_row'.
                  if data_row is not None:
                     ^
      ubench/holder_comparison_extract_sheet_data.py:27:32: B023 Function definition does not bind loop variable 'data_row'.
                      print(",".join(data_row))  # type: ignore[unreachable]
                                     ^
      ubench/holder_comparison_extract_sheet_data.py:28:17: B023 Function definition does not bind loop variable 'data_row_buffer'.
                      data_row_buffer.append(data_row)
                      ^
      ubench/holder_comparison_extract_sheet_data.py:28:40: B023 Function definition does not bind loop variable 'data_row'.
                      data_row_buffer.append(data_row)
                                             ^
      ubench/holder_comparison_extract_sheet_data.py:29:20: B023 Function definition does not bind loop variable 'header_row'.
                  return header_row
                         ^
      ```
      bcd1800c
    • Ralf W. Grosse-Kunstleve's avatar
      3bd20627
    • Ralf W. Grosse-Kunstleve's avatar
      27ce64fc
    • Aaron Gokaslan's avatar
      Properly visit self in >=3.9 traverse (#4051) · f9f00495
      Aaron Gokaslan authored
      * Properly visit self in >=3.9 traverse
      
      * Add comment about 3.9 behavior
      f9f00495
  10. Jul 08, 2022
  11. Jul 07, 2022
  12. Jul 05, 2022
  13. Jul 04, 2022
  14. Jun 30, 2022
    • Matthew Woehlke's avatar
      Fix arrays with zero-size dimensions (#4038) · 479e9a50
      Matthew Woehlke authored
      When converting an array to an Eigen matrix, ignore the strides if any
      dimension size is 0. If the array is empty, the strides aren't relevant,
      and especially numpy ≥ 1.23 explicitly sets the strides to 0 in this
      case. (See numpy commit dd5ab7b11520.)
      
      Update tests to verify that this works, and continues to work.
      479e9a50
  15. Jun 29, 2022
  16. Jun 28, 2022