- 02 Nov, 2017 1 commit
-
-
Non-user facing. Found using `codespell -q 3`
Unknown committed
-
- 25 Oct, 2017 1 commit
-
-
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
-
- 24 Oct, 2017 1 commit
-
-
Jason Rhinelander committed
-
- 22 Oct, 2017 2 commits
-
-
- 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 -
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
-
- 12 Oct, 2017 3 commits
-
-
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 -
When using `method_adaptor` (usually implicitly via a `cl.def("f", &D::f)`) a compilation failure results if `f` is actually a method of an inaccessible base class made public via `using`, such as: class B { public: void f() {} }; class D : private B { public: using B::f; }; pybind deduces `&D::f` as a `B` member function pointer. Since the base class is inaccessible, the cast in `method_adaptor` from a base class member function pointer to derived class member function pointer isn't valid, and a cast failure results. This was sort of a regression in 2.2, which introduced `method_adaptor` to do the expected thing when the base class *is* accessible. It wasn't actually something that *worked* in 2.1, though: you wouldn't get a compile-time failure, but the method was not callable (because the `D *` couldn't be cast to a `B *` because of the access restriction). As a result, you'd simply get a run-time failure if you ever tried to call the function (this is what #855 fixed). Thus the change in 2.2 essentially promoted a run-time failure to a compile-time failure, so isn't really a regression. This commit simply adds a `static_assert` with an accessible-base-class check so that, rather than just a cryptic cast failure, you get something more informative (along with a suggestion for a workaround). The workaround is to use a lambda, e.g.: class Derived : private Base { public: using Base::f; }; // In binding code: //cl.def("f", &Derived::f); // fails: &Derived::f is actually a base // class member function pointer cl.def("f", [](Derived &self) { return self.f(); }); This is a bit of a nuissance (especially if there are a bunch of arguments to forward), but I don't really see another solution. Fixes #1124Jason Rhinelander committed -
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
-
- 10 Oct, 2017 1 commit
-
-
* Upgrades to latest stable Xcode (9) * Fixes build error in the OS X/Python 3 build.
Henry Schreiner committed
-
- 08 Oct, 2017 1 commit
-
-
Bruce Merry committed
-
- 28 Sep, 2017 1 commit
-
-
Fixes #1117
Jason Rhinelander committed
-
- 21 Sep, 2017 1 commit
-
-
This also matches the Eigen example for the row-major case. This also enhances one of the tests to trigger a failure (and fixes it in the PR). (This isn't really a flaw in pybind itself, but rather fixes wrong code in the test code and docs).
Ansgar Burchardt committed
-
- 20 Sep, 2017 2 commits
-
-
The entire test file is already marked as requiring numpy; it isn't needed on the individual test.
Jason Rhinelander committed -
`PyArray_DescrConverter_` doesn't steal a reference to the argument, and so the passed arguments shouldn't be `.release()`d.
Jason Rhinelander committed
-
- 16 Sep, 2017 3 commits
-
-
`type_descr` is now applied only to the final signature so that it only marks the argument types, but not nested types (e.g. for tuples) or return types.
Dean Moldovan committed -
MSCV does not allow `&typeid(T)` in constexpr contexts, but the string part of the type signature can still be constexpr. In order to avoid `typeid` as long as possible, `descr` is modified to collect type information as template parameters instead of constexpr `typeid`. The actual `std::type_info` pointers are only collected in the end, as a `constexpr` (gcc/clang) or regular (MSVC) function call. Not only does it significantly reduce binary size on MSVC, gcc/clang benefit a little bit as well, since they can skip some intermediate `std::type_info*` arrays.
Dean Moldovan committed -
The current C++14 constexpr signatures don't require relaxed constexpr, but only `auto` return type deduction. To get around this in C++11, the type caster's `name()` static member functions are turned into `static constexpr auto` variables.
Dean Moldovan committed
-
- 14 Sep, 2017 1 commit
-
-
Wenzel Jakob committed
-
- 13 Sep, 2017 4 commits
-
-
When Travis changes their default Python 3.x, it breaks any hardcoded version selection. Fix: make pyenv activate everything (2.7, 3.x) and use whichever Python 3.x is on by default. [skip appveyor]
Dean Moldovan committed -
Dean Moldovan committed
-
tzh1043 committed
-
* Expand documentation to include explicit example of py::module::import where one would expect it. * Describe how to use unbound and bound methods to class Python classes. [skip ci]
jbarlow83 committed
-
- 12 Sep, 2017 2 commits
-
-
E.g. trying to convert a `list` to a `std::vector<int>` without including <pybind11/stl.h> will now raise an error with a note that suggests checking the headers. The note is only appended if `std::` is found in the function signature. This should only be the case when a header is missing. E.g. when stl.h is included, the signature would contain `List[int]` instead of `std::vector<int>` while using stl_bind.h would produce something like `MyVector`. Similarly for `std::map`/`Dict`, `complex`, `std::function`/`Callable`, etc. There's a possibility for false positives, but it's pretty low.
Dean Moldovan committed -
Gunnar Läthén committed
-
- 11 Sep, 2017 1 commit
-
-
Fixes #1069.
Dean Moldovan committed
-
- 10 Sep, 2017 4 commits
-
-
Fixes #1075. `PyNumber_Float()` and `PyNumber_Long()` return new references.
Dean Moldovan committed -
Dean Moldovan committed
-
To avoid an ODR violation in the test suite while testing both `stl.h` and `std_bind.h` with `std::vector<bool>`, the `py::bind_vector<std::vector<bool>>` test is moved to the secondary module (which does not include `stl.h`).
Dean Moldovan committed -
[skip appveyor]
Henry Schreiner committed
-
- 08 Sep, 2017 4 commits
-
-
Dean Moldovan committed
-
Dean Moldovan committed
-
This runs the most basic tests first and avoids waiting until the very end for style checks. [skip appveyor]
Dean Moldovan committed -
* Update Python 3 osx image to xcode8.3 to speed up brew install. The Python 2 osx image remains xcode7.3. * Have one osx config run in debug mode to improve coverage. * Only run CMake build tests on two configs to speed up overall build. The CMake tests take ~30 seconds on each configuration, but we really only need to them to run on two: one on Linux and one on macOS. This mirrors the recent change on AppVeyor. * Merge the style/docs/pip tests with the barebones build. * Merge 32-bit and CMake install configurations. This removes clang 3.9 from testing, but there are already 3 other clang versions being tested on Travis and the new xcode8.3 image should be close to clang 3.9. [skip appveyor]
Dean Moldovan committed
-
- 07 Sep, 2017 1 commit
-
-
[skip ci]
Dean Moldovan committed
-
- 06 Sep, 2017 3 commits
-
-
Dean Moldovan committed
-
Fixes #1061. `T` and `const T &` are compatible types.
Dean Moldovan committed -
Dean Moldovan committed
-
- 05 Sep, 2017 1 commit
-
-
Marcin Wojdyr committed
-
- 04 Sep, 2017 2 commits
-
-
Closes #1048, closes #1052. [skip ci]
Dean Moldovan committed -
[skip ci]
Patrik Huber committed
-