diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a6795bb06b..5bf53f13b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,10 +80,10 @@ jobs: shell: bash # v1 should be the earliest supported version, and v4 the latest. Tests are only run on v1 and v4. run: | - echo "python_v1=3.9" >> $GITHUB_ENV - echo "python_v2=3.10" >> $GITHUB_ENV - echo "python_v3=3.11" >> $GITHUB_ENV - echo "python_v4=3.12" >> $GITHUB_ENV + echo "python_v1=3.10" >> $GITHUB_ENV + echo "python_v2=3.11" >> $GITHUB_ENV + echo "python_v3=3.12" >> $GITHUB_ENV + echo "python_v4=3.13" >> $GITHUB_ENV echo "python_v1_name=v1" >> $GITHUB_ENV echo "python_v2_name=v2" >> $GITHUB_ENV echo "python_v3_name=v3" >> $GITHUB_ENV @@ -99,7 +99,7 @@ jobs: - name: Setup Python for non-Manylinux platforms if: matrix.platform.build_python == 'ON' && matrix.platform.os_type != 'manylinux' - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 id: four_pythons with: python-version: | @@ -214,7 +214,7 @@ jobs: - name: Set MSVC as the default compiler on Windows if: matrix.platform.os_type == 'windows' - uses: ilammy/msvc-dev-cmd@v1.12.1 + uses: ilammy/msvc-dev-cmd@v1 - name: Upgrade gcc on Linux if: matrix.platform.os_type == 'manylinux' @@ -446,7 +446,7 @@ jobs: echo "artifacts_path=${RUNNER_WORKSPACE}/install-roadrunner" >> $GITHUB_ENV - name: Upload roadrunner binaries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.artifacts_name }} path: ${{ env.artifacts_path }} @@ -587,7 +587,7 @@ jobs: - name: Upload RoadRunner Python wheel artifacts if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.roadrunner_python_wheel_artifacts_name }} path: ${{ env.roadrunner_python_wheel_artifacts_file }} diff --git a/requirements.txt b/requirements.txt index 210ba6aec0..9cbf1e39cc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -numpy~=1.26 +numpy~=2.1 diff --git a/wrappers/Python/roadrunner/PyEventListener.h b/wrappers/Python/roadrunner/PyEventListener.h index e341c1af82..3d02fbd919 100644 --- a/wrappers/Python/roadrunner/PyEventListener.h +++ b/wrappers/Python/roadrunner/PyEventListener.h @@ -117,7 +117,7 @@ class PyEventListener : public EventListener */ PyObject *args = Py_BuildValue("(N, i, s)", pyModel, index, eventId.c_str()); - PyObject *pyres = PyEval_CallObject(pyOnTrigger, args); + PyObject *pyres = PyObject_Call(pyOnTrigger, args, NULL); if (PyErr_Occurred()) { @@ -170,7 +170,7 @@ class PyEventListener : public EventListener PyObject *pyModel = ExecutableModel_NewPythonObj(model); PyObject *args = Py_BuildValue("(N, i, s)", pyModel, index, eventId.c_str()); - PyObject *pyres = PyEval_CallObject(pyOnAssignment, args); + PyObject *pyres = PyObject_Call(pyOnAssignment, args, NULL); if (PyErr_Occurred()) { diff --git a/wrappers/Python/roadrunner/PyIntegratorListener.h b/wrappers/Python/roadrunner/PyIntegratorListener.h index 035d74916f..8825c184d9 100644 --- a/wrappers/Python/roadrunner/PyIntegratorListener.h +++ b/wrappers/Python/roadrunner/PyIntegratorListener.h @@ -109,7 +109,7 @@ class PyIntegratorListener : public IntegratorListener */ PyObject *args = Py_BuildValue("(N, N, d)", pyIntegrator, pyModel, time); - PyObject *pyres = PyEval_CallObject(pyOnTimeStep, args); + PyObject *pyres = PyObject_Call(pyOnTimeStep, args, NULL); if (PyErr_Occurred()) { @@ -168,7 +168,7 @@ class PyIntegratorListener : public IntegratorListener PyObject *pyIntegrator = Integrator_NewPythonObj(integrator); PyObject *pyModel = ExecutableModel_NewPythonObj(model); PyObject *args = Py_BuildValue("(N, N, s)", pyIntegrator, pyModel, time); - PyObject *pyres = PyEval_CallObject(pyOnEvent, args); + PyObject *pyres = PyObject_Call(pyOnEvent, args, NULL); if (PyErr_Occurred()) {