Commit Graph

2193 Commits

Author SHA1 Message Date
Paul Fultz II
69821d9e75
Disable testing when using BUILD_TESTING (#1682) 2020-08-18 08:34:18 -04:00
Henry Schreiner
cf0a64596e
fix: throwing repr caused a segfault (#2389)
* fix: throwing repr caused a segfault

* fixup! ci: include Python 3.9 RC1 (#2387)
2020-08-18 07:14:34 -04:00
Mosalam Ebrahimi
7dd2bdb0b3
docs: fix typo (#2405) 2020-08-18 06:46:23 -04:00
Henry Schreiner
6404099712
docs: contrib/issue templates (#2377)
* docs: move helpers to .github where allowed

* docs: more guidelines in CONTRIBUTING

* chore: update issue templates

* fix: review from @bstaletic

* refactor: a few points from @rwgk

* docs: more touchup, review changes
2020-08-17 10:14:23 -04:00
Henry Schreiner
4d9024ec71
tests: cleanup and ci hardening (#2397)
* tests: refactor and cleanup

* refactor: more consistent

* tests: vendor six

* tests: more xfails, nicer system

* tests: simplify to info

* tests: suggestions from @YannickJadoul and @bstaletic

* tests: restore some pypy tests that now pass

* tests: rename info to env

* tests: strict False/True

* tests: drop explicit strict=True again

* tests: reduce minimum PyTest to 3.1
2020-08-16 16:02:12 -04:00
James R. Barlow
3618bea2aa Add and document py::error_already_set::discard_as_unraisable()
To deal with exceptions that hit destructors or other noexcept functions.

Includes fixes to support Python 2.7 and extends documentation on
error handling.

@virtuald and @YannickJadoul both contributed to this PR.
2020-08-16 10:05:03 -07:00
Henry Schreiner
a876aac2cf
tests: loosen test, not valid on some systems (#2399) 2020-08-16 11:18:47 -04:00
Ralf W. Grosse-Kunstleve
cd85699212
Using recently added pytest.PY2 instead of str is bytes. (#2396)
Important gain: uniformity & therefore easier cleanup when we drop PY2 support.
Very slight loss: it was nice to have `str is bytes` as a reminder in this specific context.
2020-08-14 16:53:41 -04:00
Eric Cousineau
5a3ff72348
ci: Remove "Setup Boost (macOS)" step (#2395) 2020-08-14 14:16:38 -04:00
Eric Cousineau
ebdd0d368c
tests: Consolidate version (2 vs. 3) and platform (CPython vs. PyPy) checks (#2376)
Fix logic in test_bytes_to_string

Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2020-08-14 14:03:43 -04:00
Henry Schreiner
cba4a98546
ci: include Boost (#2393) 2020-08-14 12:24:58 -04:00
Michael Goulding
fb042d692f
Fix warning C26817 on copying in for (auto vh : value_and_holder(...)) (#2382)
* Fix warning C26817: Potentially expensive copy of variable 'vh' in range-for loop. Consider making it a const reference (es.71).

* Replace another instance of `for (auto vh : values_and_holders(...))` with `auto vh &` (found by @bstaletic)

Co-authored-by: Michael Goulding <Michael.Goulding@microsoft.com>
Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
2020-08-14 18:15:50 +02:00
Henry Schreiner
2e2de8c87a
fix: add missing signature (#2363)
* fix: add missing signature

* fix: add to array_t too
2020-08-13 20:13:16 -04:00
marc-chiesa
830adda850
Modified Vector STL bind initialization from a buffer type with optimization for simple arrays (#2298)
* Modified Vector STL bind initialization from a buffer type with optimization for simple arrays

* Add subtests to demonstrate processing Python buffer protocol objects with step > 1

* Fixed memoryview step test to only run on Python 3+

* Modified Vector constructor from buffer to return by value for readability
2020-08-13 22:47:23 +02:00
Henry Schreiner
1534e17e44
ci: include Python 3.9 RC1 (#2387) 2020-08-12 14:09:42 -04:00
Henry Schreiner
f7abac6689
fix: boost's include dir was listed first (#2384) 2020-08-12 09:33:08 -04:00
Ralf W. Grosse-Kunstleve
173204639e
Adding tests specifically to exercise pybind11::str::raw_str. (#2366)
These tests will also alert us to any behavior changes across Python and PyPy versions.

Hardening tests in preparation for changing `pybind11::str` to only hold `PyUnicodeObject` (NOT also `bytes`). Note that this test exposes that `pybind11::str` can also hold `bytes`.
2020-08-10 17:49:14 -07:00
Dustin Spicuzza
6f3470f757
Add robotpy-build to list of tools (#2359) 2020-08-10 16:10:45 -04:00
Henry Schreiner
0af7fe6c19
fix: typo in pybind11_add_module (#2374) 2020-08-08 17:34:38 -04:00
Henry Schreiner
227170dc2f fix: better handling of PYBIND11_CPP_STANDARD 2020-08-06 11:54:41 -04:00
Henry Schreiner
c664d55757 ci: better output / more config 2020-08-06 11:54:41 -04:00
Henry Schreiner
ed6de125c9 format: include .in files 2020-08-06 11:54:41 -04:00
Henry Schreiner
da803eb0a5 fix: duplicate target names removed 2020-08-06 11:54:41 -04:00
Henry Schreiner
df115977df chore: cleanup 2020-08-06 11:54:41 -04:00
Yannick Jadoul
3e448c0b5e
Enable py::ellipsis on Python 2 (#2360)
* Enable py::ellipsis on Python 2

* Enable py::ellipsis tests on Python 2 and mention `Ellipsis` in the docs
2020-08-04 14:45:55 +02:00
Henry Schreiner
1caf1d0613
fix: check list validity and add missing file (#2352)
Added a check on CMake 3.12+ to make sure the file listing is up to date. And caught a missing file with it!
2020-08-01 15:24:30 -04:00
jbarlow83
4d90f1a199
Add error_scope to py::class_::dealloc() to protect destructor calls (#2342)
Fixes issue #1878
2020-07-31 17:46:12 -07:00
Henry Schreiner
b8047245bb
fix: uninstall cleanup (#2346) 2020-07-31 10:16:40 +02:00
acxz
6f6e9394ce
feat: add uninstall target for CMake (#2265)
* add uninstall target for cmake

* only add target when built as master project

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2020-07-30 21:16:50 -04:00
Henry Schreiner
94db5c5ed1 format: apply cmake-format 2020-07-30 20:27:55 -04:00
Henry Schreiner
e2a96890e1 format: add cmake-format to pre-commit 2020-07-30 20:27:55 -04:00
Henry Schreiner
1651c32492 update: address review points 2020-07-30 20:27:55 -04:00
Henry Schreiner
f64d5aa6da fix: typo for warning on C++17, support Win + 2.7 2020-07-30 20:27:55 -04:00
Henry Schreiner
1b92cd1703 fix: address review points from @YannickJadoul 2020-07-30 20:27:55 -04:00
Henry Schreiner
6ec1775fff feat: drop CMake 3.6 and below, modernize CMake
fix: include PYTHON_IS_DEBUG
2020-07-30 20:27:55 -04:00
Henry Schreiner
1491c94c9d
ci: cmake Configure test (#2327) 2020-07-28 20:13:09 -04:00
Marcin Wojdyr
8e40e389fd
cast pointer to std::tuple and std::pair (#2334) 2020-07-28 21:44:19 +02:00
Henry Schreiner
c51b3f436d ci: change caching 2020-07-27 22:12:19 -04:00
Henry Schreiner
a632486865 ci: Windows 2016 test 2020-07-27 22:12:19 -04:00
Henry Schreiner
88b3e5c68d ci: nicer naming scheme 2020-07-27 22:12:19 -04:00
Henry Schreiner
ff39ad3f31 ci: include scipy for tests 2020-07-27 22:12:19 -04:00
Henry Schreiner
249a13bd6e ci: move docs check to GHA 2020-07-27 22:12:19 -04:00
Henry Schreiner
e450ea0536 ci: add docker build to GHA 2020-07-27 22:12:19 -04:00
Henry Schreiner
2fbbd51084 ci: add gcc 2020-07-27 22:12:19 -04:00
Henry Schreiner
2ee1bcd9a4 ci: add GHA badge 2020-07-27 22:12:19 -04:00
Henry Schreiner
1b880dfd5a ci: download EIGEN 2020-07-27 22:12:19 -04:00
Henry Schreiner
9521bc56a8 ci: drop parts from Travis 2020-07-27 22:12:19 -04:00
Henry Schreiner
78069057b2 ci: trim down Appveyor 2020-07-27 22:12:19 -04:00
Sergei Izmailov
7b067cc387
Set __hash__ to None for types that defines __eq__, but not __hash__ (#2291)
fixes #2191
2020-07-27 01:44:25 +02:00
Henry Schreiner
aab701399a ci: cache, build wheels on macOS PyPy3 2020-07-26 09:25:27 -04:00