Skip to content

Commit 5371e59

Browse files
authored
Merge pull request #2994 from Starbuck5/3.13-support
3.13 source support (removes deprecated functions)
2 parents 6d8007c + f55a2e4 commit 5371e59

File tree

7 files changed

+1408
-32
lines changed

7 files changed

+1408
-32
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ repos:
2222
| docs/reST/_static/script.js
2323
| docs/reST/_templates/header.h
2424
| src_c/include/sse2neon.h
25+
| src_c/include/pythoncapi_compat.h
2526
| src_c/pypm.c
2627
)$

src_c/_camera.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1951,7 +1951,6 @@ MODINIT_DEFINE(_camera)
19511951
}
19521952

19531953
/* type preparation */
1954-
// PyType_Init(pgCamera_Type);
19551954
pgCamera_Type.tp_new = PyType_GenericNew;
19561955
if (PyType_Ready(&pgCamera_Type) < 0) {
19571956
return NULL;

src_c/_pygame.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
*/
3434
#define PY_SSIZE_T_CLEAN
3535
#include <Python.h>
36+
#include "include/pythoncapi_compat.h"
3637

3738
/* Ensure PyPy-specific code is not in use when running on GraalPython (PR
3839
* #2580) */
@@ -458,19 +459,6 @@ typedef enum {
458459
(RAISE(PyExc_NotImplementedError, "Python built without thread support"))
459460
#endif /* ~WITH_THREAD */
460461

461-
#define PyType_Init(x) (((x).ob_type) = &PyType_Type)
462-
463-
/* Python macro for comparing to Py_None
464-
* Py_IsNone is naturally supported by
465-
* Python 3.10 or higher
466-
* so this macro can be removed after the minimum
467-
* supported
468-
* Python version reaches 3.10
469-
*/
470-
#ifndef Py_IsNone
471-
#define Py_IsNone(x) (x == Py_None)
472-
#endif
473-
474462
/* Update this function if new sequences are added to the fast sequence
475463
* type. */
476464
#ifndef pgSequenceFast_Check

0 commit comments

Comments
 (0)