diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 1fcff2bb..ec4b4401 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -28,7 +28,8 @@ jobs: id: generate_matrix uses: coactions/dynamic-matrix@v1 with: - min_python: "3.9" + min_python: "3.10" + default_python: "3.10" max_python: "3.12" other_names: | lint diff --git a/README.md b/README.md index 7c62c6c0..8562de62 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ which are under [active upstream support](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-schedule) which currently translates to: -- Python 3.9 or newer +- Python 3.10 or newer - Ansible-core 2.14 or newer ## Installation @@ -63,7 +63,7 @@ To use `pytest-ansible-units`, follow these steps: pip install pytest-ansible ``` -2. Ensure you have Python 3.9 or greater, ansible-core, and pyyaml installed. +2. Ensure you have Python 3.10 or greater, ansible-core, and pyyaml installed. 3. Depending on your preferred directory structure, you can clone collections into the appropriate paths. diff --git a/docs/getting_started.md b/docs/getting_started.md index 62284f55..ac9b73cf 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -17,7 +17,7 @@ To use `pytest-ansible`, follow these steps: pip install pytest-ansible ``` -2. Ensure you have Python 3.9 or greater, ansible-core, and pytest installed. +2. Ensure you have Python 3.10 or greater, ansible-core, and pytest installed. 3. Depending on your preferred directory structure, you can clone collections into the appropriate paths. diff --git a/pyproject.toml b/pyproject.toml index e248b4b3..1a29f8f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" [project] # https://peps.python.org/pep-0621/#readme -requires-python = ">=3.9" +requires-python = ">=3.10" dynamic = ["version", "dependencies", "optional-dependencies"] name = "pytest-ansible" description = "Plugin for pytest to simplify calling ansible modules from tests or fixtures" @@ -26,7 +26,6 @@ classifiers = [ 'Topic :: Utilities', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', @@ -63,7 +62,7 @@ parallel = true source = ["pytest_ansible"] [tool.mypy] -python_version = 3.9 +python_version = 3.10 ignore_missing_imports = true ignore_errors = true strict = true @@ -151,7 +150,7 @@ ignore = [ "T", "TRY", ] -target-version = "py39" +target-version = "py310" # Same as Black. line-length = 88 diff --git a/src/pytest_ansible/module_dispatcher/v2.py b/src/pytest_ansible/module_dispatcher/v2.py index a143dd1e..630a31db 100644 --- a/src/pytest_ansible/module_dispatcher/v2.py +++ b/src/pytest_ansible/module_dispatcher/v2.py @@ -71,7 +71,7 @@ def has_module(self, name): # otherwise, only built-in modules will work. if "module_path" in self.options: paths = self.options["module_path"] - if isinstance(paths, (list, tuple, set)): + if isinstance(paths, list | tuple | set): for path in paths: module_loader.add_directory(path) else: diff --git a/src/pytest_ansible/module_dispatcher/v212.py b/src/pytest_ansible/module_dispatcher/v212.py index 7adf394d..f43f27c7 100644 --- a/src/pytest_ansible/module_dispatcher/v212.py +++ b/src/pytest_ansible/module_dispatcher/v212.py @@ -80,7 +80,7 @@ def has_module(self, name): # otherwise, only built-in modules will work. if "module_path" in self.options: paths = self.options["module_path"] - if isinstance(paths, (list, tuple, set)): + if isinstance(paths, list | tuple | set): for path in paths: module_loader.add_directory(path) else: diff --git a/src/pytest_ansible/module_dispatcher/v213.py b/src/pytest_ansible/module_dispatcher/v213.py index 4d0ccaf6..1defc04b 100644 --- a/src/pytest_ansible/module_dispatcher/v213.py +++ b/src/pytest_ansible/module_dispatcher/v213.py @@ -83,7 +83,7 @@ def has_module(self, name): # otherwise, only built-in modules will work. if "module_path" in self.options: paths = self.options["module_path"] - if isinstance(paths, (list, tuple, set)): + if isinstance(paths, list | tuple | set): for path in paths: module_loader.add_directory(path) else: diff --git a/tox.ini b/tox.ini index 2fc5add2..c9e35f30 100644 --- a/tox.ini +++ b/tox.ini @@ -39,7 +39,7 @@ setenv = COVERAGE_PROCESS_START={toxinidir}/pyproject.toml FORCE_COLOR = 1 PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt - devel,py39: PIP_CONSTRAINT = /dev/null + devel: PIP_CONSTRAINT = /dev/null extras = test allowlist_externals =