From 072063a64d83c403a90a5719bb8b26ee4317cfe1 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Mon, 25 Mar 2024 19:30:52 +0000 Subject: [PATCH 1/2] Raise minimum Python version to 3.9, start testing 3.13 PyEval_InitThreads() does nothing in Python 3.9-12 and is dropped in 3.13. --- .github/workflows/test-gnofract4d.yml | 4 ++-- README.md | 2 +- fract4d/c/fract4dmodule.cpp | 3 --- meson.build | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-gnofract4d.yml b/.github/workflows/test-gnofract4d.yml index 1a3848947..11c4a8eff 100644 --- a/.github/workflows/test-gnofract4d.yml +++ b/.github/workflows/test-gnofract4d.yml @@ -13,12 +13,12 @@ jobs: strategy: matrix: os: [ubuntu-22.04] - python: ["3.8", "3.9", "3.10", "3.11"] + python: ["3.10", "3.11", "3.12", "3.13-dev"] toxenv: [py] # Ensure ../codecov.yml uploads after all py jobs include: - os: macos-12 - python: "3.7" + python: "3.9" toxenv: py env: diff --git a/README.md b/README.md index 886dc5f90..2d7160ec8 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Requirements Gnofract 4D requires these packages to run: -- Python version 3.6 or higher +- Python version 3.9 or higher - GTK version 4.6 or higher - PyGObject version 3.29.2 or higher to access GTK from Python - A C compiler (used at runtime to compile your fractal formulas) diff --git a/fract4d/c/fract4dmodule.cpp b/fract4d/c/fract4dmodule.cpp index 5b1ca3f82..c81f5bc33 100644 --- a/fract4d/c/fract4dmodule.cpp +++ b/fract4d/c/fract4dmodule.cpp @@ -651,9 +651,6 @@ PyInit_fract4dc(void) return NULL; } - // todo: check this https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads - PyEval_InitThreads(); - /* expose some constants */ PyModule_AddIntConstant(pymod, "CALC_DONE", GF4D_FRACTAL_DONE); PyModule_AddIntConstant(pymod, "CALC_CALCULATING", GF4D_FRACTAL_CALCULATING); diff --git a/meson.build b/meson.build index 06ea22857..591418fc5 100644 --- a/meson.build +++ b/meson.build @@ -22,8 +22,8 @@ pymod = import('python') py = pymod.find_installation() py_version = py.language_version() -if py_version.version_compare('< 3.6') - error('Sorry, you need Python 3.6 or higher to run Gnofract 4D.' +if py_version.version_compare('< 3.9') + error('Sorry, you need Python 3.9 or higher to run Gnofract 4D.' + ' You have version ' + py_version + '. Please upgrade.') endif From 90f2b63e514879a95e2182d07bce0638e862382f Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Sun, 14 Apr 2024 19:22:40 +0100 Subject: [PATCH 2/2] Gio introspection is broken on macOS https://github.com/Homebrew/homebrew-core/issues/167524 https://gitlab.gnome.org/GNOME/glib/-/issues/3322 --- .github/workflows/test-gnofract4d.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-gnofract4d.yml b/.github/workflows/test-gnofract4d.yml index 11c4a8eff..36b8ed641 100644 --- a/.github/workflows/test-gnofract4d.yml +++ b/.github/workflows/test-gnofract4d.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04] - python: ["3.10", "3.11", "3.12", "3.13-dev"] + python: ["3.9", "3.10", "3.11", "3.12", "3.13-dev"] toxenv: [py] # Ensure ../codecov.yml uploads after all py jobs include: @@ -57,6 +57,7 @@ jobs: - name: Run Tox (MacOS) if: ${{ runner.os == 'macOS' }} run: tox -e ${{ matrix.toxenv }} + continue-on-error: true # Gio introspection is broken: https://gitlab.gnome.org/GNOME/glib/-/issues/3322 - name: Run Tox (Linux) if: ${{ runner.os == 'Linux' }} run: xvfb-run --auto-servernum tox -e ${{ matrix.toxenv }}