1. 10 Oct, 2022 1 commit
    • Reproducer and fix for issue encountered in smart_holder update. (#4228) · da104a9e
      * Reproducer for issue encountered in smart_holder update.
      
      * clang-tidy compatibility (untested).
      
      * Add `enable_if_t` to workaround.
      
      * Bug fix: Move `PYBIND11_USING_WORKAROUND_FOR_CUDA_11_4_THROUGH_8` determination to detail/common.h
      
      So that it actually is defined in pybind11.h
      
      * Try using the workaround (which is nicer than the original code) universally.
      
      * Reduce reproducer for CUDA 11.7 issue encountered in smart_holder update.
      
      This commit tested in isolation on top of current master + first version of reproducer (62311eb431849d135a5db84f6c75ec390f2ede7c).
      
      Succeeds with Debian Clang 14.0.6 C++17 (and probably all other compilers).
      
      Fails for CUDA 11.7:
      
      ```
      cd /build/tests && /usr/local/cuda/bin/nvcc -forward-unknown-to-host-compiler -Dpybind11_tests_EXPORTS -I/mounted_pybind11/include -isystem=/usr/include/python3.10 -g --generate-code=arch=compute_52,code=[compute_52,sm_52] -Xcompiler=-fPIC -Xcompiler=-fvisibility=hidden -Werror all-warnings -std=c++17 -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_class.cpp.o -MF CMakeFiles/pybind11_tests.dir/test_class.cpp.o.d -x cu -c /mounted_pybind11/tests/test_class.cpp -o CMakeFiles/pybind11_tests.dir/test_class.cpp.o
      /mounted_pybind11/tests/test_class.cpp(53): error: more than one instance of overloaded function "pybind11::class_<type_, options...>::def [with type_=test_class::pr4220_tripped_over_this::Empty0, options=<>]" matches the argument list:
                  function template "pybind11::class_<test_class::pr4220_tripped_over_this::Empty0> &pybind11::class_<type_, options...>::def(const char *, Func &&, const Extra &...) [with type_=test_class::pr4220_tripped_over_this::Empty0, options=<>]"
      /mounted_pybind11/include/pybind11/pybind11.h(1557): here
                  function template "pybind11::class_<test_class::pr4220_tripped_over_this::Empty0> &pybind11::class_<type_, options...>::def(const T &, const Extra &...) [with type_=test_class::pr4220_tripped_over_this::Empty0, options=<>]"
      /mounted_pybind11/include/pybind11/pybind11.h(1586): here
                  argument types are: (const char [8], <unknown-type>)
                  object type is: pybind11::class_<test_class::pr4220_tripped_over_this::Empty0>
      
      1 error detected in the compilation of "/mounted_pybind11/tests/test_class.cpp".
      ```
      Ralf W. Grosse-Kunstleve committed
  2. 07 Oct, 2022 3 commits
  3. 06 Oct, 2022 1 commit
  4. 04 Oct, 2022 2 commits
  5. 03 Oct, 2022 1 commit
  6. 27 Sep, 2022 1 commit
  7. 25 Sep, 2022 1 commit
  8. 21 Sep, 2022 2 commits
  9. 20 Sep, 2022 2 commits
  10. 19 Sep, 2022 1 commit
  11. 14 Sep, 2022 2 commits
  12. 13 Sep, 2022 1 commit
  13. 07 Sep, 2022 1 commit
  14. 30 Aug, 2022 3 commits
  15. 24 Aug, 2022 2 commits
  16. 21 Aug, 2022 1 commit
    • embed.h Python 3.11 `config.use_environment=1` + `PYTHONPATH` test (#4119) · 68e6fdaa
      * Add debug fprintf to test_interpreter.cpp
      
      * Update `sys.path` from `PYTHONPATH` in Python >= 3.11 branch of `initialize_interpreter()`
      
      * Use `config.isolated = 0; config.use_environment = 1;`
      
      As suggsted by @vstinner here: https://github.com/pybind/pybind11/pull/4119#issuecomment-1219442853
      
      * Add `TEST_CASE("PYTHONPATH is used to update sys.path")`
      
      * Fix clang-tidy error.
      
      * Use `_putenv_s()` under Windows.
      
      * Fix clang-tidy error: argument name ... in comment does not match parameter name
      
      * Remove slash from PYTHONPATH addition, to work around Windows slash-vs-backslash issue.
      
      * Use `py::str(...)` instead of `.attr("__str__")` as suggested by @skylion007
      
      Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
      
      Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
      Ralf W. Grosse-Kunstleve committed
  17. 20 Aug, 2022 1 commit
  18. 12 Aug, 2022 1 commit
  19. 11 Aug, 2022 1 commit
  20. 09 Aug, 2022 3 commits
  21. 08 Aug, 2022 2 commits
  22. 05 Aug, 2022 1 commit
  23. 03 Aug, 2022 1 commit
  24. 01 Aug, 2022 4 commits
  25. 29 Jul, 2022 1 commit