1. 05 Oct, 2020 1 commit
  2. 03 Oct, 2020 3 commits
    • Fritz Reese's avatar
      Fix buffer_info for ctypes buffers (pybind#2502) (#2503) · e8ad33bb
      Fritz Reese authored
      * tests: New test for ctypes buffers (pybind#2502)
      
      * fix: fix buffer_info segfault on views with no stride (pybind11#2502)
      
      * Explicit conversions in buffer_info to make clang happy (pybind#2502)
      
      * Another explicit cast in buffer_info constructor for clang (pybind#2502)
      
      * Simpler implementation of buffer_info constructor from Py_buffer.
      
      * Move test_ctypes_buffer into test_buffers
      
      * Comment on why view->strides may be NULL (and fix some whitespace)
      
      * Use c_strides() instead of zero when view->strides is NULL.
      
      c_strides and f_strides are moved from numpy.h (py::array)
      to buffer_info.h (py::detail) so they can be used from the
      buffer_info Py_buffer constructor.
      
      * Increase ctypes buffer test coverage in test_buffers.
      
      * Split ctypes tests and skip one which is broken in PyPy2.
      e8ad33bb
    • Henry Schreiner's avatar
      refactor: module -> module_ with typedef (#2544) · 6bcd220c
      Henry Schreiner authored
      * WIP: module -> module_ without typedef
      
      * refactor: allow py::module to work again
      6bcd220c
    • Henry Schreiner's avatar
      refactor: import check as a common function (#2526) · 3488494a
      Henry Schreiner authored
      * feat: import check as a common function
      
      * docs: add cmake to docs
      3488494a
  3. 02 Oct, 2020 6 commits
  4. 22 Sep, 2020 1 commit
  5. 19 Sep, 2020 2 commits
  6. 17 Sep, 2020 4 commits
  7. 16 Sep, 2020 1 commit
    • Henry Schreiner's avatar
      feat: setup.py redesign and helpers (#2433) · fd61f503
      Henry Schreiner authored
      * feat: setup.py redesign and helpers
      
      * refactor: simpler design with two outputs
      
      * refactor: helper file update and Windows support
      
      * fix: review points from @YannickJadoul
      
      * refactor: fixes to naming and more docs
      
      * feat: more customization points
      
      * feat: add entry point pybind11-config
      
      * refactor: Try Extension-focused method
      
      * refactor: rename alt/inplace to global
      
      * fix: allow usage with git modules, better docs
      
      * feat: global as an extra (@YannickJadoul's suggestion)
      
      * feat: single version location
      
      * fix: remove the requirement that setuptools must be imported first
      
      * fix: some review points from @wjacob
      
      * fix: use .in, add procedure to docs
      
      * refactor: avoid monkeypatch copy
      
      * docs: minor typos corrected
      
      * fix: minor points from @YannickJadoul
      
      * fix: typo on Windows C++ mode
      
      * fix: MSVC 15 update 3+ have c++14 flag
      
      See <https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019>
      
      * docs: discuss making SDists by hand
      
      * ci: use pep517.build instead of manual setup.py
      
      * refactor: more comments from @YannickJadoul
      
      * docs: updates from @ktbarrett
      
      * fix: change to newly recommended tool instead of pep517.build
      
      This was intended as a proof of concept; build seems to be the correct replacement.
      
      See https://github.com/pypa/pep517/pull/83
      
      * docs: updates from @wjakob
      
      * refactor: dual version locations
      
      * docs: typo spotted by @wjakob
      fd61f503
  8. 15 Sep, 2020 9 commits
  9. 14 Sep, 2020 1 commit
    • Henry Schreiner's avatar
      feat: py::type::of<T>() and py::type::of(h) (#2364) · f12ec00d
      Henry Schreiner authored
      * feat: type<T>()
      
      * refactor: using py::type as class
      
      * refactor: py::object as base
      
      * wip: tigher api
      
      * refactor: fix conversion and limit API further
      
      * docs: some added notes from @EricCousineau-TRI
      
      * refactor: use py::type::of
      f12ec00d
  10. 13 Sep, 2020 1 commit
  11. 12 Sep, 2020 1 commit
    • andriish's avatar
      fix: support NVIDIA-PGI HPC SDK (#2475) · 38370a87
      andriish authored
      
      
      * Added guards to the includes
      
      Added new CI config
      
      Added new trigger
      
      Changed CI workflow name
      
      Debug CI
      
      Debug CI
      
      Debug CI
      
      Debug CI
      
      Added flags fro PGI
      
      Disable Eigen
      
      Removed tests that fail
      
      Uncomment lines
      
      * fix: missing include
      
      fix: minor style cleanup
      
      tests: support skipping
      
      ci: remove and tighten a bit
      
      fix: try msvc workaround for pgic
      
      * tests: split up prealoc tests
      
      * fix: PGI compiler fix
      
      * fix: PGI void_t only
      
      * fix: try to appease nvcc
      
      * ci: better ordering for slow tests
      
      * ci: minor improvements to testing
      
      * ci: Add NumPy to testing
      
      * ci: Eigen generates CUDA warnings / PGI errors
      
      * Added CentOS7 back for a moment
      
      * Fix YAML
      
      * ci: runs-on missing
      
      * centos7 is missing pytest
      
      * ci: use C++11 on CentOS 7
      
      * ci: test something else
      
      * Try just adding flags on CentOS 7
      
      * fix: CentOS 7
      
      * refactor: move include to shared location
      
      * Added verbose flag
      
      * Try to use system cmake3 on CI
      
      * Try to use system cmake3 on CI, attempt2
      
      * Try to use system cmake3 on CI, attempt3
      
      * tests: not finding pytest should be a warning, not a fatal error
      
      * tests: cleanup
      
      * Weird issue?
      
      * fix: final polish
      Co-authored-by: default avatarAndrii Verbytskyi <andrii.verbytskyi@mpp.mpg.de>
      Co-authored-by: default avatarHenry Schreiner <henryschreineriii@gmail.com>
      Co-authored-by: default avatarAndrii Verbytskyi <averbyts@cern.ch>
      38370a87
  12. 11 Sep, 2020 1 commit
    • Yannick Jadoul's avatar
      Add check if `str(handle)` correctly converted the object, and throw... · fe9ee86b
      Yannick Jadoul authored
      Add check if `str(handle)` correctly converted the object, and throw py::error_already_set if not (bis) (#2477)
      
      * Add check if `str(handle)` correctly converted the object, and throw py::error_already_set if not
      
      * Fix tests on Python 3
      
      * Apply @rwgk's fixes to cherry-picked commits from #2392
      fe9ee86b
  13. 10 Sep, 2020 2 commits
  14. 08 Sep, 2020 1 commit
  15. 05 Sep, 2020 1 commit
    • Henry Schreiner's avatar
      feat: py::pos_only (#2459) · 0dbda6e8
      Henry Schreiner authored
      * feat: py::pos_only
      
      * fix: review points from @YannickJadoul
      
      * fix: review points from @bstaletic
      
      * refactor: kwonly -> kw_only
      0dbda6e8
  16. 04 Sep, 2020 1 commit
  17. 31 Aug, 2020 1 commit
  18. 28 Aug, 2020 2 commits
    • Ralf W. Grosse-Kunstleve's avatar
      Fixing `pybind11::bytes()` ambiguous conversion issue. · 3c061f21
      Ralf W. Grosse-Kunstleve authored
      Adding missing `bytes` type to `test_constructors()`, to exercise the code change.
      
      The changes in the PR were cherry-picked from PR #2409 (with a very minor
      modification in test_pytypes.py related to flake8). Via PR #2409, these
      changes were extensively tested in the Google environment, as summarized here:
      https://docs.google.com/document/d/1TPL-J__mph_yHa1quDvsO12E_F5OZnvBaZlW9IIrz8M/
      The changes in this PR did not cause an issues at all.
      
      Note that `test_constructors()` before this PR passes for Python 2 only
      because `pybind11::str` can hold `PyUnicodeObject` or `PyBytesObject`. As a
      side-effect of this PR, `test_constructors()` no longer relies on this
      permissive `pybind11::str` behavior. However, the permissive behavior is still
      exercised/exposed via the existing `test_pybind11_str_raw_str()`.
      
      The test code change is designed to enable easy removal later, when Python 2
      support is dropped.
      
      For completeness: confusingly, the non-test code changes travelled through PR
      
      Example `ambiguous conversion` error fixed by this PR:
      ```
      pybind11/tests/test_pytypes.cpp:214:23: error: ambiguous conversion for functional-style cast from 'pybind11::detail::item_accessor' (aka 'accessor<accessor_policies::generic_item>') to 'py::bytes'
                  "bytes"_a=py::bytes(d["bytes"]),
                            ^~~~~~~~~~~~~~~~~~~~
      pybind11/include/pybind11/detail/../pytypes.h:957:21: note: candidate constructor
          PYBIND11_OBJECT(bytes, object, PYBIND11_BYTES_CHECK)
                          ^
      pybind11/include/pybind11/detail/../pytypes.h:957:21: note: candidate constructor
      pybind11/include/pybind11/detail/../pytypes.h:987:15: note: candidate constructor
      inline bytes::bytes(const pybind11::str &s) {
                    ^
      1 error generated.
      ```
      3c061f21
    • Yannick Jadoul's avatar
      Fix bug roundtripping datetime.time objects after midnight in eastern... · 6a192781
      Yannick Jadoul authored
      Fix bug roundtripping datetime.time objects after midnight in eastern hemisphere timezones (#2417) (#2438)
      
      * Fix bug roundtripping datetime.time objects after midnight in eastern hemisphere timezones (#2417)
      
      * tests: check more timezones
      
      * Fix review remarks: remove useless comment and skip setting TZ environment variable on Windows
      6a192781
  19. 26 Aug, 2020 1 commit