- 18 Apr, 2017 5 commits
-
-
We currently fail at runtime when trying to call a method that is overloaded with both static and non-static methods. This is something python won't allow: the object is either a function or an instance, and can't be both.
Jason Rhinelander committed -
Adding numpy to the pypy test exposed a segfault caused by the buffer tests in test_stl_binders.py: the first such test was explicitly skipped on pypy, but the second (test_vector_buffer_numpy) which also seems to cause an occasional segfault was just marked as requiring numpy. Explicitly skip it on pypy as well (until a workaround, fix, or pypy fix are found).
Jason Rhinelander committed -
Various bash variables that are only used in the travis-ci script and don't need to propagate (e.g. to cmake) are being pointlessly exported; this removes these `export`s.
Jason Rhinelander committed -
This uses the trusty container rather than docker for the clang 4.0 build. It also caches the local libc++ installation so that it doesn't need to be compiled every time, which should speed up the job considerably.
Jason Rhinelander committed -
This applies several changes to the non-docker travis-ci builds: - Make all builds use trusty rather than precise. pybind can't really build in precise anyway (we install essentially the entire toolchain backported from trusty on every build), and so this saves needing to install all the backported packages during the build setup. - Updated the 3.5 build to 3.6 (via deadsnakes, which didn't backport 3.6 to ubuntu releases earlier than trusty). - As a result of the switch to trusty, the BAREBONES build now picks up the (default installed) python 3.5 installation. - Invoke pip everywhere via $PYTHON -m pip rather than the pip executable, which saves us having to figure out what the pip executable is, and ensures that we are using the correct pip. - Install packages with `pip --user` rather than in a virtualenv. - Add the local user python package archive to the travis-ci cache (rather than the pip cache). This saves needing to install packages during installation (unless there are updates, in which case the package and the cache are updated). - Install numpy and scipy on the pypy build. This has to build from source (and so blas and fortran need to be installed on the build), but given the above caching, the build will only be slow for the first build after a new numpy/scipy release. This testing is valuable: numpy has various behaviour differences under pypy. - Added set -e/+e around the before_install/install blocks so that a failure here (e.g. a pip install failure or dependency download failure) triggers a build failure. - Update eigen version to latest (3.3.3), mainly to be consistent with the appveyor build. - The travis trusty environment has an upgraded cmake, so this downgrades cmake (to the stock trusty version) on the first couple jobs so that we're still including some cmake 2.8.12 testing.
Jason Rhinelander committed
-
- 17 Apr, 2017 1 commit
-
-
While builds are randomly failing, fast_finish is counterproductive. Will reenable this once appveyor stabilizes.
Jason Rhinelander committed
-
- 15 Apr, 2017 1 commit
-
-
Don't try to define these in the issues submodule, because that fails if testing without issues compiled in (e.g. using cmake -DPYBIND11_TEST_OVERRIDE=test_methods_and_attributes.cpp).
Jason Rhinelander committed
-
- 14 Apr, 2017 1 commit
-
-
5f383862 accidentally dropped setting buffer_info.view, resulting in the buffer never being released (because view was always nullptr).
Jason Rhinelander committed
-
- 13 Apr, 2017 4 commits
-
-
This further reduces the constructors required in buffer_info/numpy by removing the need for the constructors that take a single size_t and just forward it on via an initializer_list to the container-accepting constructor. Unfortunately, in `array` one of the constructors runs into an ambiguity problem with the deprecated `array(handle, bool)` constructor (because both the bool constructor and the any_container constructor involve an implicit conversion, so neither has precedence), so a forwarding constructor is kept there (until the deprecated constructor is eventually removed).
Jason Rhinelander committed -
This adds support for constructing `buffer_info` and `array`s using arbitrary containers or iterator pairs instead of requiring a vector. This is primarily needed by PR #782 (which makes strides signed to properly support negative strides, and will likely also make shape and itemsize to avoid mixed integer issues), but also needs to preserve backwards compatibility with 2.1 and earlier which accepts the strides parameter as a vector of size_t's. Rather than adding nearly duplicate constructors for each stride-taking constructor, it seems nicer to simply allow any type of container (or iterator pairs). This works by replacing the existing vector arguments with a new `detail::any_container` class that handles implicit conversion of arbitrary containers into a vector of the desired type. It can also be explicitly instantiated with a pair of iterators (e.g. by passing {begin, end} instead of the container).Jason Rhinelander committed -
Upcoming changes to buffer_info make it need some things declared in common.h; it also feels a bit misplaced in common.h (which is arguably too large already), so move it out. (Separating this and the subsequent changes into separate commits to make the changes easier to distinguish from the move.)
Jason Rhinelander committed -
When attempting to get a raw array pointer we return nullptr if given a nullptr, which triggers an error_already_set(), but we haven't set an exception message, which results in "Unknown internal error". Callers that want explicit allowing of a nullptr here already handle it (by clearing the exception after the call).
Jason Rhinelander committed
-
- 12 Apr, 2017 1 commit
-
-
When processing many files that contain top-level items with the same name (e.g. "operator<<"), the output was non-deterministic and depended on the order in which the different Clang processes finished. This commit adds sorting that also accounts for the filename to prevent random changes from run to run.
Wenzel Jakob committed
-
- 11 Apr, 2017 1 commit
-
- 10 Apr, 2017 1 commit
-
-
The 3.3.2 changelog indicates it has some VS 2017 fixes. Updating to see if that avoids the random build failures.
Jason Rhinelander committed
-
- 09 Apr, 2017 2 commits
-
-
/m also doesn't seem to have made the builds any faster.
Jason Rhinelander committed -
Many of the Eigen type casters' name() methods weren't wrapping the type description in a `type_descr` object, which thus wasn't adding the "{...}" annotation used to identify an argument which broke the help output by skipping eigen arguments. The test code I had added even had some (unnoticed) broken output (with the "arg0: " showing up in the return value). This commit also adds test code to ensure that named eigen arguments actually work properly, despite the invalid help output. (The added tests pass without the rest of this commit).Jason Rhinelander committed
-
- 08 Apr, 2017 2 commits
-
-
The holder casters assume but don't check that a `holder<type>`'s `type` is really a `type_caster_base<type>`; this adds a static_assert to make sure this is really the case, to turn things like `std::shared_ptr<array>` into a compilation failure. Fixes #785
Jason Rhinelander committed -
The gcc versions in Debian stretch (gcc 6) and experimental (gcc 7) incorporate the upstream gcc fixes.
Jason Rhinelander committed
-
- 07 Apr, 2017 2 commits
-
-
Fixes #775. Assignments of the form `Type.static_prop = value` should be translated to `Type.static_prop.__set__(value)` except when `isinstance(value, static_prop)`.
Dean Moldovan committed -
Wenzel Jakob committed
-
- 06 Apr, 2017 3 commits
-
-
PR #771 deprecated them as they can cause linking failures (#770), but the deprecation tags cause warnings on GCC 5.x through 6.2.x. Removing them entirely will break backwards-compatibility consequences, but the effects should be minimal (only code that was inheriting from `object` could get at them at all as they are protected). Fixes #777
Jason Rhinelander committed -
Besides appearing in the CMake GUI, the `:FILENAME` specifier changes behavior as well: cmake -DPYTHON_EXECUTABLE=python .. # FAIL, can't find python cmake -DPYTHON_EXECUTABLE=/path/to/python .. # OK cmake -DPYTHON_EXECUTABLE:FILENAME=python .. # OK cmake -DPYTHON_EXECUTABLE:FILENAME=/path/to/python .. # OK
Dean Moldovan committed -
AppVeyor just added support for excluding specific jobs; thhis commit cuts the number of builds down to 6 from 8 by eliminating the VS2015 x86 builds.
Jason Rhinelander committed
-
- 05 Apr, 2017 3 commits
-
-
Ivan Smirnov committed
-
When make_tuple fails (for example, when print() is called with a non-convertible argument, as in #778) the error message a less helpful than it could be: make_tuple(): unable to convert arguments of types 'std::tuple<type1, type2>' to Python object There is no actual std::tuple involved (only a parameter pack and a Python tuple), but it also doesn't immediately reveal which type caused the problem. This commit changes the debugging mode output to show just the problematic type: make_tuple(): unable to convert argument of type 'type2' to Python objectJason Rhinelander committed -
My group now has a subscription to AppVeyor pro, which also permits running parallel builds on the open source projects.
Wenzel Jakob committed
-
- 02 Apr, 2017 3 commits
-
-
Dean Moldovan committed
-
```c++ m.def("foo", foo, py::call_guard<T>()); ``` is equivalent to: ```c++ m.def("foo", [](args...) { T scope_guard; return foo(args...); // forwarded arguments }); ```Dean Moldovan committed -
This commit adds `error_already_set::matches()` convenience method to check if the exception trapped by `error_already_set` matches a given Python exception type. This will address #700 by providing a less verbose way to check exceptions.
Roman Miroshnychenko committed
-
- 01 Apr, 2017 1 commit
-
-
Sylvain Corlay committed
-
- 30 Mar, 2017 2 commits
-
-
Wenzel Jakob committed
-
Wenzel Jakob committed
-
- 28 Mar, 2017 2 commits
-
-
* Support raw string literals as input for py::eval * Dedent only when needed
Dean Moldovan committed -
The constexpr static instances can cause linking failures if the compiler doesn't optimize away the reference, as reported in #770. There's no particularly nice way of fixing this in C++11/14: we can't inline definitions to match the declaration aren't permitted for non-templated static variables (C++17 *does* allows "inline" on variables, but that obviously doesn't help us.) One solution that could work around it is to add an extra inherited subclass to `object`'s hierarchy, but that's a bit of a messy solution and was decided against in #771 in favour of just deprecating (and eventually dropping) the constexpr statics. Fixes #770.
Jason Rhinelander committed
-
- 26 Mar, 2017 1 commit
-
-
Jason Rhinelander committed
-
- 24 Mar, 2017 1 commit
-
-
* Arch-indep CMake packaging Since pybind11 is a header-only library, the CMake packaging does not have to carry any architecture specific checks. Without this patch, the detection of pybind11 will fail on 32-bit architectures if the project was built on a 64-bit machine and vice-versa. This fix is similar to what is applied to `Eigen` and other header-only C++ libraries.
Ghislain Antony Vaillant committed
-
- 22 Mar, 2017 3 commits
-
-
Wenzel Jakob committed
-
Wenzel Jakob committed
-
Dean Moldovan committed
-