Commit Graph

129 Commits

Author SHA1 Message Date
Henry Schreiner b7dfe5cc84
chore: changelog update (#2750) 2020-12-28 20:14:54 -05:00
Henry Schreiner 79b0e2c052
docs: fix pdf build, simpler start page (#2736) 2020-12-22 08:50:45 -05:00
Henry Schreiner 5bd766bf6c
docs: update changelog and add script to help generate it (#2733) 2020-12-21 21:04:33 -05:00
Henry Schreiner 02746cb69f docs: add a little more information for releases 2020-11-12 13:06:00 -05:00
Henry Schreiner b7c741b540 docs: back to work after 2.6.1 2020-11-11 19:27:41 -05:00
Henry Schreiner f1abf5d915
docs: changelog update (#2652) 2020-11-11 16:33:21 -05: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
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
Henry Schreiner 2e31e466dc docs: update for PyPy win 32 issue 2020-10-15 17:38:49 -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 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 993495c96c
fix: Intel 18+ required (#2577)
* fix: Intel 18+ fully supported

* fix: Intel compiler workaround no longer needed

Followup on #94 now that Intel 18+ is required.
2020-10-12 16:31:44 -04:00
Henry Schreiner e4e5c49a26
docs: known issues (#2565)
* docs: FAQ CMake updates

* docs: limitations

* ci: don't over label

* docs: update CHANGELOG, add a bit more structure

* ci: label PRs with more labels, and sooner

* docs: updates from @rwgk

* docs: address @YannickJadoul's points
2020-10-09 11:19:13 -04:00
Henry Schreiner b6f37f67ac
docs: minor cleanup (#2555)
* docs: minor cleanup

* ci: fix add-path command

* docs: add example of use in-place

* Update .github/workflows/ci.yml
2020-10-07 20:41:03 -04:00
Henry Schreiner 00edc3001b
fix: PYBIND11_OBJECT required pybind11 namespace (regression) (#2553)
* fix: PYBIND11_OBJECT could only be used inside the pybind11 namespace (regression)

* docs: add changelog for conversion protection change

* ci: update to Python 3.9
2020-10-06 10:04:13 -04:00
Henry Schreiner 9a0c96dd4c
feat: py::prepend tag (#1131)
* feat: add a priority overload with py::prepend

* doc: fix wording as suggested by rwgk

* feat: add get_pointer

* refactor: is_prepended -> prepend (internal)

* docs: suggestion from @wjakob

* tests: add test covering get_pointer/set_pointer
2020-10-05 22:36:33 -04:00
Henry Schreiner 6bcd220c8d
refactor: module -> module_ with typedef (#2544)
* WIP: module -> module_ without typedef

* refactor: allow py::module to work again
2020-10-03 13:38:03 -04:00
Henry Schreiner 560ed3e34f
docs: fix odd spacing 2020-10-02 22:38:29 -04:00
Henry Schreiner 3488494a81
refactor: import check as a common function (#2526)
* feat: import check as a common function

* docs: add cmake to docs
2020-10-02 22:34:22 -04:00
Yannick Jadoul 9796fe98fc
feat: vectorize functions with void return type (#1969)
* Allow function/functor passed to py::vectorize to return void

* Stealing @sizmailov's test and fixing unused argument warning

* Add missing std::move()

RVO doesn't work here because function return type is different from
actual returned type

* remove extra EOL

* docs: add a few details

* chore: pre-commit autoupdate

* Remove array_iterator, array_begin, and array_end (in detail namespace)

Co-authored-by: Sergei Izmailov <sergei.a.izmailov@gmail.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2020-10-02 15:30:34 -04:00
Boris Staletic 5ebc78164d
Allow raw unions without base classes in is_accessible_base_of (#2320)
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2020-10-02 09:39:22 -04:00
Boris Staletic d3c999c774
fix: rename `pybind11::module` to `pybind11::module_` (#2489)
Support C++20. For backwards compatibility, we provide an alias for the old name.
This change is necessary to easily avoid errors when a compiler thinks
`module` is used as a keyword.
2020-09-16 17:15:42 -04:00
Henry Schreiner e37921d761
refactor: drop mkdoc and update changelog (#2491)
* refactor: drop mkdoc

* docs: update changelog
2020-09-16 17:14:06 -04:00
Henry Schreiner fd61f5038e
feat: setup.py redesign and helpers (#2433)
* feat: setup.py redesign and helpers

* refactor: simpler design with two outputs

* refactor: helper file update and Windows support

* fix: review points from @YannickJadoul

* refactor: fixes to naming and more docs

* feat: more customization points

* feat: add entry point pybind11-config

* refactor: Try Extension-focused method

* refactor: rename alt/inplace to global

* fix: allow usage with git modules, better docs

* feat: global as an extra (@YannickJadoul's suggestion)

* feat: single version location

* fix: remove the requirement that setuptools must be imported first

* fix: some review points from @wjacob

* fix: use .in, add procedure to docs

* refactor: avoid monkeypatch copy

* docs: minor typos corrected

* fix: minor points from @YannickJadoul

* fix: typo on Windows C++ mode

* fix: MSVC 15 update 3+ have c++14 flag

See <https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019>

* docs: discuss making SDists by hand

* ci: use pep517.build instead of manual setup.py

* refactor: more comments from @YannickJadoul

* docs: updates from @ktbarrett

* fix: change to newly recommended tool instead of pep517.build

This was intended as a proof of concept; build seems to be the correct replacement.

See https://github.com/pypa/pep517/pull/83

* docs: updates from @wjakob

* refactor: dual version locations

* docs: typo spotted by @wjakob
2020-09-16 17:13:41 -04:00
Henry Schreiner 41aa92601e
refactor: replace .get_type with type::handle_of (#2492)
* refactor: replace .get_type with type::handle_of

* refactor: use impl for handle_of

* fix: deprecate h.get_type()
2020-09-16 11:32:17 -04:00
Yannick Jadoul d65e34d61d
Resolve empty statement warning when using PYBIND11_OVERLOAD_PURE_NAME and PYBIND11_OVERLOAD_PURE (#2325)
* Wrap PYBIND11_OVERLOAD_NAME and PYBIND11_OVERLOAD_PURE_NAME in do { ... } while (false), and resolve trailing semicolon

* Deprecate PYBIND11_OVERLOAD_* and get_overload in favor of PYBIND11_OVERRIDE_* and get_override

* Correct erroneous usage of 'overload' instead of 'override' in the implementation and internals

* Fix tests to use non-deprecated PYBIND11_OVERRIDE_* macros

* Update docs to use override instead of overload where appropriate, and add warning about deprecated aliases

* Add semicolons to deprecated PYBIND11_OVERLOAD macros to match original behavior

* Remove deprecation of PYBIND11_OVERLOAD_* macros and get_overload

* Add note to changelog and upgrade guide
2020-09-15 14:56:20 +02:00
andriish 38370a87f4
fix: support NVIDIA-PGI HPC SDK (#2475)
* Added guards to the includes

Added new CI config

Added new trigger

Changed CI workflow name

Debug CI

Debug CI

Debug CI

Debug CI

Added flags fro PGI

Disable Eigen

Removed tests that fail

Uncomment lines

* fix: missing include

fix: minor style cleanup

tests: support skipping

ci: remove and tighten a bit

fix: try msvc workaround for pgic

* tests: split up prealoc tests

* fix: PGI compiler fix

* fix: PGI void_t only

* fix: try to appease nvcc

* ci: better ordering for slow tests

* ci: minor improvements to testing

* ci: Add NumPy to testing

* ci: Eigen generates CUDA warnings / PGI errors

* Added CentOS7 back for a moment

* Fix YAML

* ci: runs-on missing

* centos7 is missing pytest

* ci: use C++11 on CentOS 7

* ci: test something else

* Try just adding flags on CentOS 7

* fix: CentOS 7

* refactor: move include to shared location

* Added verbose flag

* Try to use system cmake3 on CI

* Try to use system cmake3 on CI, attempt2

* Try to use system cmake3 on CI, attempt3

* tests: not finding pytest should be a warning, not a fatal error

* tests: cleanup

* Weird issue?

* fix: final polish

Co-authored-by: Andrii Verbytskyi <andrii.verbytskyi@mpp.mpg.de>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Andrii Verbytskyi <averbyts@cern.ch>
2020-09-11 22:06:52 -04:00
Henry Schreiner 37f845a1dc
ci: disallow some common capitalization mistakes (#2472)
* ci: only annotate linux for now

* style: block some common mistakes
2020-09-08 15:26:50 +02:00
Wenzel Jakob 36c666f027 pybind11_add_module(): OPT_SIZE target 2020-09-06 16:46:38 +02:00
Henry Schreiner 0dbda6e80b
feat: py::pos_only (#2459)
* feat: py::pos_only

* fix: review points from @YannickJadoul

* fix: review points from @bstaletic

* refactor: kwonly -> kw_only
2020-09-04 20:02:05 -04:00
Henry Schreiner a6887b604a docs: update changelog and versionadded 2020-08-20 14:42:00 -04:00
Henry Schreiner 1729aae96f
feat: new FindPython support (#2370)
* feat: FindPython support

* refactor: rename to PYBIND11_FINDPYTHON

* docs: Caps fixes

* feat: NOPYTHON mode

* test: check simple call

* docs: add changelog/upgrade guide

* feat: Support Python3 and Python2

* refactor: Use targets in tests

* fix: support CMake 3.4+

* feat: classic search also finds virtual environments

* docs: some updates from @wjakob's review

* fix: wrong name for QUIET mode variable, reported by @skoslowski

* refactor: cleaner output messaging

* fix: support debug Python's in FindPython mode too

* fixup! refactor: cleaner output messaging

* fix: missing pybind11_FOUND and pybind11_INCLUDE_DIR restored to subdir mode

* fix: nicer reporting of Python / PyPy

* fix: out-of-order variable fix

* docs: minor last-minute cleanup
2020-08-19 12:26:26 -04:00
Wenzel Jakob 3b1dbebabc v2.5.0 release 2020-03-31 13:00:39 +02:00
Wenzel Jakob 80d452484c v2.4.3 release 2019-10-15 01:57:24 +02:00
Wenzel Jakob 7ec2ddfc95 v2.4.2 release 2019-09-21 20:20:26 +02:00
Wenzel Jakob e44fcc3c15 v2.4.1 release 2019-09-20 11:10:49 +02:00
Wenzel Jakob 5fd187ebe9 minor changelog cleanup
[ci skip]
2019-09-20 10:49:54 +02:00
Wenzel Jakob 00a0aa9929 v2.4.0 release 2019-09-19 23:06:22 +02:00
Andre Schmeißer 19189b4c2c Make `overload_cast_impl` available in C++11 mode. (#1581)
* Make `overload_cast_impl` available in C++11 mode.

Narrow the scope of the `#if defined(PYBIND11_CPP14)` block around overload_cast to only
cover the parts where C++14 is stricly required. Thus, the implementation in
`pybind11::details::overload_cast_impl` is still available in C++11 mode.

* PR #1581: Modify test to use overload_cast_impl, update docs and change log
2019-08-19 12:54:33 +02:00
Wenzel Jakob 64f2a5f8e6 begin work on v2.3.1 2019-06-12 21:03:40 +02:00
Wenzel Jakob cf36e3d9ba updated changelog 2019-06-11 23:28:58 +02:00
Chris Rusby 22859bb8fc Support more natural syntax for vector extend 2019-06-11 23:28:58 +02:00
Allan Leal e76dff7751 Fix for Issue #1258 (#1298)
* Fix for Issue #1258

list_caster::load method will now check for a Python string and prevent its automatic conversion to a list.
This should fix the issue "pybind11/stl.h converts string to vector<string> #1258" (https://github.com/pybind/pybind11/issues/1258)

* Added tests for fix of issue #1258

* Changelog: stl string auto-conversion
2018-10-11 10:28:12 +02:00
Wenzel Jakob f4245181ae enum_: move most functionality to a non-template implementation
This commit addresses an inefficiency in how enums are created in
pybind11. Most of the enum_<> implementation is completely generic --
however, being a template class, it ended up instantiating vast amounts
of essentially identical code in larger projects with many enums.

This commit introduces a generic non-templated helper class that is
compatible with any kind of enumeration. enum_ then becomes a thin
wrapper around this new class.

The new enum_<> API is designed to be 100% compatible with the old one.
2018-09-11 22:08:26 +02:00
Wenzel Jakob 35c82c7250 changelog for version 2.2.4 & features targeted for 2.3.0 2018-09-11 10:41:30 +02:00
luzpaz 4b874616b2 Misc. typos (#1384)
Found via `codespell`
2018-05-06 10:54:10 -03:00
Wenzel Jakob f5f6618962 updated changelog for v2.2.3 2018-04-29 15:47:13 +02:00
Lori A. Burns bdbe8d0bde Enforces intel icpc >= 2017, fixes #1121 (#1363) 2018-04-29 13:48:25 +02:00
Wenzel Jakob 2d0507db43 added v2.2.2 changelog 2018-02-07 11:05:41 +01:00