Skip to content

Commit bd11cbf

Browse files
authored
Deprecate Python 3.6 and add support for Python 3.10. (#17)
1 parent 0df3ef8 commit bd11cbf

19 files changed

+43
-5
lines changed

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

+1-1
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

.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ repos:
3232
rev: v2.31.0
3333
hooks:
3434
- id: pyupgrade
35-
args: [--py36-plus]
35+
args: [--py37-plus]
3636
- repo: https://github.com/asottile/reorder_python_imports
3737
rev: v2.7.1
3838
hooks:
3939
- id: reorder-python-imports
40+
args: [--py37-plus, --add-import, 'from __future__ import annotations']
4041
- repo: https://github.com/asottile/setup-cfg-fmt
4142
rev: v1.20.0
4243
hooks:

CHANGES.rst

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ all releases are available on `PyPI <https://pypi.org/project/pytask-stata>`_ an
77
`Anaconda.org <https://anaconda.org/conda-forge/pytask-stata>`_.
88

99

10+
0.1.1 - 2022-02-07
11+
------------------
12+
13+
- :gh:`16` skips concurrent CI builds.
14+
- :gh:`17` deprecates Python 3.6 and adds support for Python 3.10.
15+
16+
1017
0.1.0 - 2021-07-21
1118
------------------
1219

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

src/pytask_stata/__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_stata/cli.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Everything related to the CLI."""
2+
from __future__ import annotations
3+
24
import click
35
from _pytask.config import hookimpl
46

src/pytask_stata/collect.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Collect tasks."""
2+
from __future__ import annotations
3+
24
import copy
35
import functools
46
import subprocess
57
from typing import Iterable
6-
from typing import Optional
78
from typing import Sequence
8-
from typing import Union
99

1010
from _pytask.config import hookimpl
1111
from _pytask.mark_utils import get_specific_markers_from_task
@@ -17,7 +17,7 @@
1717
from pytask_stata.shared import get_node_from_dictionary
1818

1919

20-
def stata(options: Optional[Union[str, Iterable[str]]] = None):
20+
def stata(options: str | Iterable[str] | None = None):
2121
"""Specify command line options for Stata.
2222
2323
Parameters

src/pytask_stata/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 shutil
35
import sys
46

src/pytask_stata/execute.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Execute tasks."""
2+
from __future__ import annotations
3+
24
import re
35

46
from _pytask.config import hookimpl

src/pytask_stata/parametrize.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Parametrize tasks."""
2+
from __future__ import annotations
3+
24
from _pytask.config import hookimpl
35
from _pytask.mark import MARK_GEN as mark # noqa: N811
46

src/pytask_stata/plugin.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Register hook specifications and implementations."""
2+
from __future__ import annotations
3+
24
from _pytask.config import hookimpl
35
from pytask_stata import cli
46
from pytask_stata import collect

src/pytask_stata/shared.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Shared functions and variables."""
2+
from __future__ import annotations
3+
24
import sys
35

46

tests/conftest.py

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

35
import pytest

tests/test_collect.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
from pathlib import Path
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 pytest
24
from pytask import main
35
from pytask_stata.config import _nonnegative_nonzero_integer

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 sys
24
import textwrap
35
from contextlib import ExitStack as does_not_raise # noqa: N813

tests/test_normal_execution_w_plugin.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Contains tests which do not require the plugin and ensure normal execution."""
2+
from __future__ import annotations
3+
24
import textwrap
35

46
import pytest

tests/test_parallel.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Contains test which ensure that the plugin works with pytask-parallel."""
2+
from __future__ import annotations
3+
24
import textwrap
35
import time
46

tests/test_parametrize.py

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

0 commit comments

Comments
 (0)