Skip to content

Commit 7e8d26b

Browse files
authored
3.13 support (#2260)
1 parent f82f936 commit 7e8d26b

File tree

18 files changed

+48
-22
lines changed

18 files changed

+48
-22
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
20+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]
2121
architecture: ["x64", "x86"]
2222

2323
steps:
@@ -30,6 +30,7 @@ jobs:
3030
architecture: ${{ matrix.architecture }}
3131
cache: pip
3232
cache-dependency-path: .github/workflows/main.yml
33+
check-latest: true
3334

3435
- name: Setup environment
3536
run: |
@@ -66,8 +67,7 @@ jobs:
6667
strategy:
6768
fail-fast: false
6869
matrix:
69-
python-version: ["3.10", "3.11", "3.12-dev"]
70-
70+
python-version: ["3.10", "3.11", "3.12", "3.13-dev"]
7171
steps:
7272
- uses: actions/checkout@v4
7373

@@ -78,6 +78,7 @@ jobs:
7878
architecture: "x64"
7979
cache: pip
8080
cache-dependency-path: .github/workflows/main.yml
81+
check-latest: true
8182

8283
- name: Setup Environment
8384
run: |
@@ -137,6 +138,7 @@ jobs:
137138
python-version: ${{ matrix.python-version }}
138139
cache: pip
139140
cache-dependency-path: .github/workflows/main.yml
141+
check-latest: true
140142
- run: pip install types-regex types-setuptools mypy==1.9
141143
- run: mypy . --python-version=${{ matrix.python-version }}
142144

@@ -145,14 +147,15 @@ jobs:
145147
strategy:
146148
fail-fast: false
147149
matrix:
148-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
150+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]
149151
steps:
150152
- uses: actions/checkout@v4
151153
- uses: actions/setup-python@v5
152154
with:
153155
python-version: ${{ matrix.python-version }}
154156
cache: pip
155157
cache-dependency-path: .github/workflows/main.yml
158+
check-latest: true
156159
# pyright vendors typeshed, but let's make sure we have the most up to date stubs
157160
- run: pip install types-regex types-setuptools
158161
- uses: jakebailey/pyright-action@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ venv.bak/
7575
.idea/
7676
.DS_Store
7777
vagrant_helpers/bootstrap-salt.ps1
78+
.vscode/

Pythonwin/win32thread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ unsigned int ThreadWorkerEntryPoint(LPVOID lpvoid)
164164
{
165165
CPythonWinThread *pThis = (CPythonWinThread *)lpvoid;
166166
CEnterLeavePython _celp;
167-
PyObject *result = PyEval_CallObject(pThis->obFunc, pThis->obArgs);
167+
PyObject *result = PyObject_CallObject(pThis->obFunc, pThis->obArgs);
168168
if (result == NULL) {
169169
if (PyErr_Occurred() == PyExc_SystemExit)
170170
PyErr_Clear();

Pythonwin/win32uimodule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ static DWORD FilterFunc(DWORD dwExceptionCode)
600600
return (dwRet);
601601
}
602602

603-
PyObject *gui_call_object(PyObject *themeth, PyObject *thearglst) { return PyEval_CallObject(themeth, thearglst); }
603+
PyObject *gui_call_object(PyObject *themeth, PyObject *thearglst) { return PyObject_CallObject(themeth, thearglst); }
604604

605605
void gui_print_error(void)
606606
{

adodbapi/test/adodbapitest.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,17 +1546,29 @@ def testTimestamp(self):
15461546
assert t1 < obj < t2, obj
15471547

15481548

1549-
suites = [unittest.makeSuite(TestPythonDateTimeConverter, "test")]
1549+
suites = [
1550+
unittest.defaultTestLoader.loadTestsFromModule(TestPythonDateTimeConverter, "test")
1551+
]
15501552
if config.doTimeTest:
1551-
suites.append(unittest.makeSuite(TestPythonTimeConverter, "test"))
1553+
suites.append(
1554+
unittest.defaultTestLoader.loadTestsFromModule(TestPythonTimeConverter, "test")
1555+
)
15521556
if config.doAccessTest:
1553-
suites.append(unittest.makeSuite(TestADOwithAccessDB, "test"))
1557+
suites.append(
1558+
unittest.defaultTestLoader.loadTestsFromModule(TestADOwithAccessDB, "test")
1559+
)
15541560
if config.doSqlServerTest:
1555-
suites.append(unittest.makeSuite(TestADOwithSQLServer, "test"))
1561+
suites.append(
1562+
unittest.defaultTestLoader.loadTestsFromModule(TestADOwithSQLServer, "test")
1563+
)
15561564
if config.doMySqlTest:
1557-
suites.append(unittest.makeSuite(TestADOwithMySql, "test"))
1565+
suites.append(
1566+
unittest.defaultTestLoader.loadTestsFromModule(TestADOwithMySql, "test")
1567+
)
15581568
if config.doPostgresTest:
1559-
suites.append(unittest.makeSuite(TestADOwithPostgres, "test"))
1569+
suites.append(
1570+
unittest.defaultTestLoader.loadTestsFromModule(TestADOwithPostgres, "test")
1571+
)
15601572

15611573

15621574
class cleanup_manager:

build_all.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ py -3.12-32 setup.py -q build
2222
@if errorlevel 1 goto failed
2323
py -3.12 setup.py -q build
2424
@if errorlevel 1 goto failed
25+
py -3.13-32 setup.py -q build
26+
@if errorlevel 1 goto failed
27+
py -3.13 setup.py -q build
28+
@if errorlevel 1 goto failed
2529

2630
goto xit
2731
:failed

com/win32com/src/oleargs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1671,7 +1671,7 @@ BOOL PyCom_MakeOlePythonCall(PyObject *handler, DISPPARAMS FAR *params, VARIANT
16711671
argList = Py_BuildValue("OO", varArgs, addnlArgs);
16721672
Py_DECREF(varArgs);
16731673
}
1674-
PyObject *result = PyEval_CallObject(handler, argList);
1674+
PyObject *result = PyObject_CallObject(handler, argList);
16751675
Py_XDECREF(argList);
16761676
Py_XDECREF(namedArgList);
16771677
// handlers reference cleaned up by virtual manager.

com/win32com/src/univgw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static HRESULT univgw_dispatch(DWORD index, gw_object *_this, va_list argPtr)
9898
PyTuple_SET_ITEM(obArgs, 2, obArgPtr);
9999

100100
// call the provided method
101-
PyObject *result = PyEval_CallObjectWithKeywords(vtbl->dispatcher, obArgs, NULL);
101+
PyObject *result = PyObject_CallObject(vtbl->dispatcher, obArgs);
102102

103103
// done with the arguments and the contained objects
104104
Py_DECREF(obArgs);

com/win32com/test/testIterators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def suite():
132132
and issubclass(item, unittest.TestCase)
133133
and item != _BaseTestCase
134134
):
135-
suite.addTest(unittest.makeSuite(item))
135+
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(item))
136136
return suite
137137

138138

com/win32comext/shell/src/shell.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ static int CALLBACK PyBrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LP
10681068
#endif
10691069
if (!args)
10701070
goto done;
1071-
result = PyEval_CallObject(pc->fn, args);
1071+
result = PyObject_CallObject(pc->fn, args);
10721072
// API says must return 0, but there might be a good reason.
10731073
if (result && PyLong_Check(result))
10741074
rc = PyLong_AsLong(result);

0 commit comments

Comments
 (0)