1. 06 Sep, 2023 2 commits
  2. 18 Aug, 2023 1 commit
  3. 17 Aug, 2023 1 commit
  4. 15 Aug, 2023 2 commits
  5. 11 Aug, 2023 2 commits
    • Copy pybind11_protobuf/.pre-commit-config.yaml to pybind11_abseil/.pre-commit-config.yaml · 41f3de4d
      This is to help with whitespace cleanup in the cmake files currently under development under https://github.com/pybind/pybind11_abseil/pull/7
      
      PiperOrigin-RevId: 556026304
      Ralf W. Grosse-Kunstleve committed
    • Resolve pybind11 deprecation warning. · e01527cd
      Observed while locally testing https://github.com/pybind/pybind11_abseil/pull/7:
      
      ```
      In file included from /usr/local/google/home/rwgk/forked/pybind11_abseil/pybind11_abseil/tests/absl_example.cc:23:
      /usr/local/google/home/rwgk/forked/pybind11_abseil/pybind11_abseil/absl_casters.h: In member function ‘bool pybind11::detail::type_caster<absl::lts_20211102::Duration>::load(pybind11::handle, bool)’:
      /usr/local/google/home/rwgk/forked/pybind11_abseil/pybind11_abseil/absl_casters.h:194:48: warning: ‘bool pybind11::handle::operator==(const pybind11::handle&) const’ is deprecated: Use obj1.is(obj2) instead [-Wdeprecated-declarations]
        194 |     if (src == object(py_duration_t.attr("max"))) {
            |                                                ^
      In file included from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/detail/type_caster_base.h:12,
                       from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/cast.h:15,
                       from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/attr.h:14,
                       from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/detail/class.h:1,
                       from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/pybind11.h:13,
                       from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/complex.h:12,
                       from /usr/local/google/home/rwgk/forked/pybind11_abseil/pybind11_abseil/tests/absl_example.cc:6:
      /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/pytypes.h:290:10: note: declared here
        290 |     bool operator==(const handle &h) const { return m_ptr == h.m_ptr; }
            |          ^~~~~~~~
      ```
      
      PiperOrigin-RevId: 555974032
      Ralf W. Grosse-Kunstleve committed
  6. 09 Aug, 2023 1 commit
  7. 04 Aug, 2023 1 commit
  8. 31 Jul, 2023 2 commits
  9. 03 Jul, 2023 1 commit
  10. 30 Jun, 2023 1 commit
  11. 06 Jun, 2023 1 commit
    • Change pybind11_abseil `absl::Time` to-python conversion to return a datetime… · afa0489d
      Change pybind11_abseil `absl::Time` to-python conversion to return a datetime object with UTC timezone.
      
      The original motivation for this change was to achieve compatibility with absl/python behavior (currently only used Google-internally), but it is a good change in its own right: `absl::Time` does not carry any timezone information, using the local timezone in the to-python conversion is far more complicated than using the UTC timezone, in particular because
      
      1. it makes the to-python conversion dependent on zoneinfo or equivalent.
      
      2. potentially (and confusingly) 3 instead of 2 timezones can appear in a from-python - to-python conversion roundtrip, e.g. starting with a non-local timezone in Python, implicit UTC timezone in C++, then the local timezone when converted back to Python.
      
      If this CL causes a breakage
      ----------------------------
      
      The most likely root cause is a latent inconistency/bug in handling timezones, most notably due to a "naive" datetime object in the mix:
      
      * https://docs.python.org/3/library/datetime.html#aware-and-naive-objects
      
      In such a case, callers need to be updated to pass "aware" datetime objects instead. In the general case, this is the only way to ensure system-wide consistency. As a side-effect, such fixes are likely to prevent or resolve issues during DST transitions.
      
      PiperOrigin-RevId: 538240189
      Ralf W. Grosse-Kunstleve committed
  12. 24 May, 2023 1 commit
  13. 18 May, 2023 2 commits
  14. 16 May, 2023 3 commits
  15. 04 May, 2023 1 commit
    • Make `absl::Time` from-python conversion (almost) identical to a Google-internal… · 1caf1890
      Make `absl::Time` from-python conversion (almost) identical to a Google-internal implementation under absl/python.
      
      Note that the unit tests are unchanged (in the entire Google codebase).
      
      The remaining very subtle differences between `type_caster<absl::Time>::load()` and the corresponding from-python conversion under absl/python are related to the pybind11 two-pass overload resolution feature that does not exist in PyCLIF.
      
      As a side-effect, this change removes long-obsolete remnants of Python 2 support.
      
      PiperOrigin-RevId: 529457660
      Ralf W. Grosse-Kunstleve committed
  16. 03 May, 2023 2 commits
  17. 24 Apr, 2023 1 commit
  18. 19 Apr, 2023 1 commit
  19. 14 Apr, 2023 1 commit
  20. 30 Mar, 2023 1 commit
  21. 29 Mar, 2023 1 commit
  22. 28 Feb, 2023 1 commit
  23. 13 Feb, 2023 1 commit
  24. 10 Feb, 2023 1 commit
  25. 09 Feb, 2023 1 commit
  26. 08 Feb, 2023 1 commit
  27. 01 Feb, 2023 1 commit
  28. 06 Jan, 2023 1 commit
  29. 20 Dec, 2022 1 commit
    • [NumPy] Remove references to deprecated NumPy type aliases. · 33b5c7d4
      This change replaces references to a number of deprecated NumPy type aliases (np.bool, np.int, np.float, np.complex, np.object, np.str) with their recommended replacement (bool, int, float, complex, object, str).
      
      NumPy 1.24 drops the deprecated aliases, so we must remove uses before updating NumPy.
      
      PiperOrigin-RevId: 496626719
      Peter Hawkins committed
  30. 13 Dec, 2022 1 commit
  31. 06 Dec, 2022 1 commit
  32. 05 Dec, 2022 1 commit