Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dda2c76

Browse files
authored
Support PyPy 3.9 (#49)
GitHub Actions: use Python 3.11 version, rather than 3.11b3.
1 parent 5f2a723 commit dda2c76

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- "3.8"
2323
- "3.9"
2424
- "3.10"
25-
- "3.11.0-beta.3"
25+
- "3.11"
2626
- "pypy2"
2727
- "pypy3"
2828
include:

pythoncapi_compat.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ _Py_SET_SIZE(PyVarObject *ob, Py_ssize_t size)
145145

146146

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

295295

296296
// bpo-39947 added PyThreadState_GetInterpreter() to Python 3.9.0a5
297-
#if PY_VERSION_HEX < 0x030900A5
297+
#if PY_VERSION_HEX < 0x030900A5 || defined(PYPY_VERSION)
298298
PYCAPI_COMPAT_STATIC_INLINE(PyInterpreterState *)
299299
PyThreadState_GetInterpreter(PyThreadState *tstate)
300300
{
@@ -326,7 +326,7 @@ _PyThreadState_GetFrameBorrow(PyThreadState *tstate)
326326

327327

328328
// bpo-39947 added PyInterpreterState_Get() to Python 3.9.0a5
329-
#if PY_VERSION_HEX < 0x030900A5
329+
#if PY_VERSION_HEX < 0x030900A5 || defined(PYPY_VERSION)
330330
PYCAPI_COMPAT_STATIC_INLINE(PyInterpreterState*)
331331
PyInterpreterState_Get(void)
332332
{
@@ -388,7 +388,7 @@ PyThreadState_LeaveTracing(PyThreadState *tstate)
388388

389389

390390
// bpo-37194 added PyObject_CallNoArgs() to Python 3.9.0a1
391-
#if PY_VERSION_HEX < 0x030900A1
391+
#if PY_VERSION_HEX < 0x030900A1 || defined(PYPY_VERSION)
392392
PYCAPI_COMPAT_STATIC_INLINE(PyObject*)
393393
PyObject_CallNoArgs(PyObject *func)
394394
{
@@ -399,7 +399,7 @@ PyObject_CallNoArgs(PyObject *func)
399399

400400
// bpo-39245 made PyObject_CallOneArg() public (previously called
401401
// _PyObject_CallOneArg) in Python 3.9.0a4
402-
#if PY_VERSION_HEX < 0x030900A4
402+
#if PY_VERSION_HEX < 0x030900A4 || defined(PYPY_VERSION)
403403
PYCAPI_COMPAT_STATIC_INLINE(PyObject*)
404404
PyObject_CallOneArg(PyObject *func, PyObject *arg)
405405
{

runtests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
"pypy3",
4848
"pypy3.6",
4949
"pypy3.7",
50+
"pypy3.8",
51+
"pypy3.9",
5052
)
5153

5254

0 commit comments

Comments
 (0)