Skip to content

Commit

Permalink
Drop Python 3.7
Browse files Browse the repository at this point in the history
Given that, after the release of 103.0 LTS, we're now on track for
bigger chances, let's start by dropping Python 3.7 support.

There are a number of features that are available on Python 3.8 and
later only. One example is the availibility of importlib.metadata
stardand library, which we intend to use to replace pkg_resources (and
then setuptools as a whole).

As for Avocado users and important platforms, we're on a good position
such as QEMU already requiring Python 3.8, and CentOS Stream 9
shipping Python 3.9.18.

For RPM builds, EL8 (in all its forms) are not going to be built
anymore on CI.  This may change if the SPEC file is updated to support
a conditional build using Python 3.8 for EL8, but that depends on the
existence of all dependencies on that build, including
python3-aexpect, which is not currently available.

Reference: avocado-framework#5754
Signed-off-by: Cleber Rosa <[email protected]>
  • Loading branch information
clebergnu committed Jan 22, 2024
1 parent ab0107f commit a17bfff
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11, 3.12.0]
python-version: [3.8, 3.9, 3.10.0, 3.11, 3.12.0]
fail-fast: false

steps:
Expand All @@ -71,7 +71,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11, 3.12.0]
python-version: [3.8, 3.9, 3.10.0, 3.11, 3.12.0]
fail-fast: false

steps:
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11, 3.12.0]
python-version: [3.8, 3.9, 3.10.0, 3.11, 3.12.0]
fail-fast: false

steps:
Expand All @@ -241,7 +241,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11, 3.12.0]
python-version: [3.8, 3.9, 3.10.0, 3.11, 3.12.0]
fail-fast: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
needs: release
strategy:
matrix:
python-version: [3.7.15, 3.8.16, 3.9.16, 3.10.9, 3.11.1, 3.12.0]
python-version: [3.8.16, 3.9.16, 3.10.9, 3.11.1, 3.12.0]
fail-fast: false

steps:
Expand Down
2 changes: 0 additions & 2 deletions .packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ jobs:
metadata:
targets:
- fedora-all
- centos-stream-8
- centos-stream-9
- epel-8
- epel-9
- fedora-38-aarch64
- fedora-38-ppc64le
Expand Down
2 changes: 1 addition & 1 deletion contrib/scripts/avocado-fetch-eggs.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_avocado_egg_url(avocado_version=None, python_version=None):

def main():
configure_logging_settings()
for version in ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]:
for version in ["3.8", "3.9", "3.10", "3.11", "3.12"]:
url = get_avocado_egg_url(python_version=version)
try:
asset = Asset(url, cache_dirs=CACHE_DIRS)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/guides/user/chapters/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Installing from PyPI
--------------------

The simplest installation method is through ``pip``. On most POSIX systems
with Python 3.7 (or later) and ``pip`` available, installation can be performed
with Python 3.8 (or later) and ``pip`` available, installation can be performed
with a single command::

$ pip3 install --user avocado-framework
Expand Down
4 changes: 0 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,3 @@ docutils==0.17.1

# For tests that check content generated by runners
jsonschema==3.2.0

# For ansible plugin nested dep, compatible with Python 3.6
setuptools_rust==1.1.2; python_version < '3.7'
setuptools_rust; python_version >= '3.7'
8 changes: 1 addition & 7 deletions selftests/functional/plugin/spawners/lxc.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import asyncio
import os
import sys
from unittest import mock

from avocado import Test, skipIf
from avocado import Test
from avocado.core.job import Job
from avocado.plugins.spawners import lxc
from avocado.plugins.spawners.lxc import LXCSpawner
Expand All @@ -12,11 +11,6 @@
LXC_BACKEND = mock.MagicMock()


def incompatible_python_version():
return sys.version_info.major == 3 and sys.version_info.minor <= 7


@skipIf(incompatible_python_version(), "Not compatible with Python under 3.7.0")
@mock.patch("avocado.plugins.spawners.lxc.lxc", LXC_BACKEND)
class LXCSpawnerTest(Test):
def setUp(self):
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ def run(self):
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down Expand Up @@ -482,7 +481,7 @@ def run(self):
},
zip_safe=False,
test_suite="selftests",
python_requires=">=3.7",
python_requires=">=3.8",
cmdclass={
"clean": Clean,
"develop": Develop,
Expand Down

0 comments on commit a17bfff

Please sign in to comment.