1. 21 Mar, 2017 1 commit
    • Dean Moldovan's avatar
      Throw an exception when attempting to load an incompatible holder · cd3d1fc7
      Dean Moldovan authored
      Instead of a segfault. Fixes #751.
      
      This covers the case of loading a custom holder from a default-holder
      instance. Attempting to load one custom holder from a different custom
      holder (i.e. not `std::unique_ptr`) yields undefined behavior, just as
      #588 established for inheritance.
      cd3d1fc7
  2. 19 Mar, 2017 2 commits
    • Jason Rhinelander's avatar
      Error message wording tweak · 0f5ec0a8
      Jason Rhinelander authored
      py::arg() doesn't only specify named arguments anymore, so the error
      message was misleading (e.g. when using `py::arg().noconvert()` and
      forgetting `py::arg()` for a second positional argument).
      0f5ec0a8
    • Jason Rhinelander's avatar
      Added minimum compiler version assertions · 5a924787
      Jason Rhinelander authored
      We now require (and enforce at compile time):
      - GCC 4.8+
      - clang 3.3+ (5.0+ for Apple's renumbered clang)
      - MSVC 2015u3+
      - ICC 15+
      
      This also updates the versions listed in the README, and removes a
      now-redundant MSVC version check.
      5a924787
  3. 18 Mar, 2017 1 commit
  4. 17 Mar, 2017 5 commits
    • Jason Rhinelander's avatar
      Fail to compile with MI via class_ ctor parameters · b961626c
      Jason Rhinelander authored
      We can't support this for classes from imported modules (which is the
      primary purpose of a ctor argument base class) because we *have* to
      have both parent and derived to properly extract a multiple-inheritance
      base class pointer from a derived class pointer.
      
      We could support this for actual `class_<Base, ...> instances, but since
      in that case the `Base` is already present in the code, it seems more
      consistent to simply always require MI to go via template options.
      b961626c
    • Jason Rhinelander's avatar
      Use C++17 fold expression macro · d51acb68
      Jason Rhinelander authored
      This puts the fold expressions behind the feature macro instead of a
      general C++17 macro.
      
      It also adds a fold expression optimization to constexpr_sum (guarded
      by the same feature macro).
      d51acb68
    • Jason Rhinelander's avatar
      Eigen: don't require conformability on length-1 dimensions · efa8726f
      Jason Rhinelander authored
      Fixes #738
      
      The current check for conformability fails when given a 2D, 1xN or Nx1
      input to a row-major or column-major, respectively, Eigen::Ref, leading
      to a copy-required state in the type_caster, but this later failed
      because the copy was also non-conformable because it had the same shape
      and strides (because a 1xN or Nx1 is both F and C contiguous).
      
      In such cases we can safely ignore the stride on the "1" dimension since
      it'll never be used: only the "N" dimension stride needs to match the
      Eigen::Ref stride, which both fixes the non-conformable copy problem,
      but also avoids a copy entirely as long as the "N" dimension has a
      compatible stride.
      efa8726f
    • Jean-Michaël Celerier's avatar
      Use custom definitions for negation and bool_constant (#737) · 68e089a8
      Jean-Michaël Celerier authored
      Instead of relying on sometimes missing C++17 definitions
      68e089a8
    • Jason Rhinelander's avatar
      Add VS 2017 build, and bump conda to 3.6 · cabbf610
      Jason Rhinelander authored
      This adds VS 2017 to the build matrix, plus various other small
      appveyor build changes:
      
      - conda version bumped from 3.5 to 3.6
      - build newer versions/architectures/python first (i.e. VS2017/x64/3.6
        is the first build, VS2015/x86/2.7 is the last)
      - stop building after a job failure: often a build failure in one
        occurs everywhere; this just stops processing jobs (freeing them up
        for other PRs) if an error is hit.
      
      Annoyingly, appveyor doesn't allow excluding tests: i.e. the test matrix
      is always dense (appveyor issue 386), so for now we'll just run
      everything.  (Once appveyor issue 386 is resolved, we can come back and
      cut this down to 4-5 builds).
      cabbf610
  5. 16 Mar, 2017 2 commits
  6. 15 Mar, 2017 1 commit
  7. 14 Mar, 2017 3 commits
  8. 13 Mar, 2017 3 commits
  9. 12 Mar, 2017 4 commits
    • Jason Rhinelander's avatar
      Add MSVC 2017 cpp_function ICE workaround · 2d965d43
      Jason Rhinelander authored
      The `decltype(...)` in the template parameter that gives us SFINAE
      matching for a lambda makes MSVC 2017 ICE; this works around if by
      changing the test to an explicit not-a-function-or-pointer test, which
      seems to work everywhere.
      2d965d43
    • Dean Moldovan's avatar
      Fix readthedocs build (#721) · b7017c3d
      Dean Moldovan authored
      RTD updated their build environment which broke the 1.8.14.dev build of
      doxygen that we were using. The update also breaks the conda-forge build
      of 1.8.13 (but that version has other issues).
      
      Luckily, the RTD update did bring their doxygen version up to 1.8.11
      which is enough to parse the C++11 code we need (ref qualifiers) and it
      also avoids the segfault found in 1.8.13.
      
      Since we're using the native doxygen, conda isn't required anymore and
      we can simplify the RTD configuration.
      
      [skip ci]
      b7017c3d
    • Jason Rhinelander's avatar
      Call PyUnicode_DecodeUTF* directly · ee929639
      Jason Rhinelander authored
      Some versions of Python 2.7 reportedly (#713) have issues with
      PyUnicode_Decode being passed the encoding string, so just skip it
      entirely by calling the PyUnicode_DecodeUTF* function directly.  This
      will also be slightly more efficient by avoiding having to check the
      encoding string, and (for python 2) going through the unicode class's
      decode (python 3 fast-tracks this for all utf-{8,16,32} encodings;
      python 2 only fast-tracked for the exact string "utf-8", which we
      weren't passing anyway (we had "utf8")).
      
      This doesn't work for PyPy, however: its `PyUnicode_DecodeUTF{8,16,32}`
      appear rather broken: the UTF8 one segfaults, while the 16/32 require
      recasting into a non-const `char *` (and might segfault; I didn't get
      far enough to find out).  Just avoid the whole thing by keeping the
      encoding-passed-as-string version for PyPy, which seems to work
      reliably.
      ee929639
    • Jason Rhinelander's avatar
      Fix for floating point durations · e5456c22
      Jason Rhinelander authored
      The duration calculation was using %, but that's only supported on
      duration objects when the arithmetic type supports %, and hence fails
      for floats.  Fixed by subtracting off the calculated values instead.
      e5456c22
  10. 10 Mar, 2017 3 commits
    • Jason Rhinelander's avatar
      Add failure-allowed clang-4.0/libc++-4.0 build · 28a837a0
      Jason Rhinelander authored
      This adds a linux docker clang 4.0 with libc++ and c++1z build.
      28a837a0
    • Dean Moldovan's avatar
      Minor pytest maintenance (#702) · d47febcb
      Dean Moldovan authored
      * Add `pytest.ini` config file and set default options there instead of
        in `CMakeLists.txt` (command line arguments).
      
      * Change all output capture from `capfd` (filedescriptors) to `capsys`
        (Python's `sys.stdout` and `sys.stderr`). This avoids capturing
        low-level C errors, e.g. from the debug build of Python.
      
      * Set pytest minimum version to 3.0 to make it easier to use new
        features. Removed conditional use of `excinfo.match()`.
      
      * Clean up some leftover function-level `@pytest.requires_numpy`.
      d47febcb
    • Jason Rhinelander's avatar
      Use trusty for travis-ci pypy build (#716) · 303ee29d
      Jason Rhinelander authored
      Nightlies for pypy no longer run on Ubuntu 12.04; change the pypy build
      distribution to the travis-ci trusty (i.e. 14.04) beta container.
      
      The pypy build was also installing numpy and scipy for the *system*
      python version, which was pointless; this also adds a guard to the
      eigen/numpy/scipy install code with a !PYPY check.
      303ee29d
  11. 08 Mar, 2017 1 commit
    • Jason Rhinelander's avatar
      Fix extra docstring newlines under `options.disable_function_signatures()` · 10d13048
      Jason Rhinelander authored
      When using pybind::options to disable function signatures, user-defined
      docstrings only get appended if they exist, but newlines were getting
      appended unconditionally, so the docstring could end up with blank lines
      (depending on which overloads, in particular, provided docstrings).
      
      This commit suppresses the empty lines by only adding newlines for
      overloads when needed.
      10d13048
  12. 06 Mar, 2017 1 commit
  13. 04 Mar, 2017 2 commits
  14. 03 Mar, 2017 2 commits
  15. 01 Mar, 2017 1 commit
    • eirrgang's avatar
      fix python version check (#705) · 11c9f32c
      eirrgang authored
      Commit 11a337f1 added major and minor python version
      checking to cast.h but does not use the macros defined
      via the Python.h inclusion. This may be due to an
      intention to use the variables defined by the cmake
      module FindPythonInterpreter, but nothing in the
      pybind11 repo does anything to convert the cmake
      variables to preprocessor defines.
      11c9f32c
  16. 28 Feb, 2017 1 commit
  17. 27 Feb, 2017 2 commits
  18. 26 Feb, 2017 5 commits