Commit Graph

2171 Commits

Author SHA1 Message Date
Henry Schreiner ebd5c5b48c
feat: way to only recompile changed files (#2643)
* feat: lazy compile

* refactor: lazy -> only_changed

* refactor: leave the changed function up to the user

* refactor: pass a function, based on @YannickJadoul and @HDembinski's suggestions

* refactor: old -> _old, as it's not intended for users

* docs: slight improvmenent from @rwgk

* docs: Ccache spelling, extra warning about pip caching

Ccache spelling noted by @YannickJadoul
2020-11-11 11:45:28 -05:00
Yannick Jadoul c58758d049
fix: add reasonable argument names to enum_ methods (#2637)
* Add argument names to enum_ methods

* Add test_enum::test_docstring_signatures
2020-11-10 12:49:42 -05:00
Robert Haschke b72cebeb22
style: clang-tidy: modernize-use-using (#2645)
* style: clang-tidy: modernize-use-using

* style: more clang-tidy checking

Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2020-11-09 10:10:19 -08:00
Boris Staletic 06b673a0da
Allow NULL value in pybind11_meta_setattro (#2629) 2020-11-05 23:54:37 +01:00
Henry Schreiner 3e4d54bc01
fix: match new extension discovery with changes to classic discovery (#2640)
* fix: match new extension discovery with changes to classic discovery

Followup to #2638 - this was fixed in 2.6.0, but only for classic Python

* fix: followup to avoid warnings
2020-11-05 14:37:11 -05:00
Henry Schreiner 6d4854a501 ci: correct types statement 2020-11-03 11:59:29 -05:00
Henry Schreiner 6cc233cc32 ci: label PRs when merged only for now 2020-11-03 11:49:45 -05:00
Henry Schreiner b8dc60ec8f
fix: Python include directory was missing from DIRS (#2636) 2020-11-02 20:45:54 -05:00
Yannick Jadoul 7d6713a46d
Use weakref to clean up captured function object in def_buffer (#2634) 2020-11-02 18:39:40 +01:00
Henry Schreiner 06a54018c8
fix: min macos (#2622) 2020-10-29 11:37:42 -04:00
Henry Schreiner 139c05dafa
ci: test on NumPy + Python 3.9 (#2628) 2020-10-29 09:56:00 -04:00
Ralf W. Grosse-Kunstleve 8290a5a0da
clang -Wnon-virtual-dtor compatibility (#2626)
* Adding missing virtual destructors, to silence clang -Wnon-virtual-dtor warnings.

Tested with clang version 9.0.1-12 under an Ubuntu-like OS.
Originally discovered in the Google-internal environment.

* adding -Wnon-virtual-dtor for GNU|Intel|Clang
2020-10-29 06:12:14 -07:00
Thomas Köppe f2e799863b
[common.h] Mark another entry point as "unused". (#2625) 2020-10-29 12:47:59 +01:00
Yannick Jadoul 3a37d33830
Add __builtins__ to globals argument of `py::exec` and `py::eval` if not present (#2616)
* Add __builtins__ to globals argument of `py::exec` and `py::eval` if not present

* Refactor into inline ensure_builtins_in_globals function
2020-10-27 19:58:27 +01:00
Henry Schreiner ace4deb4f0
ci: add more jobs (#2610)
* ci: add more jobs

* ci: minor trimdown
2020-10-22 22:34:44 -04:00
Henry Schreiner 4d037439ba
fix: missing identifier for Python 3.9 2020-10-21 16:21:44 -04:00
Wink Saville 7c26c71835
Fix mispelling in basics.rst (#2614)
Replaced adviced with advised.
2020-10-21 20:11:34 +02:00
Wenzel Jakob 86d3e9eb43 begin working towards a future v2.6.1 patch release 2020-10-21 18:31:10 +02:00
Wenzel Jakob 59a2ac2745 v2.6.0 release 2020-10-21 18:07:48 +02:00
Boris Staletic 4038542b15
Remove friend declaration of py::class_ in py::detail::generic_type (#2613)
This line had two bugs:

1. It declares `py::detail::class_` as `friend`.
2. After fixing that, we would have to change it to
   `template <typename, typename...>`

The first one was introduced ~5 years ago, when a large refactoring was
made, probably as an intermediate step during refactoring.

The second was made when `generic_type` was made to be agnostic with
respect to the order of `py::class_` template parameters.

&nbsp;

We're removing the declaration altogether, because it was never relied
on. This is what makes me think that it was an intermediate step in
refactoring that shouldn't have ended up in commit history.
2020-10-21 13:14:56 +02:00
Mana Borwornpadungkitti 6edd0e6d90
fix: Reject keyword argument `None` with `.none(false)` (#2611)
* demo kwarg with none(false)

* Reorder and extend tests for arg::none(false) in test_methods_and_attributes.py::test_accepts_none

* Fix arg::none() for keyword arguments

* Add changelog note

* Fix names of no_none_kw test functions

Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
2020-10-20 23:57:22 +02:00
Wenzel Jakob 7f9445a626 Thanks, Google! 2020-10-20 21:14:40 +02:00
Wenzel Jakob 2bc62dc8c9 updated credits 2020-10-20 16:56:02 +02:00
Henry Schreiner 120e2e2167
docs: tiny typo 2020-10-18 22:40:19 -04:00
Eric Cousineau c513b5e3c6
tests(CMakeLists): robustify against add'l versions of Boost (#2608)
* tests/CMakeLists: Robustify against add'l versions of Boost

* refactor: simpler impl

Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2020-10-18 20:42:48 -04:00
Henry Schreiner 0b9acc4009
fix: chapters in PDF again (#2606)
* fix: chapters in PDF again

* fix: sections in README
2020-10-18 14:31:28 -04:00
Dariusz Suchojad bed9080c7f
docs: Updated the link to the PDF docs (#2603) (#2605) 2020-10-18 12:51:36 +02:00
Henry Schreiner 09056717da
fix: much better pdf (#2604)
* docs: fix PDF build by adding unicode mappings

* fix: better PDF

* fix: html build issue
2020-10-18 00:21:16 -04:00
Henry Schreiner c16da99309 chore: bump to 2.6.0rc3 2020-10-16 17:34:53 -04:00
Henry Schreiner 064362fbb7
fix: allow the ABI string to be forced (#2602) 2020-10-16 17:23:36 -04:00
Yannick Jadoul 6364b732e9
fix: test_factory_constructors.py failure triggered by test_register_duplicate_class (#2564)
* Demonstrate test_factory_constructors.py failure without functional changes from #2335

* Revert "Demonstrate test_factory_constructors.py failure without functional changes from #2335"

This reverts commit ca33a8021fc2a3617c3356b188796528f4594419.

* Fix test crash where registered Python type gets garbage collected

* Clean up some more internal structures when class objects go out of scope

* Reduce length of std::erase_if-in-C++20 comment

* Clean up code for cleaning up type internals

* Move cleaning up of type info in internals to tp_dealloc on pybind11_metaclass
2020-10-16 16:38:51 -04:00
Henry Schreiner c50f90eca6
style: use Black everywhere (#2594)
* style: use Black everywhere

* style: minor touchup from review
2020-10-16 16:38:13 -04:00
Henry Schreiner 2e31e466dc docs: update for PyPy win 32 issue 2020-10-15 17:38:49 -04:00
Henry Schreiner 8ae11fbf88 ci: add more runs 2020-10-15 17:38:49 -04:00
Henry Schreiner a42211536b fix: new line in PYPY_VERSION 2020-10-15 17:38:49 -04:00
Henry Schreiner ad2fe0ee7b fix: pypy3 windows extension issue 2020-10-15 17:38:49 -04:00
Henry Schreiner 6bb71c48d5 fix: more intp asserts, reinterpret_cast 2020-10-15 17:38:49 -04:00
Henry Schreiner 9ac604a3e8 fix: PyPy windows issue 2020-10-15 17:38:49 -04:00
Henry Schreiner b72c79f964 fix: std::is_pod -> pybind11::detail::is_pod 2020-10-15 17:38:49 -04:00
Henry Schreiner f200832534 style: ssize_t -> py::ssize_t 2020-10-15 17:38:49 -04:00
Henry Schreiner 63f2deea32 chore: update Eigen 2020-10-15 17:38:49 -04:00
Henry Schreiner c4a8b5bb91 chore: bump to 2.6.0rc2 2020-10-14 16:37:25 -04:00
Yannick Jadoul 493649f965
fix: valgrind-detected after-freeing access of PyMethodDef (macOS Python 3.9.0 segfaults) (#2576)
* Check if valgrind-detected after-freeing access of PyMethodDef causes macOS Python 3.9 segfaults

* fix: only apply leak on 3.9.0

* fix: faster check

* fix: better naming thanks to @bstaletic

Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2020-10-14 14:11:09 -04:00
Henry Schreiner 645d83813b
feat: typing support for helpers (#2588)
* feat: basic typing support

* docs: mention syncing as suggested by @rwgk

* docs: update changelog

* docs: copy of warning in limitations
2020-10-14 14:08:41 -04:00
Henry Schreiner a8c2e3eec5
fix: ipo should be off for debug or relwithdebinfo (#2590)
* fix: ipo should be off for debug or relwithdebinfo

Closes #2587

* docs: slightly more detailed about IPO

* Update pybind11Common.cmake
2020-10-14 13:43:31 -04:00
Valentin Boettcher 3be085d194
docs: typo prefix -> suffix (#2593) 2020-10-14 11:32:26 -04:00
Henry Schreiner 526a7733c7
ci: merged labels still missing 2020-10-13 19:59:51 -04:00
Jay Soffian 01453b05c4
fix (setup_helpers): fix bug in _add_lflags (#2586)
Fix minor bug in `_add_lflags` that allows a flag to be added more than once.
2020-10-13 18:20:10 -04:00
Henry Schreiner 2a263e087c
docs: some final 2.6.0 updates (#2582)
* docs: some final 2.6.0 updates

* docs: better warning text
2020-10-13 18:19:05 -04:00
Henry Schreiner c99d7f1cc7
docs: PR template (#2580) 2020-10-13 13:09:40 -04:00