diff --git a/.circleci/config.yml b/.circleci/config.yml index 2064f017a5..f3ce0e831d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,6 +54,8 @@ jobs: 39) pyenv_py_ver="3.9.1" ;; 310) pyenv_py_ver="3.10.1" ;; 311) pyenv_py_ver="3.11.0" ;; + 312) pyenv_py_ver="3.12.0" ;; + 313) pyenv_py_ver="3.13.1" ;; *) echo "Error: pyenv python version not specified!" && exit 1;; esac @@ -110,5 +112,5 @@ workflows: - manylinux2014-aarch64: matrix: parameters: - NRN_PYTHON_VERSION: ["37", "38", "39", "310", "311"] + NRN_PYTHON_VERSION: ["37", "38", "39", "310", "311", "312", "313"] NRN_NIGHTLY_UPLOAD: ["true"] diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 50d42052a4..d54eade58d 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -21,7 +21,7 @@ on: env: PY_MIN_VERSION: '3.7' - PY_MAX_VERSION: '3.11' + PY_MAX_VERSION: '3.13' jobs: coverage: diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index d31a1ac24d..f0b3528d61 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -22,8 +22,8 @@ on: env: BUILD_TYPE: Release DESIRED_CMAKE_VERSION: 3.15.0 - PY_MIN_VERSION: '3.7' - PY_MAX_VERSION: '3.11' + PY_MIN_VERSION: '3.9' + PY_MAX_VERSION: '3.13' jobs: ci: @@ -40,12 +40,12 @@ jobs: BUILD_TYPE: Release DESIRED_CMAKE_VERSION: 3.15.0 PY_MIN_VERSION: ${{ matrix.config.python_min_version || '3.8' }} - PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.11' }} + PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.12' }} MUSIC_INSTALL_DIR: /opt/MUSIC strategy: matrix: - os: [ macOS-12, ubuntu-20.04] + os: [ macOS-13, ubuntu-20.04] config: - { matrix_eval : "CC=gcc-9 CXX=g++-9", build_mode: "setuptools"} - { matrix_eval : "CC=gcc-8 CXX=g++-8", build_mode: "cmake", music: ON} @@ -148,7 +148,7 @@ jobs: run: | python3 -m venv music-venv source music-venv/bin/activate - python3 -m pip install mpi4py "cython<3" "numpy<2" + python3 -m pip install mpi4py "cython>=3" "numpy>=2" sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR # Stable build: https://github.com/INCF/MUSIC/archive/refs/heads/switch-to-MPI-C-interface.zip @ f33b66ea9348888eed1761738ab48c23ffc8a0d0 @@ -156,7 +156,7 @@ jobs: unzip MUSIC.zip && mv MUSIC-* MUSIC && cd MUSIC ./autogen.sh # workaround for MUSIC on MacOS 12 - if [[ "${{matrix.os}}" == "macOS-12" ]]; then + if [[ "${{matrix.os}}" == "macOS-13" ]]; then MPI_CXXFLAGS="-g" MPI_CFLAGS="-g" MPI_LDFLAGS="-g" CC=mpicc CXX=mpicxx ./configure --with-python-sys-prefix --prefix=$MUSIC_INSTALL_DIR --disable-anysource else ./configure --with-python-sys-prefix --prefix=$MUSIC_INSTALL_DIR --disable-anysource diff --git a/.gitmodules b/.gitmodules index f2349d4d7d..ccc2d85836 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,7 @@ url = https://github.com/neuronsimulator/iv.git [submodule "external/coreneuron"] path = external/coreneuron - url = https://github.com/BlueBrain/CoreNeuron.git + url = https://github.com/neuronsimulator/CoreNeuron.git [submodule "external/catch2"] path = external/catch2 url = https://github.com/catchorg/Catch2.git diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 64383067da..7c6cc94284 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,6 +46,8 @@ stages: python.version: '3.11' Python312: python.version: '3.12' + Python313: + python.version: '3.13' steps: # Secure files documentation: @@ -86,7 +88,7 @@ stages: - job: 'MacOSWheels' timeoutInMinutes: 40 pool: - vmImage: 'macOS-12' + vmImage: 'macOS-13' strategy: matrix: Python37: @@ -113,6 +115,10 @@ stages: python.version: '3.12' python.org.version: '3.12.2' python.installer.name: 'macos11.pkg' + Python313: + python.version: '3.13' + python.org.version: '3.13.1' + python.installer.name: 'macos11.pkg' steps: diff --git a/bldnrnmacpkgcmake.sh b/bldnrnmacpkgcmake.sh index 12ccd1588f..c88ee4c38a 100644 --- a/bldnrnmacpkgcmake.sh +++ b/bldnrnmacpkgcmake.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -ex -default_pythons="python3.8 python3.9 python3.10 python3.11 python3.12" +default_pythons="python3.8 python3.9 python3.10 python3.11 python3.12 python3.13" # distribution built with # bash bldnrnmacpkgcmake.sh # without args, default are the pythons above. diff --git a/ci/win_build_cmake.sh b/ci/win_build_cmake.sh index 116f30a175..4fe81d5fc1 100755 --- a/ci/win_build_cmake.sh +++ b/ci/win_build_cmake.sh @@ -10,7 +10,7 @@ export MSYSTEM_PREFIX=/mingw64 export PATH=/mingw64/bin:$PATH # have compatible cython3 -python3 -m pip install "cython<3" +python3 -m pip install "cython>=3" # if BUILD_SOURCESDIRECTORY not available, use te root of the repo if [ -z "$BUILD_SOURCESDIRECTORY" ]; then @@ -29,9 +29,9 @@ cd $BUILD_SOURCESDIRECTORY/build -DNRN_ENABLE_PYTHON=ON \ -DNRN_ENABLE_RX3D=ON \ -DNRN_RX3D_OPT_LEVEL=2 \ - -DPYTHON_EXECUTABLE=/c/Python37/python.exe \ + -DPYTHON_EXECUTABLE=/c/Python311/python.exe \ -DNRN_ENABLE_PYTHON_DYNAMIC=ON \ - -DNRN_PYTHON_DYNAMIC='c:/Python37/python.exe;c:/Python38/python.exe;c:/Python39/python.exe;c:/Python310/python.exe;c:/Python311/python.exe;c:/Python312/python.exe' \ + -DNRN_PYTHON_DYNAMIC='c:/Python39/python.exe;c:/Python310/python.exe;c:/Python311/python.exe;c:/Python312/python.exe;c:/Python313/python.exe' \ -DCMAKE_INSTALL_PREFIX='/c/nrn-install' \ -DMPI_CXX_LIB_NAMES:STRING=msmpi \ -DMPI_C_LIB_NAMES:STRING=msmpi \ diff --git a/ci/win_download_deps.cmd b/ci/win_download_deps.cmd index 95f2588528..9c9e8d8ad3 100644 --- a/ci/win_download_deps.cmd +++ b/ci/win_download_deps.cmd @@ -9,6 +9,7 @@ pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.9.exe htt pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.10.exe https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe || goto :error pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.11.exe https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe || goto :error pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.12.exe https://www.python.org/ftp/python/3.12.1/python-3.12.1-amd64.exe || goto :error +pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile python-3.13.exe https://www.python.org/ftp/python/3.13.1/python-3.13.1-amd64.exe || goto :error :: mpi pwsh -command Invoke-WebRequest -MaximumRetryCount 4 -OutFile msmpisetup.exe https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe || goto :error diff --git a/ci/win_install_deps.cmd b/ci/win_install_deps.cmd index 88954242de..046e2e3103 100644 --- a/ci/win_install_deps.cmd +++ b/ci/win_install_deps.cmd @@ -3,35 +3,29 @@ :: install all dependencies :: install python -python-3.7.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python37 || goto :error -python-3.8.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python38 || goto :error python-3.9.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python39 || goto :error python-3.10.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python310 || goto :error python-3.11.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python311 || goto :error python-3.12.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python312 || goto :error +python-3.13.exe /passive Include_pip=1 Include_test=0 PrependPath=1 DefaultJustForMeTargetDir=C:\Python313 || goto :error :: fix msvcc version for all python3 -pwsh -command "(Get-Content C:\Python37\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1900'':' | Out-File C:\Python37\Lib\distutils\cygwinccompiler.py" -pwsh -command "(Get-Content C:\Python38\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1916'':' | Out-File C:\Python38\Lib\distutils\cygwinccompiler.py" pwsh -command "(Get-Content C:\Python39\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1927'':' | Out-File C:\Python39\Lib\distutils\cygwinccompiler.py" pwsh -command "(Get-Content C:\Python310\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1929'':' | Out-File C:\Python310\Lib\distutils\cygwinccompiler.py" pwsh -command "(Get-Content C:\Python311\Lib\distutils\cygwinccompiler.py) -replace 'elif msc_ver == ''1600'':', 'elif msc_ver == ''1934'':' | Out-File C:\Python311\Lib\distutils\cygwinccompiler.py" :: fix msvc runtime library for all python -pwsh -command "(Get-Content C:\Python37\Lib\distutils\cygwinccompiler.py) -replace 'msvcr100', 'msvcrt' | Out-File C:\Python37\Lib\distutils\cygwinccompiler.py" -pwsh -command "(Get-Content C:\Python38\Lib\distutils\cygwinccompiler.py) -replace 'msvcr100', 'msvcrt' | Out-File C:\Python38\Lib\distutils\cygwinccompiler.py" pwsh -command "(Get-Content C:\Python39\Lib\distutils\cygwinccompiler.py) -replace 'msvcr100', 'msvcrt' | Out-File C:\Python39\Lib\distutils\cygwinccompiler.py" pwsh -command "(Get-Content C:\Python310\Lib\distutils\cygwinccompiler.py) -replace 'msvcr100', 'msvcrt' | Out-File C:\Python310\Lib\distutils\cygwinccompiler.py" pwsh -command "(Get-Content C:\Python311\Lib\distutils\cygwinccompiler.py) -replace 'msvcr100', 'msvcrt' | Out-File C:\Python311\Lib\distutils\cygwinccompiler.py" :: install numpy -C:\Python37\python.exe -m pip install numpy==1.14.6 "cython < 3" || goto :error -C:\Python38\python.exe -m pip install numpy==1.17.5 "cython < 3" || goto :error -C:\Python39\python.exe -m pip install numpy==1.19.3 "cython < 3" || goto :error -C:\Python310\python.exe -m pip install numpy==1.21.3 "cython < 3" || goto :error -C:\Python311\python.exe -m pip install numpy==1.23.5 "cython < 3" || goto :error -C:\Python312\python.exe -m pip install numpy==1.26.3 "cython < 3" || goto :error +C:\Python39\python.exe -m pip install numpy cython || goto :error +C:\Python310\python.exe -m pip install numpy cython || goto :error +C:\Python311\python.exe -m pip install numpy cython || goto :error +C:\Python312\python.exe -m pip install numpy cython || goto :error +C:\Python313\python.exe -m pip install numpy cython || goto :error :: setuptools 70.2 leads to an error C:\Python312\python.exe -m pip install setuptools==70.1.1 || goto :error diff --git a/ci/win_test_installer.cmd b/ci/win_test_installer.cmd index e26dd2b139..6d6f0768a2 100644 --- a/ci/win_test_installer.cmd +++ b/ci/win_test_installer.cmd @@ -23,8 +23,9 @@ C:\Python39\python -c "import neuron; neuron.test(); quit()" || set "errorfound= C:\Python310\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" C:\Python311\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" C:\Python312\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" +C:\Python313\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" :: install numpy dependency -python -m pip install "numpy<2" +python -m pip install "numpy" :: run also using whatever is system python python --version python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" diff --git a/ci/win_test_installer_wo_rxd.cmd b/ci/win_test_installer_wo_rxd.cmd index 369bfa39cf..4ec9970f0c 100644 --- a/ci/win_test_installer_wo_rxd.cmd +++ b/ci/win_test_installer_wo_rxd.cmd @@ -26,9 +26,10 @@ C:\Python39\python -c "import neuron; neuron.test(); quit()" || set "errorfound= C:\Python310\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" C:\Python311\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" C:\Python312\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" +C:\Python313\python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" :: install numpy dependency -python -m pip install "numpy<2" +python -m pip install "numpy" :: run also using whatever is system python python --version python -c "import neuron; neuron.test(); quit()" || set "errorfound=y" diff --git a/docs/changelog.md b/docs/changelog.md index 803c8cb372..a1363e5f61 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,10 @@ # NEURON 8.2 +## 8.2.7 +_Release Date_ : 01-02-2025 + +This release allows use of Python 3.13 + ## 8.2.6 _Release Date_ : 24-07-2024 diff --git a/docs/docs_requirements.txt b/docs/docs_requirements.txt index a8a10b7fdd..e435b94042 100644 --- a/docs/docs_requirements.txt +++ b/docs/docs_requirements.txt @@ -9,7 +9,7 @@ bokeh<3 # do not check import of next line ipython plotnine -numpy<2 +numpy plotly nbsphinx jinja2 diff --git a/docs/index.rst b/docs/index.rst index 0df1324839..ed83cc14bb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -88,7 +88,7 @@ Installation pip3 install neuron - Alternatively, you can use the `PKG installer `_. + Alternatively, you can use the `PKG installer `_. For troubleshooting, see the `detailed installation instructions `_. diff --git a/docs/install/mac_pkg.md b/docs/install/mac_pkg.md index 8a36dc03b7..38145da1c7 100644 --- a/docs/install/mac_pkg.md +++ b/docs/install/mac_pkg.md @@ -55,7 +55,7 @@ cmake .. -DCMAKE_INSTALL_PREFIX=$NRN_INSTALL \ The default variables above will be ``` -pythons="python3.9;python3.10;python3.11;python3.12" +pythons="python3.9;python3.10;python3.11;python3.12;python3.13" archs_cmake='-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64' ``` diff --git a/nrn_requirements.txt b/nrn_requirements.txt index c4ce7d3ae0..3aacefa65b 100644 --- a/nrn_requirements.txt +++ b/nrn_requirements.txt @@ -5,9 +5,9 @@ matplotlib # bokeh 3 seems to break docs notebooks bokeh<3 ipython -cython<3 +cython packaging pytest pytest-cov mpi4py -numpy<2 +numpy diff --git a/packaging/python/build_requirements.txt b/packaging/python/build_requirements.txt index dcbd639f9c..ba9dcfb0e8 100644 --- a/packaging/python/build_requirements.txt +++ b/packaging/python/build_requirements.txt @@ -1,2 +1,2 @@ -cython<3 +cython packaging diff --git a/packaging/python/build_wheels.bash b/packaging/python/build_wheels.bash index dfa9e90f9d..f4490954c6 100755 --- a/packaging/python/build_wheels.bash +++ b/packaging/python/build_wheels.bash @@ -49,19 +49,17 @@ pip_numpy_install() { # numpy is special as we want the minimum wheel version numpy_ver="numpy" case "$py_ver" in - 36) numpy_ver="numpy==1.12.1" ;; - 37) numpy_ver="numpy==1.14.6" ;; - 38) numpy_ver="numpy==1.17.5" ;; - 39) numpy_ver="numpy==1.19.3" ;; - 310) numpy_ver="numpy==1.21.3" ;; - 311) numpy_ver="numpy==1.23.5" ;; - 312) numpy_ver="numpy==1.26.0" ;; + 39) numpy_ver="numpy>=2" ;; + 310) numpy_ver="numpy>=2" ;; + 311) numpy_ver="numpy>=2" ;; + 312) numpy_ver="numpy>=2" ;; + 313) numpy_ver="numpy>=2" ;; *) echo "Error: numpy version not specified for this python!" && exit 1;; esac # older version for apple m1 as building from source fails - if [[ `uname -m` == 'arm64' ]] && [[ $py_ver != 311 ]] && [[ $py_ver != 312 ]]; then - numpy_ver="numpy==1.21.3" + if [[ `uname -m` == 'arm64' ]] && [[ $py_ver -le 311 ]] ; then + numpy_ver="numpy>=2" fi echo " - pip install $numpy_ver" diff --git a/packaging/python/test_wheels.sh b/packaging/python/test_wheels.sh index e7c6ca5dc7..4c436aaf53 100755 --- a/packaging/python/test_wheels.sh +++ b/packaging/python/test_wheels.sh @@ -300,7 +300,7 @@ $python_exe -m pip install --upgrade setuptools # install numpy, pytest and neuron # we install setuptools because since python 3.12 it is no more installed # by default -$python_exe -m pip install "numpy<2" pytest setuptools +$python_exe -m pip install "numpy" pytest setuptools $python_exe -m pip install $python_wheel $python_exe -m pip show neuron \ || $python_exe -m pip show neuron-nightly \ diff --git a/setup.py b/setup.py index 0ca138e607..cd7c7d3d3b 100644 --- a/setup.py +++ b/setup.py @@ -410,7 +410,12 @@ def setup_package(): NRN_COLLECT_DIRS = ["bin", "lib", "include", "share"] docs_require = [] # sphinx, themes, etc - maybe_rxd_reqs = ["numpy<2", "Cython<3"] if Components.RX3D else [] + ver_lt_313 = sys.version_info[0] == 3 and sys.version_info[1] < 13 + if Components.RX3D: + if ver_lt_313: + maybe_rxd_reqs = ["numpy", "Cython"] + else: + maybe_rxd_reqs = ["numpy", "Cython"] maybe_docs = docs_require if "docs" in sys.argv else [] maybe_test_runner = ["pytest-runner"] if "test" in sys.argv else [] @@ -574,7 +579,7 @@ def setup_package(): ], cmdclass=dict(build_ext=CMakeAugmentedBuilder, docs=Docs), install_requires=[ - "numpy>=1.9.3,<2", + "numpy", "packaging", "find_libpython", "setuptools", @@ -608,18 +613,21 @@ def mac_osx_setenv(): def fmt(version): return ".".join(str(x) for x in version) + # Match Python OSX framework + py_osx_framework = extract_macosx_min_system_version(sys.executable) + if "MACOSX_DEPLOYMENT_TARGET" in os.environ: # Don't override the value if it is set explicitly, but try and print a # helpful message explicit_target = tuple( int(x) for x in os.environ["MACOSX_DEPLOYMENT_TARGET"].split(".") ) + else: + explicit_target = (10, 9) - # Match Python OSX framework - py_osx_framework = extract_macosx_min_system_version(sys.executable) if py_osx_framework is None: - py_osx_framework = [10, 9] - if py_osx_framework[1] > 9: + py_osx_framework = (10, 9) + if py_osx_framework > (10, 9): logging.warning( "[ WARNING ] You are building a wheel with a Python built" " for a recent MACOS version (from brew?). Your wheel won't be portable." @@ -636,14 +644,14 @@ def fmt(version): # Python framework, or 10.9 if the version targeted by the framework # cannot be determined if py_osx_framework is None: - py_osx_framework = (10, 15) - if py_osx_framework < (10, 15): + py_osx_framework = (10, 9) + if py_osx_framework < (10, 9): logging.warning( - "C++17 support is required to build NEURON on macOS, " - "therefore minimum MACOSX_DEPLOYMENT_TARGET version is 10.15." + "C++11 support is required to build NEURON on macOS, " + "therefore minimum MACOSX_DEPLOYMENT_TARGET version is 10.9." ) - py_osx_framework = (10, 15) - if py_osx_framework > (10, 15): + py_osx_framework = (10, 9) + if py_osx_framework > (10, 9): logging.warning( "You are building a wheel with a Python built for macOS >={}. " "Your wheel won't run on older versions, consider using an " diff --git a/src/nrnpython/nrnpy_hoc.cpp b/src/nrnpython/nrnpy_hoc.cpp index 2d225e7df6..c8988ce1ec 100644 --- a/src/nrnpython/nrnpy_hoc.cpp +++ b/src/nrnpython/nrnpy_hoc.cpp @@ -1596,13 +1596,16 @@ PyObject* nrnpy_forall(PyObject* self, PyObject* args) { static PyObject* hocobj_iter(PyObject* self) { // printf("hocobj_iter %p\n", self); PyHocObject* po = (PyHocObject*) self; - if (po->type_ == PyHoc::HocObject) { + if (po->type_ == PyHoc::HocObject || po->type_ == PyHoc::HocSectionListIterator) { if (po->ho_->ctemplate == hoc_vec_template_) { return PySeqIter_New(self); } else if (po->ho_->ctemplate == hoc_list_template_) { return PySeqIter_New(self); } else if (po->ho_->ctemplate == hoc_sectionlist_template_) { // need a clone of self so nested loops do not share iteritem_ + // The HocSectionListIter arm of the outer 'if' became necessary + // at Python-3.13.1 upon which the following body is executed + // twice. See https://github.com/python/cpython/issues/127682 PyObject* po2 = nrnpy_ho2po(po->ho_); PyHocObject* pho2 = (PyHocObject*) po2; pho2->type_ = PyHoc::HocSectionListIterator; diff --git a/src/nrnpython/nrnpython.cpp b/src/nrnpython/nrnpython.cpp index b774623aa5..b09a77c07d 100644 --- a/src/nrnpython/nrnpython.cpp +++ b/src/nrnpython/nrnpython.cpp @@ -210,6 +210,13 @@ extern "C" int nrnpython_start(int b) { // del g // Also, NEURONMainMenu/File/Quit did not work. The solution to both // seems to be to just avoid gui threads if MINGW and launched nrniv + + // Beginning with Python 3.13.0 it seems that the readline + // module has not been loaded yet. Since PyInit_readline sets + // PyOS_ReadlineFunctionPointer = call_readline; without checking, + // we need to import here. + PyRun_SimpleString("import readline as nrn_readline"); + PyOS_ReadlineFunctionPointer = nrnpython_getline; // Is there a -c "command" or file.py arg. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index abf8c78c9d..8f5d63a831 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -169,7 +169,7 @@ if(NRN_ENABLE_PYTHON AND PYTEST_FOUND) COMMAND ${PYTHON_EXECUTABLE} ${pytest} ./test/cover SCRIPT_PATTERNS test/cover/*.py test/cover/*.json) - if(NRN_ENABLE_RX3D) + if(NO AND NRN_ENABLE_RX3D) nrn_add_test_group( NAME rxdmod_tests MODFILE_PATTERNS test/rxd/ecs/*.mod