diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 978f6fa..2c9b8b8 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.7', '3.8', '3.9'] + python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - uses: actions/checkout@v2 @@ -44,7 +44,7 @@ jobs: run: tox -e pytest -- -m "unit or (not integration and not end_to_end)" --cov=./ --cov-report=xml -n auto - name: Upload coverage report for unit tests and doctests. - if: runner.os == 'Linux' && matrix.python-version == '3.8' + if: runner.os == 'Linux' && matrix.python-version == '3.9' shell: bash -l {0} run: bash <(curl -s https://codecov.io/bash) -F unit -c @@ -53,7 +53,7 @@ jobs: run: tox -e pytest -- -m integration --cov=./ --cov-report=xml -n auto - name: Upload coverage reports of integration tests. - if: runner.os == 'Linux' && matrix.python-version == '3.8' + if: runner.os == 'Linux' && matrix.python-version == '3.9' shell: bash -l {0} run: bash <(curl -s https://codecov.io/bash) -F integration -c @@ -62,11 +62,6 @@ jobs: run: tox -e pytest -- -m end_to_end --cov=./ --cov-report=xml -n auto - name: Upload coverage reports of end-to-end tests. - if: runner.os == 'Linux' && matrix.python-version == '3.8' + if: runner.os == 'Linux' && matrix.python-version == '3.9' shell: bash -l {0} run: bash <(curl -s https://codecov.io/bash) -F end_to_end -c - - - name: Validate codecov.yml - if: runner.os == 'Linux' && matrix.python-version == '3.7' - shell: bash -l {0} - run: cat codecov.yml | curl --data-binary @- https://codecov.io/validate diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7730815..57bff53 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,11 +25,12 @@ repos: rev: v2.31.0 hooks: - id: pyupgrade - args: [--py36-plus] + args: [--py37-plus] - repo: https://github.com/asottile/reorder_python_imports rev: v2.7.1 hooks: - id: reorder-python-imports + args: [--py37-plus, --add-import, 'from __future__ import annotations'] - repo: https://github.com/asottile/setup-cfg-fmt rev: v1.20.0 hooks: diff --git a/CHANGES.rst b/CHANGES.rst index 54a4684..10c0c10 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,10 +7,12 @@ all releases are available on `PyPI `_ `Anaconda.org `_. -0.1.1 - 2022-xx-xx +0.1.1 - 2022-02-08 ------------------ - :gh:`30` removes unnecessary content from ``tox.ini``. +- :gh:`33` skips concurrent CI builds. +- :gh:`34` deprecates Python 3.6 and adds support for Python 3.10. 0.1.0 - 2021-07-20 diff --git a/setup.cfg b/setup.cfg index c9998d4..37285d5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,6 @@ classifiers = Operating System :: OS Independent Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 @@ -32,8 +31,8 @@ install_requires = click cloudpickle loky - pytask>=0.1.0 -python_requires = >=3.6 + pytask>=0.1.7 +python_requires = >=3.7 include_package_data = True package_dir = =src zip_safe = False diff --git a/setup.py b/setup.py index 7f1a176..fa283bc 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from setuptools import setup if __name__ == "__main__": diff --git a/src/pytask_parallel/__init__.py b/src/pytask_parallel/__init__.py index 165802c..f493641 100644 --- a/src/pytask_parallel/__init__.py +++ b/src/pytask_parallel/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + try: from ._version import version as __version__ except ImportError: diff --git a/src/pytask_parallel/backends.py b/src/pytask_parallel/backends.py index 74766dd..d6b06d2 100644 --- a/src/pytask_parallel/backends.py +++ b/src/pytask_parallel/backends.py @@ -1,4 +1,6 @@ """This module configures the available backends.""" +from __future__ import annotations + from concurrent.futures import ProcessPoolExecutor from concurrent.futures import ThreadPoolExecutor diff --git a/src/pytask_parallel/build.py b/src/pytask_parallel/build.py index b4a1234..4dcd2e6 100644 --- a/src/pytask_parallel/build.py +++ b/src/pytask_parallel/build.py @@ -1,4 +1,6 @@ """Extend the build command.""" +from __future__ import annotations + import click from _pytask.config import hookimpl from pytask_parallel.backends import PARALLEL_BACKENDS diff --git a/src/pytask_parallel/callbacks.py b/src/pytask_parallel/callbacks.py index ca3104c..cdf8db4 100644 --- a/src/pytask_parallel/callbacks.py +++ b/src/pytask_parallel/callbacks.py @@ -1,4 +1,6 @@ """Validate command line inputs and configuration values.""" +from __future__ import annotations + from pytask_parallel.backends import PARALLEL_BACKENDS diff --git a/src/pytask_parallel/config.py b/src/pytask_parallel/config.py index 2e3251c..6e90d1c 100644 --- a/src/pytask_parallel/config.py +++ b/src/pytask_parallel/config.py @@ -1,4 +1,6 @@ """Configure pytask.""" +from __future__ import annotations + import os from _pytask.config import hookimpl diff --git a/src/pytask_parallel/execute.py b/src/pytask_parallel/execute.py index 2ae3b5e..549e9c1 100644 --- a/src/pytask_parallel/execute.py +++ b/src/pytask_parallel/execute.py @@ -1,8 +1,9 @@ """Contains code relevant to the execution.""" +from __future__ import annotations + import sys import time from typing import Any -from typing import Tuple import cloudpickle from _pytask.config import hookimpl @@ -176,8 +177,8 @@ def _unserialize_and_execute_task(bytes_, show_locals, console_options): def _process_exception( - exc_info: Tuple[Any], show_locals: bool, console_options: ConsoleOptions -) -> Tuple[Any]: + exc_info: tuple[Any], show_locals: bool, console_options: ConsoleOptions +) -> tuple[Any]: exc_info = remove_internal_traceback_frames_from_exc_info(exc_info) traceback = Traceback.from_exception(*exc_info, show_locals=show_locals) segments = console.render(traceback, options=console_options) diff --git a/src/pytask_parallel/logging.py b/src/pytask_parallel/logging.py index c8a35d1..1bb8ca0 100644 --- a/src/pytask_parallel/logging.py +++ b/src/pytask_parallel/logging.py @@ -1,4 +1,6 @@ """Contains code relevant to logging.""" +from __future__ import annotations + from _pytask.config import hookimpl from _pytask.console import console diff --git a/src/pytask_parallel/plugin.py b/src/pytask_parallel/plugin.py index 2360c45..b315e8c 100644 --- a/src/pytask_parallel/plugin.py +++ b/src/pytask_parallel/plugin.py @@ -1,4 +1,6 @@ """Entry-point for the plugin.""" +from __future__ import annotations + from _pytask.config import hookimpl from pytask_parallel import build from pytask_parallel import config diff --git a/tests/conftest.py b/tests/conftest.py index 3a17662..541f8d3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest from click.testing import CliRunner diff --git a/tests/test_callbacks.py b/tests/test_callbacks.py index de73b81..bfb7473 100644 --- a/tests/test_callbacks.py +++ b/tests/test_callbacks.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from contextlib import ExitStack as does_not_raise # noqa: N813 import pytest diff --git a/tests/test_cli.py b/tests/test_cli.py index c184155..c3a8cab 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import textwrap from time import time diff --git a/tests/test_config.py b/tests/test_config.py index 3696cbb..eaadc58 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import textwrap diff --git a/tests/test_execute.py b/tests/test_execute.py index 4bd5db6..b0d7b6d 100644 --- a/tests/test_execute.py +++ b/tests/test_execute.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pickle import textwrap from time import time