Merge pull request #1246 from tahoe-lafs/3964-remove-3.7

Remove support for Python 3.7, Ubuntu 18.04, Debian 10 (oldstable)

Fixes ticket:3964
This commit is contained in:
Itamar Turner-Trauring 2023-01-09 17:04:25 -05:00 committed by GitHub
commit a05e4b127b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 79 deletions

View File

@ -15,16 +15,11 @@ workflows:
ci: ci:
jobs: jobs:
# Start with jobs testing various platforms. # Start with jobs testing various platforms.
- "debian-10":
{}
- "debian-11": - "debian-11":
{} {}
- "ubuntu-20-04": - "ubuntu-20-04":
{} {}
- "ubuntu-18-04":
requires:
- "ubuntu-20-04"
# Equivalent to RHEL 8; CentOS 8 is dead. # Equivalent to RHEL 8; CentOS 8 is dead.
- "oraclelinux-8": - "oraclelinux-8":
@ -85,11 +80,7 @@ workflows:
# Contexts are managed in the CircleCI web interface: # Contexts are managed in the CircleCI web interface:
# #
# https://app.circleci.com/settings/organization/github/tahoe-lafs/contexts # https://app.circleci.com/settings/organization/github/tahoe-lafs/contexts
- "build-image-debian-10": &DOCKERHUB_CONTEXT - "build-image-debian-11": &DOCKERHUB_CONTEXT
context: "dockerhub-auth"
- "build-image-debian-11":
<<: *DOCKERHUB_CONTEXT
- "build-image-ubuntu-18-04":
<<: *DOCKERHUB_CONTEXT <<: *DOCKERHUB_CONTEXT
- "build-image-ubuntu-20-04": - "build-image-ubuntu-20-04":
<<: *DOCKERHUB_CONTEXT <<: *DOCKERHUB_CONTEXT
@ -167,12 +158,7 @@ jobs:
command: | command: |
dist/Tahoe-LAFS/tahoe --version dist/Tahoe-LAFS/tahoe --version
debian-10: &DEBIAN debian-11: &DEBIAN
docker:
- <<: *DOCKERHUB_AUTH
image: "tahoelafsci/debian:10-py3.7"
user: "nobody"
environment: &UTF_8_ENVIRONMENT environment: &UTF_8_ENVIRONMENT
# In general, the test suite is not allowed to fail while the job # In general, the test suite is not allowed to fail while the job
# succeeds. But you can set this to "yes" if you want it to be # succeeds. But you can set this to "yes" if you want it to be
@ -184,7 +170,7 @@ jobs:
# filenames and argv). # filenames and argv).
LANG: "en_US.UTF-8" LANG: "en_US.UTF-8"
# Select a tox environment to run for this job. # Select a tox environment to run for this job.
TAHOE_LAFS_TOX_ENVIRONMENT: "py37" TAHOE_LAFS_TOX_ENVIRONMENT: "py39"
# Additional arguments to pass to tox. # Additional arguments to pass to tox.
TAHOE_LAFS_TOX_ARGS: "" TAHOE_LAFS_TOX_ARGS: ""
# The path in which test artifacts will be placed. # The path in which test artifacts will be placed.
@ -252,15 +238,11 @@ jobs:
/tmp/venv/bin/codecov /tmp/venv/bin/codecov
fi fi
debian-11:
<<: *DEBIAN
docker: docker:
- <<: *DOCKERHUB_AUTH - <<: *DOCKERHUB_AUTH
image: "tahoelafsci/debian:11-py3.9" image: "tahoelafsci/debian:11-py3.9"
user: "nobody" user: "nobody"
environment:
<<: *UTF_8_ENVIRONMENT
TAHOE_LAFS_TOX_ENVIRONMENT: "py39"
# Restore later using PyPy3.8 # Restore later using PyPy3.8
# pypy27-buster: # pypy27-buster:
@ -312,22 +294,6 @@ jobs:
- run: *SETUP_VIRTUALENV - run: *SETUP_VIRTUALENV
- run: *RUN_TESTS - run: *RUN_TESTS
ubuntu-18-04: &UBUNTU_18_04
<<: *DEBIAN
docker:
- <<: *DOCKERHUB_AUTH
image: "tahoelafsci/ubuntu:18.04-py3.7"
user: "nobody"
environment:
<<: *UTF_8_ENVIRONMENT
# The default trial args include --rterrors which is incompatible with
# this reporter on Python 3. So drop that and just specify the
# reporter.
TAHOE_LAFS_TRIAL_ARGS: "--reporter=subunitv2-file"
TAHOE_LAFS_TOX_ENVIRONMENT: "py37"
ubuntu-20-04: ubuntu-20-04:
<<: *DEBIAN <<: *DEBIAN
docker: docker:
@ -445,7 +411,7 @@ jobs:
typechecks: typechecks:
docker: docker:
- <<: *DOCKERHUB_AUTH - <<: *DOCKERHUB_AUTH
image: "tahoelafsci/ubuntu:18.04-py3.7" image: "tahoelafsci/ubuntu:20.04-py3.9"
steps: steps:
- "checkout" - "checkout"
@ -457,7 +423,7 @@ jobs:
docs: docs:
docker: docker:
- <<: *DOCKERHUB_AUTH - <<: *DOCKERHUB_AUTH
image: "tahoelafsci/ubuntu:18.04-py3.7" image: "tahoelafsci/ubuntu:20.04-py3.9"
steps: steps:
- "checkout" - "checkout"
@ -508,15 +474,6 @@ jobs:
docker push tahoelafsci/${DISTRO}:${TAG}-py${PYTHON_VERSION} docker push tahoelafsci/${DISTRO}:${TAG}-py${PYTHON_VERSION}
build-image-debian-10:
<<: *BUILD_IMAGE
environment:
DISTRO: "debian"
TAG: "10"
PYTHON_VERSION: "3.7"
build-image-debian-11: build-image-debian-11:
<<: *BUILD_IMAGE <<: *BUILD_IMAGE
@ -525,14 +482,6 @@ jobs:
TAG: "11" TAG: "11"
PYTHON_VERSION: "3.9" PYTHON_VERSION: "3.9"
build-image-ubuntu-18-04:
<<: *BUILD_IMAGE
environment:
DISTRO: "ubuntu"
TAG: "18.04"
PYTHON_VERSION: "3.7"
build-image-ubuntu-20-04: build-image-ubuntu-20-04:
<<: *BUILD_IMAGE <<: *BUILD_IMAGE

