From f821dbb599c67a2fa0d349b24f23bb6b8855368f Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 19 Mar 2023 10:54:09 +0100 Subject: Drop Python 3.7 support and update CI envs Python 3.7 will be EOL in 3 months, so before the next release. * Update the Python versions in the CI images * Bump the docker base image from focal to jammy to test against a newer stack. This triggers new deprecation warnings which we need to disable for now. * Bump the old docker based image to from buster to bullseye, moving from Python 3.7 to 3.9. --- .gitlab-ci.yml | 15 +++++---------- .gitlab-ci/Dockerfile | 7 +++---- .gitlab-ci/Dockerfile.old | 2 +- .gitlab-ci/run-docker-old.sh | 2 +- .gitlab-ci/run-docker.sh | 4 ++-- .gitlab-ci/test-docker.sh | 3 +++ PKG-INFO.in | 2 +- README.rst | 2 +- meson.build | 4 ++-- pyproject.toml | 2 +- 10 files changed, 20 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f9b48a8..8c352c54 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: registry.gitlab.gnome.org/gnome/pygobject/main:v19 +image: registry.gitlab.gnome.org/gnome/pygobject/main:v20 stages: - build_and_test @@ -35,7 +35,7 @@ coverage: paths: - coverage/ variables: - PYENV_VERSION: "3.8.16-debug" + PYENV_VERSION: "3.9.16-debug" script: - bash -x ./.gitlab-ci/coverage-docker.sh coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/' @@ -63,11 +63,6 @@ mingw64: MSYSTEM: "MINGW64" <<: *mingw-defaults -python3.7: - variables: - PYENV_VERSION: "3.7.16-debug" - <<: *defaults - python3.8: variables: PYENV_VERSION: "3.8.16-debug" @@ -80,12 +75,12 @@ python3.9: python3.10: variables: - PYENV_VERSION: "3.10.9-debug" + PYENV_VERSION: "3.10.10-debug" <<: *defaults python3.11: variables: - PYENV_VERSION: "3.11.1-debug" + PYENV_VERSION: "3.11.2-debug" <<: *defaults pypy3.8: @@ -96,7 +91,7 @@ pypy3.8: old-i386-py3: stage: build_and_test - image: registry.gitlab.gnome.org/gnome/pygobject/old:v5 + image: registry.gitlab.gnome.org/gnome/pygobject/old:v6 artifacts: paths: - coverage/ diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile index 5883d913..6af00202 100644 --- a/.gitlab-ci/Dockerfile +++ b/.gitlab-ci/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal +FROM ubuntu:jammy ENV DEBIAN_FRONTEND=noninteractive @@ -43,10 +43,9 @@ ENV PYTHON_CONFIGURE_OPTS="--enable-shared" RUN curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash RUN pyenv install pypy3.8-7.3.11 -RUN pyenv install --debug 3.7.16 RUN pyenv install --debug 3.8.16 RUN pyenv install --debug 3.9.16 -RUN pyenv install --debug 3.10.9 -RUN pyenv install --debug 3.11.1 +RUN pyenv install --debug 3.10.10 +RUN pyenv install --debug 3.11.2 ENV PATH="/usr/lib/ccache:${PATH}" diff --git a/.gitlab-ci/Dockerfile.old b/.gitlab-ci/Dockerfile.old index 3e7b8f82..6387ffa5 100644 --- a/.gitlab-ci/Dockerfile.old +++ b/.gitlab-ci/Dockerfile.old @@ -1,4 +1,4 @@ -FROM i386/debian:buster +FROM i386/debian:bullseye ENV DEBIAN_FRONTEND=noninteractive diff --git a/.gitlab-ci/run-docker-old.sh b/.gitlab-ci/run-docker-old.sh index 32b37156..3663cfe7 100755 --- a/.gitlab-ci/run-docker-old.sh +++ b/.gitlab-ci/run-docker-old.sh @@ -2,7 +2,7 @@ set -e -TAG="registry.gitlab.gnome.org/gnome/pygobject/old:v5" +TAG="registry.gitlab.gnome.org/gnome/pygobject/old:v6" sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \ --file "Dockerfile.old" . diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh index cf30c2d3..77243dac 100755 --- a/.gitlab-ci/run-docker.sh +++ b/.gitlab-ci/run-docker.sh @@ -2,10 +2,10 @@ set -e -TAG="registry.gitlab.gnome.org/gnome/pygobject/main:v19" +TAG="registry.gitlab.gnome.org/gnome/pygobject/main:v20" sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \ --file "Dockerfile" . -sudo docker run -e PYENV_VERSION='3.8.16-debug' --rm --security-opt label=disable \ +sudo docker run -e PYENV_VERSION='3.9.16-debug' --rm --security-opt label=disable \ --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \ --tty --interactive "${TAG}" bash diff --git a/.gitlab-ci/test-docker.sh b/.gitlab-ci/test-docker.sh index d44641dd..1d1a1a64 100755 --- a/.gitlab-ci/test-docker.sh +++ b/.gitlab-ci/test-docker.sh @@ -26,6 +26,9 @@ python -m pip install pycairo flake8 pytest pytest-faulthandler coverage export CFLAGS="-coverage -ftest-coverage -fprofile-arcs -Werror" +# FIXME: g_callable_info_free_closure etc +CFLAGS+=" -Wno-error=deprecated-declarations" + # MESON /usr/bin/python3 -m pip install --user meson export PATH="${HOME}/.local/bin:${PATH}" diff --git a/PKG-INFO.in b/PKG-INFO.in index 9bbfb092..2cd1ef58 100644 --- a/PKG-INFO.in +++ b/PKG-INFO.in @@ -18,4 +18,4 @@ Classifier: Operating System :: Microsoft :: Windows Classifier: Programming Language :: C Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires-Python: >=3.7, <4 +Requires-Python: >=3.8, <4 diff --git a/README.rst b/README.rst index f8fe26b7..b1a0fd9f 100644 --- a/README.rst +++ b/README.rst @@ -12,7 +12,7 @@ `__, `GIO `__ and many more. -It supports Linux, Windows and macOS and works with **Python 3.7+** and +It supports Linux, Windows and macOS and works with **Python 3.8+** and **PyPy3**. PyGObject, including this documentation, is licensed under the **LGPLv2.1+**. diff --git a/meson.build b/meson.build index a7ffbf8d..efb1b9a6 100644 --- a/meson.build +++ b/meson.build @@ -15,8 +15,8 @@ platform_version = '@0@.0'.format(pygobject_version_major) pymod = import('python') python = pymod.find_installation(get_option('python')) -if python.language_version().version_compare('< 3.7') - error('Requires Python >= 3.7') +if python.language_version().version_compare('< 3.8') + error('Requires Python >= 3.8') endif python_dep = python.dependency() diff --git a/pyproject.toml b/pyproject.toml index 732c4515..d747b273 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Python bindings for GObject Introspection" authors = ["Christoph Reiter"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" pycairo = "^1.16" [tool.poetry.dev-dependencies] -- cgit v1.2.1