Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 'upstream/master' (9c0aa69937) #47

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
296 commits
Select commit Hold shift + click to select a range
fb0a3a0
Fix broken README link (#2449)
dsaxton Aug 31, 2020
3a89bff
ci: harden chrono test, mark another macos 4.9 dev failure (#2448)
henryiii Aug 31, 2020
4c36fb7
[DOC] avoid C++ types in docstrings (#2441)
sizmailov Sep 1, 2020
72b06b8
ci: Eigen moved
henryiii Sep 3, 2020
44fa79c
pytypes: Add Gotchas section about default-constructed wrapper types …
EricCousineau-TRI Sep 4, 2020
0dbda6e
feat: py::pos_only (#2459)
henryiii Sep 5, 2020
ce1a07e
fix: use classic extension handling unless otherwise requested (#2462)
henryiii Sep 5, 2020
3bd0d7a
Add note about specifying custom base class for Exceptions. (#2465)
michalsustr Sep 6, 2020
36c666f
pybind11_add_module(): OPT_SIZE target
wjakob Sep 4, 2020
064a03a
main CMakeLists.txt file: be less noisy
wjakob Sep 4, 2020
37f845a
ci: disallow some common capitalization mistakes (#2472)
henryiii Sep 8, 2020
fbc7563
Add py::object casting example to embedding docs (#2466)
kohr-h Sep 9, 2020
621906b
fix: support nvcc and test (#2461)
henryiii Sep 10, 2020
b47efd3
Use defined for some preprocessor variables that might be undefined (…
cirosantilli2 Sep 10, 2020
fe9ee86
Add check if `str(handle)` correctly converted the object, and throw …
YannickJadoul Sep 11, 2020
38370a8
fix: support NVIDIA-PGI HPC SDK (#2475)
andriish Sep 12, 2020
cc982ac
fix: allow assignment of time points of resolutions other than that o…
bstaletic Sep 13, 2020
32bb907
Avoid C-style casts for pointers in docs (#2487)
bstaletic Sep 14, 2020
f12ec00
feat: py::type::of<T>() and py::type::of(h) (#2364)
henryiii Sep 14, 2020
9df1383
Stop py::array_t arguments from accepting arrays that do not match th…
YannickJadoul Sep 15, 2020
d65e34d
Resolve empty statement warning when using PYBIND11_OVERLOAD_PURE_NAM…
YannickJadoul Sep 15, 2020
8dc31c7
style: clang-tidy: llvm-namespace-comment
henryiii Sep 11, 2020
5dfbe6f
style: clang-tidy: modernize-use-override
henryiii Sep 11, 2020
96e6a8d
style: clang-tidy: readability-container-size-empty
henryiii Sep 11, 2020
b342c37
style: clang-tidy: modernize-use-using
henryiii Sep 11, 2020
b491b46
style: clang-tidy: modernize-use-equals-default
henryiii Sep 11, 2020
ce88e94
style: clang-tidy: modernize-use-auto
henryiii Sep 11, 2020
4d78640
style: clang-tidy: modernize-use-emplace
henryiii Sep 11, 2020
e7bafc8
style: clang-tidy: default checks and fix bug in iostream deconstruction
henryiii Sep 12, 2020
16f199f
Change base parameter type in register_exception and exception constr…
YannickJadoul Sep 15, 2020
dabbbf3
fix: use OVERRIDE instead of OVERLOAD (#2490)
henryiii Sep 15, 2020
a4cee36
Add vcpkg installation instructions (#1936)
grdowns Sep 16, 2020
41aa926
refactor: replace .get_type with type::handle_of (#2492)
henryiii Sep 16, 2020
fd61f50
feat: setup.py redesign and helpers (#2433)
henryiii Sep 16, 2020
e37921d
refactor: drop mkdoc and update changelog (#2491)
henryiii Sep 16, 2020
d3c999c
fix: rename `pybind11::module` to `pybind11::module_` (#2489)
bstaletic Sep 16, 2020
dec33c2
docs: installing section (#2494)
henryiii Sep 17, 2020
11f756f
fix: type bug intruduced in #2492
henryiii Sep 17, 2020
e3774b7
tests: the condition was too look on xfail
henryiii Sep 17, 2020
4e7c08d
test_numpy_dtypes: Add test for py::vectorize() (#2260)
EricCousineau-TRI Sep 17, 2020
99ef2b8
docs: read version from pybind11 file (#2496)
henryiii Sep 17, 2020
81555ce
docs: Use README.rst in docs as home page (#2500)
henryiii Sep 17, 2020
54831a9
fix: use svg to pdf converter instead of original solution
henryiii Sep 17, 2020
d753b76
docs: corrected link to documentation
henryiii Sep 17, 2020
8fa70e7
ci: fix broken documenation test (works on RtD) (#2506)
henryiii Sep 18, 2020
87828c7
fix: typo in Windows C++17 support (#2507)
henryiii Sep 18, 2020
4a288ab
fix: Windows C++ latest (#2508)
henryiii Sep 18, 2020
d0ed035
fix: AppleClang 12 warnings (#2510)
henryiii Sep 19, 2020
5a8ec8e
Include what is used in pybind11.h (#2499)
Ricardicus Sep 19, 2020
5e6ec49
Add enum value to enum repr (#2126)
auscompgeek Sep 19, 2020
e01f492
fix: Add a nice CMake error when Interpreter component is missing. (#…
henryiii Sep 21, 2020
d74be32
tests: Fix test override execution (#2512)
EricCousineau-TRI Sep 22, 2020
3c7ef56
fix: warning on latest AppleClang (#2522)
henryiii Sep 22, 2020
d159a56
static allocation for PyModuleDef, to avoid leak check errors. (#2413)
Sep 27, 2020
82dbc5b
ci: releases (#2530)
henryiii Sep 30, 2020
2190246
chore: bump to 2.6.0b1, beta release
henryiii Sep 30, 2020
0fc5774
fix: beta does not have a dot in front (#2539)
henryiii Sep 30, 2020
1994691
ci: download artifact issue
henryiii Sep 30, 2020
319b996
fix: metadata was adding quotes to distinfo
henryiii Sep 30, 2020
01ad892
ci: publish in two steps
henryiii Sep 30, 2020
3232e59
Check if module file extension could be queried correctly (#2538)
wjakob Sep 30, 2020
c72708a
Moving tp_class access, and consistent fully-qualified naming for PyP…
YannickJadoul Oct 2, 2020
5ebc781
Allow raw unions without base classes in is_accessible_base_of (#2320)
bstaletic Oct 2, 2020
6d2d08d
fix: conda-forge patch (#2540)
henryiii Oct 2, 2020
07b069a
Unify Python 2 & 3 py::module constructor, and make contructor with p…
YannickJadoul Oct 2, 2020
b9d0027
feat: parallel compiler (#2521)
henryiii Oct 2, 2020
2b6b98e
Bugfix/Check actual value when deregistering pybind11 instance (#2252)
rfhaque Oct 2, 2020
56784c4
Add unchecked_reference::operator() and operator[] to overload resolu…
YannickJadoul Oct 2, 2020
9796fe9
feat: vectorize functions with void return type (#1969)
YannickJadoul Oct 2, 2020
5f9b166
ci: label PRs with changelog needed (#2546)
henryiii Oct 2, 2020
1bcd5f0
Update pr_merged.yml
henryiii Oct 2, 2020
961b2e6
fix: ensure the GIL is held when copying a function. (#2545)
hwright Oct 2, 2020
ca4127c
ci: fix labeler
henryiii Oct 2, 2020
3488494
refactor: import check as a common function (#2526)
henryiii Oct 3, 2020
560ed3e
docs: fix odd spacing
henryiii Oct 3, 2020
6bcd220
refactor: module -> module_ with typedef (#2544)
henryiii Oct 3, 2020
e8ad33b
Fix buffer_info for ctypes buffers (pybind#2502) (#2503)
fritzr Oct 3, 2020
b70894d
docs: add std::valarray to docs/advanced/cast/stl.rst (#2547)
YannickJadoul Oct 4, 2020
1411207
chore: drop support for PyPy < 7.3.1 and clean up old PyPy workaround…
YannickJadoul Oct 5, 2020
2a2f522
fix: find_import didn't work properly for classic tools (#2550)
henryiii Oct 5, 2020
f537093
Fail on passing py::object with wrong Python type to py::object subcl…
YannickJadoul Oct 5, 2020
9a0c96d
feat: py::prepend tag (#1131)
henryiii Oct 6, 2020
00edc30
fix: PYBIND11_OBJECT required pybind11 namespace (regression) (#2553)
henryiii Oct 6, 2020
b6f37f6
docs: minor cleanup (#2555)
henryiii Oct 8, 2020
49c389b
ci: test on Windows 3.8 and 3.9 (mostly) (#2560)
henryiii Oct 8, 2020
49cdb70
docs: use sorted(glob()) in example setup.py (#2561)
jbarlow83 Oct 8, 2020
deba040
test: hide segfault (#2559)
henryiii Oct 8, 2020
71aea49
Check scope's __dict__ instead of using hasattr when registering clas…
YannickJadoul Oct 8, 2020
0c5cc03
feat: deprecate public constructors of module_ class (#2552)
YannickJadoul Oct 9, 2020
e4e5c49
docs: known issues (#2565)
henryiii Oct 9, 2020
59323a9
ci: update PGI to 20.9 (#2566)
andriish Oct 9, 2020
8d8d48c
fix: do not use abi::__forced_unwind with libc++, even with gcc inste…
asobhy-qnx Oct 9, 2020
fae4532
ci: fix labeler
henryiii Oct 9, 2020
f385ecc
chore: bump to 2.6.0rc1
henryiii Oct 9, 2020
c02f0ec
fix: formatting issue
henryiii Oct 9, 2020
fecef38
refactor: simpler followup to #2569 (#2572)
henryiii Oct 9, 2020
d46f332
fix: allow cmake varibles from Python calls to be cached (#2570)
henryiii Oct 9, 2020
7d7309b
ci: monitor dependencies
henryiii Oct 11, 2020
cd2c25a
ci: adjust labeler match pattern
henryiii Oct 12, 2020
4f45052
ci: fix ci label
henryiii Oct 12, 2020
993495c
fix: Intel 18+ required (#2577)
henryiii Oct 12, 2020
ae2e5a3
ci: try to get labeler to add needs changelog
henryiii Oct 12, 2020
1914b7d
Shorten PYBIND11_EMBEDDED_MODULE macro implementation by using PYBIND…
YannickJadoul Oct 12, 2020
2f746ee
ci: original labeler
henryiii Oct 13, 2020
99773fc
fix: throw error_already_set in py::len on failing PyObject_Length (#…
YannickJadoul Oct 13, 2020
7c71dd3
ci: inverted labeler logic
henryiii Oct 13, 2020
edda89b
fix: install to DATAROOTDIR instead of hardcoding share (#2584)
henryiii Oct 13, 2020
c99d7f1
docs: PR template (#2580)
henryiii Oct 13, 2020
2a263e0
docs: some final 2.6.0 updates (#2582)
henryiii Oct 13, 2020
01453b0
fix (setup_helpers): fix bug in _add_lflags (#2586)
jaysoffian Oct 13, 2020
526a773
ci: merged labels still missing
henryiii Oct 13, 2020
3be085d
docs: typo prefix -> suffix (#2593)
vale981 Oct 14, 2020
a8c2e3e
fix: ipo should be off for debug or relwithdebinfo (#2590)
henryiii Oct 14, 2020
645d838
feat: typing support for helpers (#2588)
henryiii Oct 14, 2020
493649f
fix: valgrind-detected after-freeing access of PyMethodDef (macOS Pyt…
YannickJadoul Oct 14, 2020
c4a8b5b
chore: bump to 2.6.0rc2
henryiii Oct 14, 2020
63f2dee
chore: update Eigen
henryiii Oct 15, 2020
f200832
style: ssize_t -> py::ssize_t
henryiii Oct 15, 2020
b72c79f
fix: std::is_pod -> pybind11::detail::is_pod
henryiii Oct 15, 2020
9ac604a
fix: PyPy windows issue
henryiii Oct 15, 2020
6bb71c4
fix: more intp asserts, reinterpret_cast
henryiii Oct 15, 2020
ad2fe0e
fix: pypy3 windows extension issue
henryiii Oct 15, 2020
a422115
fix: new line in PYPY_VERSION
henryiii Oct 15, 2020
8ae11fb
ci: add more runs
henryiii Oct 15, 2020
2e31e46
docs: update for PyPy win 32 issue
henryiii Oct 15, 2020
c50f90e
style: use Black everywhere (#2594)
henryiii Oct 16, 2020
6364b73
fix: test_factory_constructors.py failure triggered by test_register_…
YannickJadoul Oct 16, 2020
064362f
fix: allow the ABI string to be forced (#2602)
henryiii Oct 16, 2020
c16da99
chore: bump to 2.6.0rc3
henryiii Oct 16, 2020
0905671
fix: much better pdf (#2604)
henryiii Oct 18, 2020
bed9080
docs: Updated the link to the PDF docs (#2603) (#2605)
dsuch Oct 18, 2020
0b9acc4
fix: chapters in PDF again (#2606)
henryiii Oct 18, 2020
c513b5e
tests(CMakeLists): robustify against add'l versions of Boost (#2608)
EricCousineau-TRI Oct 19, 2020
120e2e2
docs: tiny typo
henryiii Oct 19, 2020
2bc62dc
updated credits
wjakob Oct 20, 2020
7f9445a
Thanks, Google!
wjakob Oct 20, 2020
6edd0e6
fix: Reject keyword argument `None` with `.none(false)` (#2611)
potpath Oct 20, 2020
4038542
Remove friend declaration of py::class_ in py::detail::generic_type (…
bstaletic Oct 21, 2020
59a2ac2
v2.6.0 release
wjakob Oct 21, 2020
86d3e9e
begin working towards a future v2.6.1 patch release
wjakob Oct 21, 2020
7c26c71
Fix mispelling in basics.rst (#2614)
winksaville Oct 21, 2020
4d03743
fix: missing identifier for Python 3.9
henryiii Oct 21, 2020
ace4deb
ci: add more jobs (#2610)
henryiii Oct 23, 2020
3a37d33
Add __builtins__ to globals argument of `py::exec` and `py::eval` if …
YannickJadoul Oct 27, 2020
f2e7998
[common.h] Mark another entry point as "unused". (#2625)
tkoeppe Oct 29, 2020
8290a5a
clang -Wnon-virtual-dtor compatibility (#2626)
Oct 29, 2020
139c05d
ci: test on NumPy + Python 3.9 (#2628)
henryiii Oct 29, 2020
06a5401
fix: min macos (#2622)
henryiii Oct 29, 2020
7d6713a
Use weakref to clean up captured function object in def_buffer (#2634)
YannickJadoul Nov 2, 2020
b8dc60e
fix: Python include directory was missing from DIRS (#2636)
henryiii Nov 3, 2020
6cc233c
ci: label PRs when merged only for now
henryiii Nov 3, 2020
6d4854a
ci: correct types statement
henryiii Nov 3, 2020
3e4d54b
fix: match new extension discovery with changes to classic discovery …
henryiii Nov 5, 2020
06b673a
Allow NULL value in pybind11_meta_setattro (#2629)
bstaletic Nov 5, 2020
b72cebe
style: clang-tidy: modernize-use-using (#2645)
rhaschke Nov 9, 2020
c58758d
fix: add reasonable argument names to enum_ methods (#2637)
YannickJadoul Nov 10, 2020
ebd5c5b
feat: way to only recompile changed files (#2643)
henryiii Nov 11, 2020
f1abf5d
docs: changelog update (#2652)
henryiii Nov 11, 2020
b7c741b
docs: back to work after 2.6.1
henryiii Nov 12, 2020
02746cb
docs: add a little more information for releases
henryiii Nov 12, 2020
f8b8107
fix: make FindPython2 and FindPython3 work (#2662)
knarfS Nov 15, 2020
de78bdd
docs: better badges (#2656)
henryiii Nov 15, 2020
32d11c9
fix typo in pickle example (#2669)
bjodah Nov 16, 2020
17c22b9
docs: mention branch update in checklist (#2670)
henryiii Nov 16, 2020
2fa4747
pythonbuf fix (#2675)
nickbridgechess Nov 19, 2020
af8849f
docs: list all pybind11 exceptions (#2671)
jblespiau Nov 19, 2020
7bd4b39
fix: define PYBIND11_CPP14 for recent intel compilers (#2679)
tobiasleibner Nov 23, 2020
087b07c
Remove workaround code that is not needed since #1211 (#2683)
albanD Nov 23, 2020
8adef2c
fix: workaround for #2682 and #2422 by simply clearing the TypeError …
bstaletic Nov 23, 2020
d57c1fa
docs: update installing.rst (#2691)
Nov 24, 2020
028812a
docs: add warning about FindPython's Development component when libra…
YannickJadoul Nov 24, 2020
d068ab2
docs: pybind11/numpy.h does not require numpy at build time. (#2720)
anntzer Dec 8, 2020
91a6972
docs: Update warning about Python 3.9.0 UB, now that 3.9.1 has been r…
YannickJadoul Dec 8, 2020
5469c23
Adjusting `type_caster<std::reference_wrapper<T>>` to support const/n…
laramiel Dec 16, 2020
499fcd5
ci: drop pypy2 linux, PGI 20.7, add Python 10 dev (#2724)
henryiii Dec 16, 2020
ffb113d
fix: regression with installed pybind11 overriding local one (#2716)
henryiii Dec 16, 2020
d9fa705
style: remove redundant instance->owned = true (#2723)
rhaschke Dec 16, 2020
30eb39e
fix: also throw in the move-constructor added by the PYBIND11_OBJECT …
YannickJadoul Dec 16, 2020
cecdfad
minor cleanup: fixing or silencing flake8 errors (#2731)
Dec 19, 2020
79cb013
fix: allow users to avoid thread termination in scoped_released (#2657)
malfet Dec 19, 2020
d5af536
ci: update cmake action (#2734)
henryiii Dec 22, 2020
5bd766b
docs: update changelog and add script to help generate it (#2733)
henryiii Dec 22, 2020
6b4297f
fix: don't trigger -Wunused-parameter in flagcheck.cpp. (#2735)
anntzer Dec 22, 2020
79b0e2c
docs: fix pdf build, simpler start page (#2736)
henryiii Dec 22, 2020
635e3fc
CONTRIBUTING: Add suggestion about passing pytest flags (#2738)
EricCousineau-TRI Dec 23, 2020
6f66e76
docs: add a note about compiling the example (#2737)
ssiano Dec 24, 2020
830f8ed
tests: update pytest 6.2.1 and fix test_python_alreadyset_in_destruct…
YannickJadoul Dec 24, 2020
d587a2f
fix: do not set docstring for function when empty (#2745)
lqf96 Dec 28, 2020
b7dfe5c
chore: changelog update (#2750)
henryiii Dec 29, 2020
2110d2d
enum: add missing Enum.value property (#2739)
EricCousineau-TRI Dec 31, 2020
e612043
Fix invalid access when reinterpret_casting a non-pybind11 PyObject* …
YannickJadoul Dec 31, 2020
e57dd47
Fix various minor memory leaks in the tests (found by Valgrind in #27…
YannickJadoul Jan 1, 2021
98f1bbb
Ignore deprecation warnings about old-style __init__/__setstate__ con…
YannickJadoul Jan 1, 2021
7b7ec66
ci: pin CMake to 3.19.2, fixes issues with 3.19.3 on Linux (aarch64)…
YannickJadoul Jan 13, 2021
5abce7f
ci: use fixed action (#2791)
henryiii Jan 13, 2021
f243450
ci: disable builds for 3.10.0a4, and enable a nightly 3.10-dev build …
YannickJadoul Jan 14, 2021
210c8c2
fix: a warning found by static code analyzer (#2783)
snnn Jan 14, 2021
14b3751
docs: fix example code in Exceptions section (match vs. matches) (#2781)
asmaloney Jan 14, 2021
df8494d
fix: a clang warning [-Wshadow-field-in-constructor-modified] (#2780)
asmaloney Jan 14, 2021
4093196
docs: fix spelling in some comments/docs (#2777)
asmaloney Jan 14, 2021
1faf4a8
docs: the order of alternatives for variant types matters, and follow…
YannickJadoul Jan 14, 2021
230fa53
fix: Don't override global settings for VISIBILITY if set (#2793)
henryiii Jan 14, 2021
0855146
Plug leaking function_records in cpp_function initialization in case …
YannickJadoul Jan 14, 2021
76a1600
fix: STATIC and SHARED flags not being detected (#2796)
heyer2 Jan 14, 2021
0f8d5f2
Add a Valgrind build on debug Python 3.9 (#2746)
YannickJadoul Jan 15, 2021
0b3df7f
ci: Intel icc/icpc via oneAPI (#2573)
ax3l Jan 15, 2021
0df11d8
docs: update build description slightly (#2794)
henryiii Jan 17, 2021
8449a80
fix: only allow integer type_caster to call __int__ method when conve…
YannickJadoul Jan 17, 2021
4853408
fix: Intel ICC C++17 compatibility (#2729)
mkuron Jan 18, 2021
e8c4f54
fix: prepend Pybind11Extension flags rather than appending them. (#2808)
anntzer Jan 19, 2021
87f5aff
ci: update to setup-cmake v1.6 (#2805)
henryiii Jan 19, 2021
eb83fee
style: avoid using unintialized variables (#2806)
henryiii Jan 19, 2021
130c995
fix: support basic dual includes (#2804)
henryiii Jan 19, 2021
2db0264
style: add clang-format file (#2310)
henryiii Jan 20, 2021
5b43ac4
docs: fix missing line from #2310
henryiii Jan 20, 2021
44105ca
docs: mention that the changelog block in PR is special
henryiii Jan 20, 2021
08bca37
docs: update changelog, nicer output for script (#2811)
henryiii Jan 21, 2021
9ea39dc
Force the builtin module key to be the correct type. (#2814)
crimsoncor Jan 24, 2021
0bb8ca2
Always call PyNumber_Index when casting from Python to a C++ integral…
YannickJadoul Jan 25, 2021
42e7380
chore(deps): bump jwlawson/actions-setup-cmake from v1.6 to v1.7 (#2818)
dependabot[bot] Jan 25, 2021
8e5d3d2
docs: prepare for 2.6.2 (#2820)
henryiii Jan 25, 2021
dff9b3b
chore: add pytest-timeout, mypy
henryiii Jan 27, 2021
732bf88
fix: avoid changing class outside of GIL
henryiii Jan 27, 2021
8de7772
chore: prepare for the 2.6.2 release (#2821)
henryiii Jan 27, 2021
4a5b81b
chore: get back to work
henryiii Jan 27, 2021
87954e7
fix: corrected dev versioning
henryiii Jan 27, 2021
9b7bfef
Factoring out find_registered_python_instance() from type_caster_gene…
Jan 27, 2021
587d5f8
Update breathe to 4.26.1, add make_tuple, make_iterator, and make_key…
YannickJadoul Jan 28, 2021
0432ae7
Changing pybind11::str to exclusively hold PyUnicodeObject (#2409)
Jan 29, 2021
23c3edc
When determining if a shared_ptr already exists, use a test on the we…
elkhrt Jan 30, 2021
932769b
Adding holder_caster `typename SFINAE = void` hooks to help work arou…
Jan 30, 2021
6cf6bf2
Fix confusing weakref constructor overload (#2832)
YannickJadoul Jan 31, 2021
721834b
chore: get PyPy 3.7 wheels using NumPy 1.20 (#2837)
henryiii Jan 31, 2021
fe84587
Make sure all warnings in pytest get turned into errors (#2838)
YannickJadoul Feb 1, 2021
948d09d
test: Test against Python 3.10 (#2848)
kumaraditya303 Feb 8, 2021
e791ec4
fix: add null pointer check with std::localtime (#2846)
knzivid Feb 8, 2021
c78dfb6
MSVC but not Clang: /MP (#2824)
ax3l Feb 8, 2021
c236239
chore(deps): bump pypa/gh-action-pypi-publish from v1.4.1 to v1.4.2 (…
dependabot[bot] Feb 9, 2021
cbae6d5
docs: fix CMake status for DOWNLOAD_EIGEN (#2857)
OnlineCop Feb 12, 2021
417067e
Add pybind11::bytearray (#2799)
in42 Feb 14, 2021
59f8d7f
chore(deps): bump jwlawson/actions-setup-cmake from v1.7 to v1.8 (#2865)
dependabot[bot] Feb 17, 2021
98f9a33
Correct typo in FAQ (#2868)
jakobjw Feb 20, 2021
0c42250
Splitting out detail/type_caster_base.h from cast.h, with iwyu cleanu…
Feb 23, 2021
c0fbb02
Extract gil management functions to separate header (#2845)
virtuald Feb 23, 2021
74a767d
Dtype kind vs char (#2864)
bemichel Feb 23, 2021
e2e819b
Shuffling code in test_smart_ptr.cpp to separate struct/class definit…
Feb 25, 2021
9c0aa69
Pointing out namespace in docs (#2874)
tdegeus Feb 25, 2021
157f825
Merge 'upstream/master' (9c0aa69937)
EricCousineau-TRI Mar 4, 2021
af6303e
drake: Disable added windows CI; disable format, labeler, pip
EricCousineau-TRI Mar 4, 2021
5ea4bc8
drake: Fix new code path for multi-inheritance on ownership transfer
EricCousineau-TRI Mar 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ install:
if ($env:PLATFORM -eq "x64") { $env:PYTHON = "$env:PYTHON-x64" }
$env:PATH = "C:\Python$env:PYTHON\;C:\Python$env:PYTHON\Scripts\;$env:PATH"
python -W ignore -m pip install --upgrade pip wheel
python -W ignore -m pip install pytest numpy --no-warn-script-location
python -W ignore -m pip install pytest numpy --no-warn-script-location pytest-timeout
- ps: |
Start-FileDownload 'http://bitbucket.org/eigen/eigen/get/3.3.3.zip'
7z x 3.3.3.zip -y > $null
$env:CMAKE_INCLUDE_PATH = "eigen-eigen-67e894c6cd8f;$env:CMAKE_INCLUDE_PATH"
Start-FileDownload 'https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.zip'
7z x eigen-3.3.7.zip -y > $null
$env:CMAKE_INCLUDE_PATH = "eigen-3.3.7;$env:CMAKE_INCLUDE_PATH"
build_script:
- cmake -G "%CMAKE_GENERATOR%" -A "%CMAKE_ARCH%"
-DCMAKE_CXX_STANDARD=14
Expand Down
21 changes: 21 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# See all possible options and defaults with:
# clang-format --style=llvm --dump-config
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignConsecutiveAssignments: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: All
BreakConstructorInitializers: BeforeColon
ColumnLimit: 99
IndentCaseLabels: true
IndentPPDirectives: AfterHash
IndentWidth: 4
Language: Cpp
SpaceAfterCStyleCast: true
# SpaceInEmptyBlock: true # too new
Standard: Cpp11
TabWidth: 4
...
13 changes: 13 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FormatStyle: file

Checks: '
llvm-namespace-comment,
modernize-use-override,
readability-container-size-empty,
modernize-use-using,
modernize-use-equals-default,
modernize-use-auto,
modernize-use-emplace,
'

HeaderFilterRegex: 'pybind11/.*h'
189 changes: 188 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,26 @@ cmake --build build --target check
`--target` can be spelled `-t` in CMake 3.15+. You can also run individual
tests with these targets:

* `pytest`: Python tests only
* `pytest`: Python tests only, using the
[pytest](https://docs.pytest.org/en/stable/) framework
* `cpptest`: C++ tests only
* `test_cmake_build`: Install / subdirectory tests

If you want to build just a subset of tests, use
`-DPYBIND11_TEST_OVERRIDE="test_callbacks.cpp;test_pickling.cpp"`. If this is
empty, all tests will be built.

You may also pass flags to the `pytest` target by editing `tests/pytest.ini` or
by using the `PYTEST_ADDOPTS` environment variable
(see [`pytest` docs](https://docs.pytest.org/en/2.7.3/customize.html#adding-default-options)). As an example:

```bash
env PYTEST_ADDOPTS="--capture=no --exitfirst" \
cmake --build build --target pytest
# Or using abbreviated flags
env PYTEST_ADDOPTS="-s -x" cmake --build build --target pytest
```

### Formatting

All formatting is handled by pre-commit.
Expand Down Expand Up @@ -164,7 +176,182 @@ name, pre-commit):
pre-commit install
```

### Clang-Format

As of v2.6.2, pybind11 ships with a [`clang-format`][clang-format]
configuration file at the top level of the repo (the filename is
`.clang-format`). Currently, formatting is NOT applied automatically, but
manually using `clang-format` for newly developed files is highly encouraged.
To check if a file needs formatting:

```bash
clang-format -style=file --dry-run some.cpp
```

The output will show things to be fixed, if any. To actually format the file:

```bash
clang-format -style=file -i some.cpp
```

Note that the `-style-file` option searches the parent directories for the
`.clang-format` file, i.e. the commands above can be run in any subdirectory
of the pybind11 repo.

### Clang-Tidy

[`clang-tidy`][clang-tidy] performs deeper static code analyses and is
more complex to run, compared to `clang-format`, but support for `clang-tidy`
is built into the pybind11 CMake configuration. To run `clang-tidy`, the
following recipe should work. Files will be modified in place, so you can
use git to monitor the changes.

```bash
docker run --rm -v $PWD:/pybind11 -it silkeh/clang:10
apt-get update && apt-get install python3-dev python3-pytest
cmake -S pybind11/ -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);-fix"
cmake --build build
```

### Include what you use

To run include what you use, install (`brew install include-what-you-use` on
macOS), then run:

```bash
cmake -S . -B build-iwyu -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=$(which include-what-you-use)
cmake --build build
```

The report is sent to stderr; you can pipe it into a file if you wish.

### Build recipes

This builds with the Intel compiler (assuming it is in your path, along with a
recent CMake and Python 3):

```bash
python3 -m venv venv
. venv/bin/activate
pip install pytest
cmake -S . -B build-intel -DCMAKE_CXX_COMPILER=$(which icpc) -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DPYBIND11_WERROR=ON
```

This will test the PGI compilers:

```bash
docker run --rm -it -v $PWD:/pybind11 nvcr.io/hpc/pgi-compilers:ce
apt-get update && apt-get install -y python3-dev python3-pip python3-pytest
wget -qO- "https://cmake.org/files/v3.18/cmake-3.18.2-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local
cmake -S pybind11/ -B build
cmake --build build
```

### Explanation of the SDist/wheel building design

> These details below are _only_ for packaging the Python sources from git. The
> SDists and wheels created do not have any extra requirements at all and are
> completely normal.

The main objective of the packaging system is to create SDists (Python's source
distribution packages) and wheels (Python's binary distribution packages) that
include everything that is needed to work with pybind11, and which can be
installed without any additional dependencies. This is more complex than it
appears: in order to support CMake as a first class language even when using
the PyPI package, they must include the _generated_ CMake files (so as not to
require CMake when installing the `pybind11` package itself). They should also
provide the option to install to the "standard" location
(`<ENVROOT>/include/pybind11` and `<ENVROOT>/share/cmake/pybind11`) so they are
easy to find with CMake, but this can cause problems if you are not an
environment or using ``pyproject.toml`` requirements. This was solved by having
two packages; the "nice" pybind11 package that stores the includes and CMake
files inside the package, that you get access to via functions in the package,
and a `pybind11-global` package that can be included via `pybind11[global]` if
you want the more invasive but discoverable file locations.

If you want to install or package the GitHub source, it is best to have Pip 10
or newer on Windows, macOS, or Linux (manylinux1 compatible, includes most
distributions). You can then build the SDists, or run any procedure that makes
SDists internally, like making wheels or installing.


```bash
# Editable development install example
python3 -m pip install -e .
```

Since Pip itself does not have an `sdist` command (it does have `wheel` and
`install`), you may want to use the upcoming `build` package:

```bash
python3 -m pip install build

# Normal package
python3 -m build -s .

# Global extra
PYBIND11_GLOBAL_SDIST=1 python3 -m build -s .
```

If you want to use the classic "direct" usage of `python setup.py`, you will
need CMake 3.15+ and either `make` or `ninja` preinstalled (possibly via `pip
install cmake ninja`), since directly running Python on `setup.py` cannot pick
up and install `pyproject.toml` requirements. As long as you have those two
things, though, everything works the way you would expect:

```bash
# Normal package
python3 setup.py sdist

# Global extra
PYBIND11_GLOBAL_SDIST=1 python3 setup.py sdist
```

A detailed explanation of the build procedure design for developers wanting to
work on or maintain the packaging system is as follows:

#### 1. Building from the source directory

When you invoke any `setup.py` command from the source directory, including
`pip wheel .` and `pip install .`, you will activate a full source build. This
is made of the following steps:

1. If the tool is PEP 518 compliant, like Pip 10+, it will create a temporary
virtual environment and install the build requirements (mostly CMake) into
it. (if you are not on Windows, macOS, or a manylinux compliant system, you
can disable this with `--no-build-isolation` as long as you have CMake 3.15+
installed)
2. The environment variable `PYBIND11_GLOBAL_SDIST` is checked - if it is set
and truthy, this will be make the accessory `pybind11-global` package,
instead of the normal `pybind11` package. This package is used for
installing the files directly to your environment root directory, using
`pybind11[global]`.
2. `setup.py` reads the version from `pybind11/_version.py` and verifies it
matches `includes/pybind11/detail/common.h`.
3. CMake is run with `-DCMAKE_INSTALL_PREIFX=pybind11`. Since the CMake install
procedure uses only relative paths and is identical on all platforms, these
files are valid as long as they stay in the correct relative position to the
includes. `pybind11/share/cmake/pybind11` has the CMake files, and
`pybind11/include` has the includes. The build directory is discarded.
4. Simpler files are placed in the SDist: `tools/setup_*.py.in`,
`tools/pyproject.toml` (`main` or `global`)
5. The package is created by running the setup function in the
`tools/setup_*.py`. `setup_main.py` fills in Python packages, and
`setup_global.py` fills in only the data/header slots.
6. A context manager cleans up the temporary CMake install directory (even if
an error is thrown).

### 2. Building from SDist

Since the SDist has the rendered template files in `tools` along with the
includes and CMake files in the correct locations, the builds are completely
trivial and simple. No extra requirements are required. You can even use Pip 9
if you really want to.


[pre-commit]: https://pre-commit.com
[clang-format]: https://clang.llvm.org/docs/ClangFormat.html
[clang-tidy]: https://clang.llvm.org/extra/clang-tidy/
[pybind11.readthedocs.org]: http://pybind11.readthedocs.org/en/latest
[issue tracker]: https://github.com/pybind/pybind11/issues
[gitter]: https://gitter.im/pybind/Lobby
Expand Down
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
ignore:
# Official actions have moving tags like v1
# that are used, so they don't need updates here
- dependency-name: "actions/checkout"
- dependency-name: "actions/setup-python"
- dependency-name: "actions/cache"
- dependency-name: "actions/upload-artifact"
- dependency-name: "actions/download-artifact"
- dependency-name: "actions/labeler"
8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
docs:
- any:
- 'docs/**/*.rst'
- '!docs/changelog.rst'
- '!docs/upgrade.rst'

ci:
- '.github/workflows/*.yml'
3 changes: 3 additions & 0 deletions .github/labeler_merged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
needs changelog:
- all:
- '!docs/changelog.rst'
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Description

<!-- Include relevant issues or PRs here, describe what changed and why -->


## Suggested changelog entry:

<!-- Fill in the below block with the expected RestructuredText entry. Delete if no entry needed;
but do not delete header or rst block if an entry is needed! Will be collected via a script. -->

```rst

```

<!-- If the upgrade guide needs updating, note that here too -->
Loading