View File

@ -48,21 +48,20 @@ jobs:
- windows-latest - windows-latest
- ubuntu-latest - ubuntu-latest
python-version: python-version:
- "3.7"
- "3.8" - "3.8"
- "3.9" - "3.9"
- "3.10" - "3.10"
include: include:
# On macOS don't bother with 3.7-3.8, just to get faster builds. # On macOS don't bother with 3.8, just to get faster builds.
- os: macos-latest - os: macos-latest
python-version: "3.9" python-version: "3.9"
- os: macos-latest - os: macos-latest
python-version: "3.10" python-version: "3.10"
# We only support PyPy on Linux at the moment. # We only support PyPy on Linux at the moment.
- os: ubuntu-latest
python-version: "pypy-3.7"
- os: ubuntu-latest - os: ubuntu-latest
python-version: "pypy-3.8" python-version: "pypy-3.8"
- os: ubuntu-latest
python-version: "pypy-3.9"
steps: steps:
# See https://github.com/actions/checkout. A fetch-depth of 0 # See https://github.com/actions/checkout. A fetch-depth of 0
@ -162,9 +161,6 @@ jobs:
force-foolscap: false force-foolscap: false
# 22.04 has some issue with Tor at the moment: # 22.04 has some issue with Tor at the moment:
# https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3943 # https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3943
- os: ubuntu-20.04
python-version: "3.7"
force-foolscap: true
- os: ubuntu-20.04 - os: ubuntu-20.04
python-version: "3.9" python-version: "3.9"
force-foolscap: false force-foolscap: false

View File

@ -56,7 +56,7 @@ Once ``tahoe --version`` works, see `How to Run Tahoe-LAFS <docs/running.rst>`__
🐍 Python 2 🐍 Python 2
----------- -----------
Python 3.7 or later is now required. Python 3.8 or later is required.
If you are still using Python 2.7, use Tahoe-LAFS version 1.17.1. If you are still using Python 2.7, use Tahoe-LAFS version 1.17.1.

View File

@ -29,7 +29,7 @@ in
, pypiData ? sources.pypi-deps-db # the pypi package database snapshot to use , pypiData ? sources.pypi-deps-db # the pypi package database snapshot to use
# for dependency resolution # for dependency resolution
, pythonVersion ? "python37" # a string choosing the python derivation from , pythonVersion ? "python39" # a string choosing the python derivation from
# nixpkgs to target # nixpkgs to target
, extras ? [ "tor" "i2p" ] # a list of strings identifying tahoe-lafs extras, , extras ? [ "tor" "i2p" ] # a list of strings identifying tahoe-lafs extras,

View File

@ -0,0 +1 @@
Python 3.7 is no longer supported, and Debian 10 and Ubuntu 18.04 are no longer tested.

View File

