Skip to content

Commit

Permalink
Merge pull request #1236 from sys-bio/update-numpy
Browse files Browse the repository at this point in the history
Move to numpy 2 and Python 3.13
  • Loading branch information
luciansmith authored Oct 24, 2024
2 parents 659114f + d00e9e0 commit 712ce0b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
numpy~=1.26
numpy~=2.1
4 changes: 2 additions & 2 deletions wrappers/Python/roadrunner/PyEventListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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()) {

Expand Down
4 changes: 2 additions & 2 deletions wrappers/Python/roadrunner/PyIntegratorListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {

Expand Down Expand Up @@ -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()) {

Expand Down

0 comments on commit 712ce0b

Please sign in to comment.