Skip to content

Deprecate Python 3.6 and add support for Python 3.10. #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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

Expand All @@ -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
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ all releases are available on `PyPI <https://pypi.org/project/pytask-parallel>`_
`Anaconda.org <https://anaconda.org/conda-forge/pytask-parallel>`_.


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
Expand Down
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from setuptools import setup

if __name__ == "__main__":
Expand Down
2 changes: 2 additions & 0 deletions src/pytask_parallel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

try:
from ._version import version as __version__
except ImportError:
Expand Down
2 changes: 2 additions & 0 deletions src/pytask_parallel/backends.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""This module configures the available backends."""
from __future__ import annotations

from concurrent.futures import ProcessPoolExecutor
from concurrent.futures import ThreadPoolExecutor

Expand Down
2 changes: 2 additions & 0 deletions src/pytask_parallel/build.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/pytask_parallel/callbacks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Validate command line inputs and configuration values."""
from __future__ import annotations

from pytask_parallel.backends import PARALLEL_BACKENDS


Expand Down
2 changes: 2 additions & 0 deletions src/pytask_parallel/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Configure pytask."""
from __future__ import annotations

import os

from _pytask.config import hookimpl
Expand Down
7 changes: 4 additions & 3 deletions src/pytask_parallel/execute.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/pytask_parallel/logging.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Contains code relevant to logging."""
from __future__ import annotations

from _pytask.config import hookimpl
from _pytask.console import console

Expand Down
2 changes: 2 additions & 0 deletions src/pytask_parallel/plugin.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import pytest
from click.testing import CliRunner

Expand Down
2 changes: 2 additions & 0 deletions tests/test_callbacks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from contextlib import ExitStack as does_not_raise # noqa: N813

import pytest
Expand Down
2 changes: 2 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import textwrap
from time import time

Expand Down
2 changes: 2 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import os
import textwrap

Expand Down
2 changes: 2 additions & 0 deletions tests/test_execute.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import pickle
import textwrap
from time import time
Expand Down