From 1020086e96a084f663ec5d701437f9b3a5629100 Mon Sep 17 00:00:00 2001 From: Eduard-Cristian Stefan Date: Mon, 26 Aug 2024 00:42:45 +0300 Subject: [PATCH] wip --- .github/workflows/main.yml | 101 +++---------------------------------- README.rst | 3 +- setup.py | 20 -------- tox.ini | 20 +------- 4 files changed, 10 insertions(+), 134 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 508a81def..4f2a597db 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,84 +8,12 @@ env: pip --no-cache-dir" jobs: - tests_py27: - runs-on: ubuntu-20.04 - container: python:2.7 - strategy: - fail-fast: false - - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: $PIP install virtualenv tox - - - name: Run the unit tests - run: TOXENV=py27 tox - - - name: Run the end-to-end tests - run: TOXENV=py27 END_TO_END=1 tox - - tests_py34: - runs-on: ubuntu-20.04 - container: python:3.4 - strategy: - fail-fast: false - - env: - # Run actions/checkout@v3 - # /__e/node20/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /__e/node20/bin/node) - # - # https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - - steps: - - uses: actions/checkout@v3 - - - name: Install dependencies - run: $PIP install virtualenv tox - - - name: Run the unit tests - run: TOXENV=py34 tox - - - name: Run the end-to-end tests - run: TOXENV=py34 END_TO_END=1 tox - - tests_py35: - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - - steps: - - uses: actions/checkout@v4 - - - name: Work around pip SSL cert verify error - run: sudo $PIP config set global.trusted-host 'pypi.python.org pypi.org files.pythonhosted.org' - - - name: Set up Python 3.5 - uses: actions/setup-python@v5 - with: - python-version: 3.5 - - - name: Install dependencies - run: $PIP install virtualenv tox - - - name: Set variable for TOXENV based on Python version - id: toxenv - run: python -c 'import sys; print("TOXENV=py%d%d" % (sys.version_info.major, sys.version_info.minor))' | tee -a $GITHUB_OUTPUT - - - name: Run the unit tests - run: TOXENV=${{steps.toxenv.outputs.TOXENV}} tox - - - name: Run the end-to-end tests - run: TOXENV=${{steps.toxenv.outputs.TOXENV}} END_TO_END=1 tox - - tests_py3x: - runs-on: ubuntu-20.04 + tests: + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10", 3.11, 3.12] + python-version: [3.8, 3.9, "3.10", 3.11, 3.12] steps: - uses: actions/checkout@v4 @@ -108,23 +36,8 @@ jobs: - name: Run the end-to-end tests run: TOXENV=${{steps.toxenv.outputs.TOXENV}} END_TO_END=1 tox - coverage_py27: - runs-on: ubuntu-20.04 - container: python:2.7 - strategy: - fail-fast: false - - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: $PIP install virtualenv tox - - - name: Run unit test coverage - run: TOXENV=cover tox - - coverage_py3x: - runs-on: ubuntu-20.04 + coverage: + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: @@ -142,10 +55,10 @@ jobs: run: $PIP install virtualenv tox - name: Run unit test coverage - run: TOXENV=cover3 tox + run: TOXENV=cover tox docs: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/README.rst b/README.rst index 6957fcd9d..33d7197aa 100644 --- a/README.rst +++ b/README.rst @@ -13,8 +13,7 @@ likely work fine on most UNIX systems. Supervisor will not run at all under any version of Windows. -Supervisor is intended to work on Python 3 version 3.4 or later -and on Python 2 version 2.7. +Supervisor is intended to work on Python 3 version 3.8 or later. Documentation ------------- diff --git a/setup.py b/setup.py index 380dfa960..2a46e84d0 100644 --- a/setup.py +++ b/setup.py @@ -15,19 +15,6 @@ import os import sys -py_version = sys.version_info[:2] - -if py_version < (2, 7): - raise RuntimeError('On Python 2, Supervisor requires Python 2.7 or later') -elif (3, 0) < py_version < (3, 4): - raise RuntimeError('On Python 3, Supervisor requires Python 3.4 or later') - -# setuptools is required as a runtime dependency only on -# Python < 3.8. See the comments in supervisor/compat.py. -requires = [ - "setuptools; python_version < '3.8'", -] - tests_require = [] testing_extras = tests_require + [ 'pytest', @@ -57,13 +44,7 @@ 'Topic :: System :: Monitoring', 'Topic :: System :: Systems Administration', "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -91,7 +72,6 @@ author="Chris McDonough", author_email="chrism@plope.com", packages=find_packages(), - install_requires=requires, extras_require={ 'testing': testing_extras, }, diff --git a/tox.ini b/tox.ini index 9b3cb232f..f341f0bdf 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - cover,cover3,docs,py27,py34,py35,py36,py37,py38,py39,py310,py311,py312 + cover,docs,py38,py39,py310,py311,py312 [testenv] deps = @@ -12,30 +12,14 @@ passenv = END_TO_END commands = pytest --capture=no {posargs} -[testenv:py27-configparser] -;see https://github.com/Supervisor/supervisor/issues/1230 -basepython = python2.7 -deps = - {[testenv]deps} - configparser -passenv = {[testenv]passenv} -commands = {[testenv]commands} - [testenv:cover] -basepython = python2.7 +basepython = python3.8 commands = pytest --capture=no --cov=supervisor --cov-report=term-missing --cov-report=xml {posargs} deps = {[testenv]deps} pytest-cov -[testenv:cover3] -basepython = python3.8 -commands = - pytest --capture=no --cov=supervisor --cov-report=term-missing --cov-report=xml {posargs} -deps = - {[testenv:cover]deps} - [testenv:docs] deps = Sphinx