From 5b6225d666f364ae0387bd303167c8f03cf34b1d Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Mon, 9 Sep 2024 14:59:43 -0500 Subject: [PATCH] Release simuPOP 1.1.17 --- README.md | 3 +++ setup.py | 2 +- src/_version.py | 4 ++-- src/utility.cpp | 10 +++------- src/utility.h | 8 ++++---- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index d2cf9138..971c12c4 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,9 @@ The user guide and reference manual of simuPOP is available at http://bopeng.git ## Change Log since 1.1.7 +### simuPOP 1.1.17 +* Fix compatibility with Python 3.13 and latest version of Xcode on mac. + ### simuPOP 1.1.16 * [#103](https://github.com/BoPeng/simuPOP/issues/103) Fix compatibility with recent compilers with c++17 support, and fix conda-forge release. diff --git a/setup.py b/setup.py index 54028463..76de35e1 100755 --- a/setup.py +++ b/setup.py @@ -98,7 +98,7 @@ def is_maverick(): # versions are not available, and will most likely work just fine. boost_versions = ['1_35_0', '1_36_0', '1_37_0', '1_38_0', '1_39_0', '1_40_0', '1_42_0', '1_43_0', '1_44_0', '1_45_0', '1_46_0', '1_46_1', '1_47_0', - '1_48_0', '1_62_0', '1_72_0', '1_74_0'] + '1_48_0', '1_62_0', '1_72_0', '1_74_0', '1_86_0'] invalid_boost_versions = ['1_41_0', '1_71_0'] included_version = [x for x in boost_versions if os.path.isdir('boost_' + x)] diff --git a/src/_version.py b/src/_version.py index 599ff06f..a2bf1128 100644 --- a/src/_version.py +++ b/src/_version.py @@ -1,2 +1,2 @@ -__version__="1.1.16" -__revision__="4681" +__version__="1.1.17" +__revision__="4682" diff --git a/src/utility.cpp b/src/utility.cpp index 17e9cd2a..002d8704 100644 --- a/src/utility.cpp +++ b/src/utility.cpp @@ -3178,20 +3178,16 @@ void StreamProvider::closeOstream() "Passed function object is invalid"); string str = dynamic_cast(m_filePtr)->str(); // in swingpyrun.h, the PyString_Check is defined to PyBytes_Check -#if PY_VERSION_HEX >= 0x03000000 PyObject * arglist = NULL; PyObject * pyResult = NULL; if (m_mode == "b") { arglist = Py_BuildValue("(S)", PyBytes_FromString(str.c_str())); - pyResult = PyEval_CallObject(m_func.func(), arglist); + pyResult = PyObject_CallObject(m_func.func(), arglist); } else { arglist = Py_BuildValue("(s)", str.c_str()); - pyResult = PyEval_CallObject(m_func.func(), arglist); + pyResult = PyObject_CallObject(m_func.func(), arglist); } -#else - PyObject * arglist = Py_BuildValue("(s)", str.c_str()); - PyObject * pyResult = PyEval_CallObject(m_func.func(), arglist); -#endif + if (pyResult == NULL) { PyErr_Print(); PyErr_Clear(); diff --git a/src/utility.h b/src/utility.h index 3aa5bbeb..8379460a 100644 --- a/src/utility.h +++ b/src/utility.h @@ -376,7 +376,7 @@ class pyFunc va_start(argptr, format); PyObject * arglist = Py_VaBuildValue(const_cast(format), argptr); va_end(argptr); - PyObject * pyResult = PyEval_CallObject(m_func.object(), arglist); + PyObject * pyResult = PyObject_CallObject(m_func.object(), arglist); Py_XDECREF(arglist); if (pyResult == NULL) { @@ -394,7 +394,7 @@ class pyFunc template T operator()(void converter(PyObject *, T &), PyObject * arglist) const { - PyObject * pyResult = PyEval_CallObject(m_func.object(), arglist); + PyObject * pyResult = PyObject_CallObject(m_func.object(), arglist); if (pyResult == NULL) { PyErr_Print(); @@ -415,7 +415,7 @@ class pyFunc va_start(argptr, format); PyObject * arglist = Py_VaBuildValue(const_cast(format), argptr); va_end(argptr); - PyObject * pyResult = PyEval_CallObject(m_func.object(), arglist); + PyObject * pyResult = PyObject_CallObject(m_func.object(), arglist); Py_XDECREF(arglist); if (pyResult == NULL) { @@ -429,7 +429,7 @@ class pyFunc PyObject * operator()(PyObject * args) const { - PyObject * pyResult = PyEval_CallObject(m_func.object(), args); + PyObject * pyResult = PyObject_CallObject(m_func.object(), args); if (pyResult == NULL) { PyErr_Print();