Skip to content

Commit

Permalink
Support PyPy 3.9 (#49)
Browse files Browse the repository at this point in the history
GitHub Actions: use Python 3.11 version, rather than 3.11b3.
  • Loading branch information
vstinner authored Nov 9, 2022
1 parent 5f2a723 commit dda2c76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-beta.3"
- "3.11"
- "pypy2"
- "pypy3"
include:
Expand Down
10 changes: 5 additions & 5 deletions pythoncapi_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ _Py_SET_SIZE(PyVarObject *ob, Py_ssize_t size)


// bpo-40421 added PyFrame_GetCode() to Python 3.9.0b1
#if PY_VERSION_HEX < 0x030900B1
#if PY_VERSION_HEX < 0x030900B1 || defined(PYPY_VERSION)
PYCAPI_COMPAT_STATIC_INLINE(PyCodeObject*)
PyFrame_GetCode(PyFrameObject *frame)
{
Expand Down Expand Up @@ -294,7 +294,7 @@ PyFrame_GetVarString(PyFrameObject *frame, const char *name)


// bpo-39947 added PyThreadState_GetInterpreter() to Python 3.9.0a5
#if PY_VERSION_HEX < 0x030900A5
#if PY_VERSION_HEX < 0x030900A5 || defined(PYPY_VERSION)
PYCAPI_COMPAT_STATIC_INLINE(PyInterpreterState *)
PyThreadState_GetInterpreter(PyThreadState *tstate)
{
Expand Down Expand Up @@ -326,7 +326,7 @@ _PyThreadState_GetFrameBorrow(PyThreadState *tstate)


// bpo-39947 added PyInterpreterState_Get() to Python 3.9.0a5
#if PY_VERSION_HEX < 0x030900A5
#if PY_VERSION_HEX < 0x030900A5 || defined(PYPY_VERSION)
PYCAPI_COMPAT_STATIC_INLINE(PyInterpreterState*)
PyInterpreterState_Get(void)
{
Expand Down Expand Up @@ -388,7 +388,7 @@ PyThreadState_LeaveTracing(PyThreadState *tstate)


// bpo-37194 added PyObject_CallNoArgs() to Python 3.9.0a1
#if PY_VERSION_HEX < 0x030900A1
#if PY_VERSION_HEX < 0x030900A1 || defined(PYPY_VERSION)
PYCAPI_COMPAT_STATIC_INLINE(PyObject*)
PyObject_CallNoArgs(PyObject *func)
{
Expand All @@ -399,7 +399,7 @@ PyObject_CallNoArgs(PyObject *func)

// bpo-39245 made PyObject_CallOneArg() public (previously called
// _PyObject_CallOneArg) in Python 3.9.0a4
#if PY_VERSION_HEX < 0x030900A4
#if PY_VERSION_HEX < 0x030900A4 || defined(PYPY_VERSION)
PYCAPI_COMPAT_STATIC_INLINE(PyObject*)
PyObject_CallOneArg(PyObject *func, PyObject *arg)
{
Expand Down
2 changes: 2 additions & 0 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
"pypy3",
"pypy3.6",
"pypy3.7",
"pypy3.8",
"pypy3.9",
)


Expand Down

0 comments on commit dda2c76

Please sign in to comment.