Skip to content

Commit a96ba51

Browse files
authored
Deprecate Python 3.6 and add support for Python 3.10. (#34)
1 parent 78499f6 commit a96ba51

18 files changed

+41
-17
lines changed

.github/workflows/continuous-integration-workflow.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
27-
python-version: ['3.7', '3.8', '3.9']
27+
python-version: ['3.7', '3.8', '3.9', '3.10']
2828

2929
steps:
3030
- uses: actions/checkout@v2
@@ -44,7 +44,7 @@ jobs:
4444
run: tox -e pytest -- -m "unit or (not integration and not end_to_end)" --cov=./ --cov-report=xml -n auto
4545

4646
- name: Upload coverage report for unit tests and doctests.
47-
if: runner.os == 'Linux' && matrix.python-version == '3.8'
47+
if: runner.os == 'Linux' && matrix.python-version == '3.9'
4848
shell: bash -l {0}
4949
run: bash <(curl -s https://codecov.io/bash) -F unit -c
5050

@@ -53,7 +53,7 @@ jobs:
5353
run: tox -e pytest -- -m integration --cov=./ --cov-report=xml -n auto
5454

5555
- name: Upload coverage reports of integration tests.
56-
if: runner.os == 'Linux' && matrix.python-version == '3.8'
56+
if: runner.os == 'Linux' && matrix.python-version == '3.9'
5757
shell: bash -l {0}
5858
run: bash <(curl -s https://codecov.io/bash) -F integration -c
5959

@@ -62,11 +62,6 @@ jobs:
6262
run: tox -e pytest -- -m end_to_end --cov=./ --cov-report=xml -n auto
6363

6464
- name: Upload coverage reports of end-to-end tests.
65-
if: runner.os == 'Linux' && matrix.python-version == '3.8'
65+
if: runner.os == 'Linux' && matrix.python-version == '3.9'
6666
shell: bash -l {0}
6767
run: bash <(curl -s https://codecov.io/bash) -F end_to_end -c
68-
69-
- name: Validate codecov.yml
70-
if: runner.os == 'Linux' && matrix.python-version == '3.7'
71-
shell: bash -l {0}
72-
run: cat codecov.yml | curl --data-binary @- https://codecov.io/validate

.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ repos:
2525
rev: v2.31.0
2626
hooks:
2727
- id: pyupgrade
28-
args: [--py36-plus]
28+
args: [--py37-plus]
2929
- repo: https://github.com/asottile/reorder_python_imports
3030
rev: v2.7.1
3131
hooks:
3232
- id: reorder-python-imports
33+
args: [--py37-plus, --add-import, 'from __future__ import annotations']
3334
- repo: https://github.com/asottile/setup-cfg-fmt
3435
rev: v1.20.0
3536
hooks:

CHANGES.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ all releases are available on `PyPI <https://pypi.org/project/pytask-parallel>`_
77
`Anaconda.org <https://anaconda.org/conda-forge/pytask-parallel>`_.
88

99

10-
0.1.1 - 2022-xx-xx
10+
0.1.1 - 2022-02-08
1111
------------------
1212

1313
- :gh:`30` removes unnecessary content from ``tox.ini``.
14+
- :gh:`33` skips concurrent CI builds.
15+
- :gh:`34` deprecates Python 3.6 and adds support for Python 3.10.
1416

1517

1618
0.1.0 - 2021-07-20

setup.cfg

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ classifiers =
1515
Operating System :: OS Independent
1616
Programming Language :: Python :: 3
1717
Programming Language :: Python :: 3 :: Only
18-
Programming Language :: Python :: 3.6
1918
Programming Language :: Python :: 3.7
2019
Programming Language :: Python :: 3.8
2120
Programming Language :: Python :: 3.9
@@ -32,8 +31,8 @@ install_requires =
3231
click
3332
cloudpickle
3433
loky
35-
pytask>=0.1.0
36-
python_requires = >=3.6
34+
pytask>=0.1.7
35+
python_requires = >=3.7
3736
include_package_data = True
3837
package_dir = =src
3938
zip_safe = False

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from setuptools import setup
24

35
if __name__ == "__main__":

src/pytask_parallel/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
try:
24
from ._version import version as __version__
35
except ImportError:

src/pytask_parallel/backends.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""This module configures the available backends."""
2+
from __future__ import annotations
3+
24
from concurrent.futures import ProcessPoolExecutor
35
from concurrent.futures import ThreadPoolExecutor
46

src/pytask_parallel/build.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Extend the build command."""
2+
from __future__ import annotations
3+
24
import click
35
from _pytask.config import hookimpl
46
from pytask_parallel.backends import PARALLEL_BACKENDS

src/pytask_parallel/callbacks.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Validate command line inputs and configuration values."""
2+
from __future__ import annotations
3+
24
from pytask_parallel.backends import PARALLEL_BACKENDS
35

46

src/pytask_parallel/config.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Configure pytask."""
2+
from __future__ import annotations
3+
24
import os
35

46
from _pytask.config import hookimpl

src/pytask_parallel/execute.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"""Contains code relevant to the execution."""
2+
from __future__ import annotations
3+
24
import sys
35
import time
46
from typing import Any
5-
from typing import Tuple
67

78
import cloudpickle
89
from _pytask.config import hookimpl
@@ -176,8 +177,8 @@ def _unserialize_and_execute_task(bytes_, show_locals, console_options):
176177

177178

178179
def _process_exception(
179-
exc_info: Tuple[Any], show_locals: bool, console_options: ConsoleOptions
180-
) -> Tuple[Any]:
180+
exc_info: tuple[Any], show_locals: bool, console_options: ConsoleOptions
181+
) -> tuple[Any]:
181182
exc_info = remove_internal_traceback_frames_from_exc_info(exc_info)
182183
traceback = Traceback.from_exception(*exc_info, show_locals=show_locals)
183184
segments = console.render(traceback, options=console_options)

src/pytask_parallel/logging.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Contains code relevant to logging."""
2+
from __future__ import annotations
3+
24
from _pytask.config import hookimpl
35
from _pytask.console import console
46

src/pytask_parallel/plugin.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Entry-point for the plugin."""
2+
from __future__ import annotations
3+
24
from _pytask.config import hookimpl
35
from pytask_parallel import build
46
from pytask_parallel import config

tests/conftest.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import pytest
24
from click.testing import CliRunner
35

tests/test_callbacks.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from contextlib import ExitStack as does_not_raise # noqa: N813
24

35
import pytest

tests/test_cli.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import textwrap
24
from time import time
35

tests/test_config.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import os
24
import textwrap
35

tests/test_execute.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import pickle
24
import textwrap
35
from time import time

0 commit comments

Comments
 (0)