@ -223,7 +223,7 @@ def run_command(args, cwd=None):
use_shell = sys.platform == "win32" use_shell = sys.platform == "win32"
try: try:
p = subprocess.Popen(args, stdout=subprocess.PIPE, cwd=cwd, shell=use_shell) p = subprocess.Popen(args, stdout=subprocess.PIPE, cwd=cwd, shell=use_shell)
except EnvironmentError as e: # if this gives a SyntaxError, note that Tahoe-LAFS requires Python 3.7+ except EnvironmentError as e: # if this gives a SyntaxError, note that Tahoe-LAFS requires Python 3.8+
print("Warning: unable to run %r." % (" ".join(args),)) print("Warning: unable to run %r." % (" ".join(args),))
print(e) print(e)
return None return None
@ -374,8 +374,8 @@ setup(name="tahoe-lafs", # also set in __init__.py
package_dir = {'':'src'}, package_dir = {'':'src'},
packages=find_packages('src') + ['allmydata.test.plugins'], packages=find_packages('src') + ['allmydata.test.plugins'],
classifiers=trove_classifiers, classifiers=trove_classifiers,
# We support Python 3.7 or later. 3.11 is not supported yet. # We support Python 3.8 or later. 3.11 is not supported yet.
python_requires=">=3.7, <3.11", python_requires=">=3.8, <3.11",
install_requires=install_requires, install_requires=install_requires,
extras_require={ extras_require={
# Duplicate the Twisted pywin32 dependency here. See # Duplicate the Twisted pywin32 dependency here. See
@ -388,9 +388,6 @@ setup(name="tahoe-lafs", # also set in __init__.py
], ],
"test": [ "test": [
"flake8", "flake8",
# On Python 3.7, importlib_metadata v5 breaks flake8.
# https://github.com/python/importlib_metadata/issues/407
"importlib_metadata<5; python_version < '3.8'",
# Pin a specific pyflakes so we don't have different folks # Pin a specific pyflakes so we don't have different folks
# disagreeing on what is or is not a lint issue. We can bump # disagreeing on what is or is not a lint issue. We can bump
# this version from time to time, but we will do it # this version from time to time, but we will do it

View File

@ -5,7 +5,7 @@ in
{ pkgsVersion ? "nixpkgs-21.11" { pkgsVersion ? "nixpkgs-21.11"
, pkgs ? import sources.${pkgsVersion} { } , pkgs ? import sources.${pkgsVersion} { }
, pypiData ? sources.pypi-deps-db , pypiData ? sources.pypi-deps-db
, pythonVersion ? "python37" , pythonVersion ? "python39"
, mach-nix ? import sources.mach-nix { , mach-nix ? import sources.mach-nix {
inherit pkgs pypiData; inherit pkgs pypiData;
python = pythonVersion; python = pythonVersion;
@ -21,7 +21,7 @@ let
inherit pkgs; inherit pkgs;
lib = pkgs.lib; lib = pkgs.lib;
}; };
tests_require = (mach-lib.extract "python37" ./. "extras_require" ).extras_require.test; tests_require = (mach-lib.extract "python39" ./. "extras_require" ).extras_require.test;
# Get the Tahoe-LAFS package itself. This does not include test # Get the Tahoe-LAFS package itself. This does not include test
# requirements and we don't ask for test requirements so that we can just # requirements and we don't ask for test requirements so that we can just

View File

@ -7,11 +7,9 @@
# the tox-gh-actions package. # the tox-gh-actions package.
[gh-actions] [gh-actions]
python = python =
3.7: py37-coverage
3.8: py38-coverage 3.8: py38-coverage
3.9: py39-coverage 3.9: py39-coverage
3.10: py310-coverage 3.10: py310-coverage
pypy-3.7: pypy37
pypy-3.8: pypy38 pypy-3.8: pypy38
pypy-3.9: pypy39 pypy-3.9: pypy39
@ -19,7 +17,7 @@ python =
twisted = 1 twisted = 1
[tox] [tox]
envlist = typechecks,codechecks,py{37,38,39,310}-{coverage},pypy27,pypy37,pypy38,pypy39,integration envlist = typechecks,codechecks,py{38,39,310}-{coverage},pypy27,pypy38,pypy39,integration
minversion = 2.4 minversion = 2.4
[testenv] [testenv]
@ -49,8 +47,6 @@ deps =
# regressions in new releases of this package that cause us the kind of # regressions in new releases of this package that cause us the kind of
# suffering we're trying to avoid with the above pins. # suffering we're trying to avoid with the above pins.
certifi certifi
# VCS hooks support
py37,!coverage: pre-commit
# We add usedevelop=False because testing against a true installation gives # We add usedevelop=False because testing against a true installation gives
# more useful results. # more useful results.