1. 07 Feb, 2018 14 commits
    • Fix leak in var arg handling · 155cc7c4
      When using the mixed position + vararg path, pybind over inc_ref's
      the vararg positions. Printing the ref_count() of `item` before
      and after this change you see:
      
      Before change:
      
      ```
      refcount of item before assign 3
      refcount of item after assign 5
      ```
      
      After change
      ```
      refcount of item before assign 3
      refcount of item after assign 4
      ```
      Zach DeVito committed
    • Fix premature destruction of args/kwargs arguments · c715c70e
      The `py::args` or `py::kwargs` arguments aren't properly referenced
      when added to the function_call arguments list: their reference counts
      drop to zero if the first (non-converting) function call fails, which
      means they might be cleaned up before the second pass call runs.
      
      This commit adds a couple of extra `object`s to the `function_call`
      where we can stash a reference to them when needed to tie their
      lifetime to the function_call object's lifetime.
      
      (Credit to YannickJadoul for catching and proposing a fix in #1223).
      Jason Rhinelander committed
    • Silence new MSVC C++17 deprecation warnings · 3793c7ed
      In the latest MSVC in C++17 mode including Eigen causes warnings:
      
          warning C4996: 'std::unary_negate<_Fn>': warning STL4008: std::not1(),
          std::not2(), std::unary_negate, and std::binary_negate are deprecated in
          C++17. They are superseded by std::not_fn(). You can define
          _SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING or
          _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have
          received this warning.
      
      This disables 4996 for the Eigen includes.
      
      Catch generates a similar warning for std::uncaught_exception, so
      disable the warning there, too.
      
      In both cases this is temporary; we can (and should) remove the warnings
      disabling once new upstream versions of Eigen and Catch are available
      that address the warning. (The Catch one, in particular, looks to be
      fixed in upstream master, so will probably be fixed in the next (2.0.2)
      release).
      Jason Rhinelander committed
    • __qualname__ and nested class naming fixes (#1171) · 07dc73da
      A few fixes related to how we set `__qualname__` and how we show the
      type name in function signatures:
      
      - `__qualname__` isn't supposed to have the module name at the
      beginning, but we've been putting it there.  This removes it, while
      keeping the `Nested.Class` name chaining.
      
      - print `__module__.__qualname__` rather than `type->tp_name`; the
      latter doesn't work properly for nested classes, so we would get
      `module.B` rather than `module.A.B` for a class `B` with parent `A`.
      This also unifies the Python 3 and PyPy code.  Fixes #1166.
      
      - This now sets a `__qualname__` attribute on the type (as would happen
      in Python 3.3+) for Python <3.3, including PyPy.  While not particularly
      important to have in earlier Python versions, it's useful for us to be
      able to extracted the nested name, which is why `__qualname__` was
      invented in the first place.
      
      - Added tests for the above.
      Jason Rhinelander committed
    • Trivial typos · 09579726
      Non-user facing. 
      Found using `codespell -q 3`
      Unknown committed
    • Fix new flake8 E741 error from using `l` variable · fc8d1c76
      The just-updated flake8 package hits a bunch of:
      
          E741 ambiguous variable name 'l'
      
      warnings.  This commit renames them all from `l` to `lst` (they are all
      list values) to avoid the error.
      Jason Rhinelander committed
    • Miscellaneous travis-ci updates/fixes · fbb2ef7e
      - For the debian/buster docker build (GCC 7/C++17) install and use the
        system `catch` package; this also renames "COMPILER_PACKAGES" to
        "EXTRA_PACKAGES" since it now contains a non-compiler package.
      
      - Add a status message indicating the catch version being used for
        compiling the embedded tests
      
      - Simplify some bash code by using VAR+=" foo" to append (rather than
        VAR="${VAR} foo"
      
      - Fix CMAKE_INCLUDE_PATH appending: it was prepending the ':' but not
        the existing $CMAKE_INCLUDE_PATH value and so would end up with
        ":/eigen-path" if CMAKE_INCLUDE_PATH was already set.  (This wasn't
        bug that was actually noticed since currently nothing else sets it).
      Jason Rhinelander committed
    • Build /permissive- under VS2017 · 6519388f
      Building with the (VS2017) /permissive- flag puts the compiler into
      stricter standards-compliant mode.  It shouldn't cause the compiler to
      work differently--it just disallows some non-conforming code--so should
      be perfectly fine for the test suite under all VS2017 builds.
      
      This commit also fixes one failure under non-permissive mode.
      Jason Rhinelander committed
    • Fix 2D Nx1/1xN inputs to eigen dense vector args · a28393cf
      This fixes a bug introduced in b68959e8
      when passing in a two-dimensional, but conformable, array as the value
      for a compile-time Eigen vector (such as VectorXd or RowVectorXd).  The
      commit switched to using numpy to copy into the eigen data, but this
      broke the described case because numpy refuses to broadcast a (N,1)
      into a (N).
      
      This commit fixes it by squeezing the input array whenever the output
      array is 1-dimensional, which will let the problematic case through.
      (This shouldn't squeeze inappropriately as dimension compatibility is
      already checked for conformability before getting to the copy code).
      Jason Rhinelander committed
    • Fix `char &` arguments being non-bindable · fe1266e0
      This changes the caster to return a reference to a (new) local `CharT`
      type caster member so that binding lvalue-reference char arguments
      works (currently it results in a compilation failure).
      
      Fixes #1116
      Jason Rhinelander committed
  2. 14 Sep, 2017 2 commits
  3. 13 Sep, 2017 4 commits
  4. 12 Sep, 2017 2 commits
  5. 11 Sep, 2017 1 commit
  6. 10 Sep, 2017 4 commits
  7. 08 Sep, 2017 4 commits
  8. 07 Sep, 2017 1 commit
  9. 06 Sep, 2017 3 commits
  10. 05 Sep, 2017 1 commit
  11. 04 Sep, 2017 2 commits
  12. 01 Sep, 2017 1 commit
  13. 31 Aug, 2017 1 commit