* Use PyConfig_InitPythonConfig instead of PyConfig_InitIsolatedConfig
* add unit test for default python configuration
---------
Co-authored-by: Daniel Jacobs <daniel.jacobs@is4s.com>
* Resolve flake8 error by replacing `pytest.raises(Exception)` with `SystemError`
* Also remove the obsolete comment.
* Tweak comment instead of removing it.
* Make sure to properly untrack gc objects before freeing them
* style: pre-commit fixes
* Fix lint
* Add comment about where the original track comes from
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* docs: update changelog for v2.10.3
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* chore: bump versions for 2.10.3
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* chore: fix make changelog script with entry is empty
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Remove clang 10 C++20 (it broke recently), add clang 15 C++20 while we are at it.
* No luck trying clang15: Error response from daemon: manifest for silkeh/clang:15 not found: manifest unknown: manifest unknown. Giving up, this needs to be a separate PR.
* chore: update clang-tidy to 15
* Add git
* Add NOLINTNEXTLINE for assignment in if
* Update CONTRIBUTING.md
* Add NOLINTNEXTLINE where needed
* Add one more NOLINTNEXTLINE
* stl_bind: make more readable
* Another missing NOLINTNEXTLINE
* Match style elsewhere
* Apply reviewer suggestion. Mark false positive
* docs: changelog for next version
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* docs: address feedback
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Revert "Systematically add `-DCMAKE_VERBOSE_MAKEFILE=ON` to obtain full command lines related to `-Wodr` (#4398)"
This reverts commit ff42f5254a.
* Set `env: VERBOSE: 1` as suggested by @henryiii
* Set `env: VERBOSE: 1` also in all other .yml files using cmake
* Create templated abstract classes KeysView, ValuesView and ItemsView, and implement them on-the-fly when wrapping any specific map type
* We don't want to wrap different ValuesView objects for double values and const double, for example, as both wrappers will be named ValuesView[float]
* Fallback to C++ names if key or values types are not wrapped
* Added a test for .keys(), .values() and .items() returning the same types for similarly-typed maps
* Fixed wrong use of auto in a declarator list: the two descriptions might have different types
* Fixes for clang-tidy issues: explicit single-argument constructor, using the 'override' keyword when overriding functions
* Bugfix for old versions of clang++, which seem to have trouble with the struct being defined inside a module, which was also needlessly ugly anyway
* Bugfix for clang++, which doesn't have some of the names in runtime uness they are specified to be static
* A fix for clang-tidy performance-inefficient-string-concatenation issues - I personally think this looks uglier, but it's probably worth it for clang-tidy to be happy
* Possible fix for clang++ linking issues - make the descriptions static constexpr to make sure they are known before linking
* Correct names for previously-wrapped types as keys/values of maps
* Bugfix - typo in type info names which caused things to segfault
* Apply suggestions from code review
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
* Use detail::remove_cvref_t instead of doing remove_cv and remove_reference separately
* Avoid names with double underscore, as they are reserved
* Improved testing for KeysView, ValuesView and ItemsView: check type names + stricter asserts
* Moved description logic to helper function in type_caster_base.h
* style: pre-commit fixes
* Fix a clang-tidy issue: do not use 'else' after 'return'
* Apply suggestion by @Skylion007, with additional trivial simplification.
Co-authored-by: Amir <aimir@local>
Co-authored-by: aimir <aimir@localhost>
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
* Replace 🐍 3.6 • ubuntu-latest • x64 -DPYBIND11_FINDPYTHON=ON -DCMAKE_CXX_FLAGS="-D_=1" with 3.9
* Revert "Replace 🐍 3.6 • ubuntu-latest • x64 -DPYBIND11_FINDPYTHON=ON -DCMAKE_CXX_FLAGS="-D_=1" with 3.9"
This reverts commit 3ec984e1ed.
* Systematically change all active ubuntu-latest to ubuntu-20.04, except in upstream.yml
* Revert "Systematically change all active ubuntu-latest to ubuntu-20.04, except in upstream.yml"
This reverts commit cdfd99526a.
* Change only some ubuntu-latest to ubuntu-20.04
* scoped_interpreter overloaded ctor: PyConfig param
* style: pre-commit fixes
* refact: some logics extracted into funcs (precheck_interpreter, _initialize_interpreter); config_guard
* style: pre-commit fixes
* refact: scoped_config, some funcs hidden in detail ns
* refact: macro PYBIND11_PYCONFIG_SUPPORT_PY_VERSION + undef
* feat: PYBIND11_PYCONFIG_SUPPORT_PY_VERSION set to 3.8
* tests: Custom PyConfig
* ci: python 3.6 -> 3.8
* ci: reverted py 38 back to 36; refact: initialize_interpreter overloads
* style: pre-commit fixes
* fix: readability-implicit-bool-conversion
* refact: each initialize_interpreter overloads in pybind11 ns
* Move `initialize_interpreter_pre_pyconfig()` into the `detail` namespace.
Move the `PYBIND11_PYCONFIG_SUPPORT_PY_VERSION_HEX` define down to where it is used for the first time, and check if it is defined already, so that it is possible to customize from the compilation command line, just in case there is some unforeseen issue for Python 3.8, 3.9, 3.10.
* tests: Add program dir to path, Custom PyConfig with argv
* refact: clang-formatted
* tests: Add-program-dir-to-path covers both scoped_interpreter overloads
* tests: Add-program-dir-to-path fixed
* tests: Add-program-dir-to-path py_version dependant validation
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>