Skip to content

Commit 5f9b090

Browse files
authored
ci: fix PyPy (#3768)
* chore: minor fixes for newer PyPys * ci: fix issue with PyPy
1 parent 061c617 commit 5f9b090

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
- '3.6'
3131
- '3.9'
3232
- '3.10'
33-
- 'pypy-3.7-v7.3.7'
34-
- 'pypy-3.8-v7.3.7'
33+
- 'pypy-3.7'
34+
- 'pypy-3.8'
3535

3636
# Items in here will either be added to the build matrix (if not
3737
# present), or add new keys to an existing matrix element if all the

include/pybind11/detail/class.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ inline PyTypeObject *make_static_property_type() {
101101
inline PyTypeObject *make_static_property_type() {
102102
auto d = dict();
103103
PyObject *result = PyRun_String(R"(\
104-
class pybind11_static_property(property):
105-
def __get__(self, obj, cls):
106-
return property.__get__(self, cls, cls)
107-
108-
def __set__(self, obj, value):
109-
cls = obj if isinstance(obj, type) else type(obj)
110-
property.__set__(self, cls, value)
111-
)",
104+
class pybind11_static_property(property):
105+
def __get__(self, obj, cls):
106+
return property.__get__(self, cls, cls)
107+
108+
def __set__(self, obj, value):
109+
cls = obj if isinstance(obj, type) else type(obj)
110+
property.__set__(self, cls, value)
111+
)",
112112
Py_file_input,
113113
d.ptr(),
114114
d.ptr());

include/pybind11/pybind11.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class cpp_function : public function {
334334
const std::type_info *const *types,
335335
size_t args) {
336336
// Do NOT receive `unique_rec` by value. If this function fails to move out the unique_ptr,
337-
// we do not want this to destuct the pointer. `initialize` (the caller) still relies on
337+
// we do not want this to destruct the pointer. `initialize` (the caller) still relies on
338338
// the pointee being alive after this call. Only move out if a `capsule` is going to keep
339339
// it alive.
340340
auto *rec = unique_rec.get();

noxfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import nox
44

5+
nox.needs_version = ">=2022.1.7"
56
nox.options.sessions = ["lint", "tests", "tests_packaging"]
67

78
PYTHON_VERISONS = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.7", "pypy3.8"]
@@ -29,14 +30,12 @@ def tests(session: nox.Session) -> None:
2930
session.install("-r", "tests/requirements.txt")
3031
session.run(
3132
"cmake",
32-
"-S",
33-
".",
34-
"-B",
35-
tmpdir,
33+
"-S.",
34+
f"-B{tmpdir}",
3635
"-DPYBIND11_WERROR=ON",
3736
"-DDOWNLOAD_CATCH=ON",
3837
"-DDOWNLOAD_EIGEN=ON",
39-
*session.posargs
38+
*session.posargs,
4039
)
4140
session.run("cmake", "--build", tmpdir)
4241
session.run("cmake", "--build", tmpdir, "--config=Release", "--target", "check")

0 commit comments

Comments
 (0)