ci: fix PyPy (#3768)

* chore: minor fixes for newer PyPys

* ci: fix issue with PyPy
This commit is contained in:
Henry Schreiner 2022-03-01 12:42:52 -05:00
parent 42455b5e1d
commit 80589625c7
4 changed files with 14 additions and 15 deletions

View File

@ -30,8 +30,8 @@ jobs:
- '3.6' - '3.6'
- '3.9' - '3.9'
- '3.10' - '3.10'
- 'pypy-3.7-v7.3.7' - 'pypy-3.7'
- 'pypy-3.8-v7.3.7' - 'pypy-3.8'
# Items in here will either be added to the build matrix (if not # Items in here will either be added to the build matrix (if not
# present), or add new keys to an existing matrix element if all the # present), or add new keys to an existing matrix element if all the

View File

@ -334,7 +334,7 @@ protected:
const std::type_info *const *types, const std::type_info *const *types,
size_t args) { size_t args) {
// Do NOT receive `unique_rec` by value. If this function fails to move out the unique_ptr, // Do NOT receive `unique_rec` by value. If this function fails to move out the unique_ptr,
// we do not want this to destuct the pointer. `initialize` (the caller) still relies on // we do not want this to destruct the pointer. `initialize` (the caller) still relies on
// the pointee being alive after this call. Only move out if a `capsule` is going to keep // the pointee being alive after this call. Only move out if a `capsule` is going to keep
// it alive. // it alive.
auto *rec = unique_rec.get(); auto *rec = unique_rec.get();

View File

@ -1,5 +1,6 @@
import nox import nox
nox.needs_version = ">=2022.1.7"
nox.options.sessions = ["lint", "tests", "tests_packaging"] nox.options.sessions = ["lint", "tests", "tests_packaging"]
PYTHON_VERSIONS = ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] PYTHON_VERSIONS = ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
@ -24,14 +25,12 @@ def tests(session: nox.Session) -> None:
session.install("-r", "tests/requirements.txt") session.install("-r", "tests/requirements.txt")
session.run( session.run(
"cmake", "cmake",
"-S", "-S.",
".", f"-B{tmpdir}",
"-B",
tmpdir,
"-DPYBIND11_WERROR=ON", "-DPYBIND11_WERROR=ON",
"-DDOWNLOAD_CATCH=ON", "-DDOWNLOAD_CATCH=ON",
"-DDOWNLOAD_EIGEN=ON", "-DDOWNLOAD_EIGEN=ON",
*session.posargs *session.posargs,
) )
session.run("cmake", "--build", tmpdir) session.run("cmake", "--build", tmpdir)
session.run("cmake", "--build", tmpdir, "--config=Release", "--target", "check") session.run("cmake", "--build", tmpdir, "--config=Release", "--target", "check")