From 6d5b4fcbaf5800ab6c4c83e1d45367c2d400a071 Mon Sep 17 00:00:00 2001 From: Philipp Wendler Date: Thu, 20 Jun 2024 09:01:25 +0200 Subject: [PATCH] Drop support for Python 3.7 As announced in the changelog of BenchExec 3.22 and on the issue tracker. Part of #986. --- .gitlab-ci.yml | 11 ----------- benchexec/container.py | 6 +----- debian/control | 4 ++-- doc/INSTALL.md | 2 +- pyproject.toml | 2 +- test/Dockerfile.python-3.7 | 32 -------------------------------- 6 files changed, 5 insertions(+), 52 deletions(-) delete mode 100644 test/Dockerfile.python-3.7 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bfc92edd8..464ee1595 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,11 +61,6 @@ stages: paths: - coverage.xml -unit-tests:python-3.7: - <<: *unit-tests - variables: - PYTHON_VERSION: '3.7' - unit-tests:python-3.8: <<: *unit-tests variables: @@ -210,12 +205,6 @@ reuse: - schedules - web -build-docker:test:python-3.7: - extends: .build-docker - variables: - DOCKERFILE: test/Dockerfile.python-3.7 - IMAGE: test:python-3.7 - build-docker:test:python-3.8: extends: .build-docker variables: diff --git a/benchexec/container.py b/benchexec/container.py index 9c80055d2..c71af30b4 100644 --- a/benchexec/container.py +++ b/benchexec/container.py @@ -859,11 +859,7 @@ def setup_seccomp_filter(): logging.info("Could not enable seccomp filter for container isolation: %s", e) -try: - _ALL_SIGNALS = signal.valid_signals() # pytype: disable=module-attr -except AttributeError: - # Only exists on Python 3.8+ - _ALL_SIGNALS = range(1, signal.NSIG) +_ALL_SIGNALS = signal.valid_signals() def block_all_signals(): diff --git a/debian/control b/debian/control index 768b0f5a0..751d5092a 100644 --- a/debian/control +++ b/debian/control @@ -5,13 +5,13 @@ Maintainer: Philipp Wendler Build-Depends: debhelper (>= 11), dh-apparmor, dh-python, - python3 (>= 3.7), + python3 (>= 3.8), python3-setuptools, python3-lxml, python3-yaml (>= 3.12), python3-nose Standards-Version: 3.9.6.1 -X-Python3-Version: >= 3.7 +X-Python3-Version: >= 3.8 Homepage: https://github.com/sosy-lab/benchexec Vcs-Git: https://github.com/sosy-lab/benchexec.git Vcs-Browser: https://github.com/sosy-lab/benchexec diff --git a/doc/INSTALL.md b/doc/INSTALL.md index 98db33727..522f1592a 100644 --- a/doc/INSTALL.md +++ b/doc/INSTALL.md @@ -13,7 +13,7 @@ SPDX-License-Identifier: Apache-2.0 ### Requirements -- Python 3.7 or newer +- Python 3.8 or newer - Linux (cf. [Kernel Requirements](#kernel-requirements) below for details) - Access to cgroups (cf. [Setting up Cgroups](#setting-up-cgroups) below for details) - x86 or ARM machine (please [contact us](https://github.com/sosy-lab/benchexec/issues/new) for other architectures) diff --git a/pyproject.toml b/pyproject.toml index fbc51a7fb..5e4b78ba9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ build-backend = 'setuptools.build_meta' [tool.black] include = 'bin|\.py$' exclude = 'node_modules|\.eggs' -target-version = ['py37'] +target-version = ['py38'] [tool.coverage.run] branch = true diff --git a/test/Dockerfile.python-3.7 b/test/Dockerfile.python-3.7 deleted file mode 100644 index 4002b6f67..000000000 --- a/test/Dockerfile.python-3.7 +++ /dev/null @@ -1,32 +0,0 @@ -# This file is part of BenchExec, a framework for reliable benchmarking: -# https://github.com/sosy-lab/benchexec -# -# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer -# -# SPDX-License-Identifier: Apache-2.0 - -# This is a Docker image for running the tests. -# It should be pushed to registry.gitlab.com/sosy-lab/software/benchexec/test -# and will be used by CI as declared in .gitlab-ci.yml. -# -# Commands for updating the image: -# docker build --pull -t registry.gitlab.com/sosy-lab/software/benchexec/test:python-3.7 - < test/Dockerfile.python-3.7 -# docker push registry.gitlab.com/sosy-lab/software/benchexec/test - -FROM python:3.7 - -# Cannot use apt package python3-pystemd here -# because these images do not use the Python installed via apt. - -RUN apt-get update && apt-get install -y \ - libsystemd-dev \ - lxcfs \ - sudo - -RUN pip install \ - coloredlogs \ - "coverage[toml] >= 5.0" \ - lxml \ - nose \ - pystemd \ - pyyaml