Skip to content

Commit 917c0c9

Browse files
authored
Merge pull request #279 from akaihola/drop-py36
Drop support for Python 3.6
2 parents 5b250fd + d65b400 commit 917c0c9

File tree

5 files changed

+11
-18
lines changed

5 files changed

+11
-18
lines changed

.github/workflows/python-package.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747
- windows-latest
4848
- macos-latest
4949
python-version:
50-
- '3.6'
5150
- '3.7'
5251
- '3.8'
5352
- '3.9'
@@ -110,7 +109,7 @@ jobs:
110109
from pyupgrade._main import main
111110
from glob import glob
112111
files = glob('**/*.py', recursive=True)
113-
main(files + ['--py36-plus'])
112+
main(files + ['--py37-plus'])
114113
"
115114
- name: Check dependencies for known security vulterabilities using Safety
116115
run: safety check

CHANGES.rst

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ Fixed
7676
- Handle isort file skip comment ``#isort:file_skip`` without an exception.
7777
- Fix compatibility with Pygments 2.11.2.
7878

79+
Removed
80+
-------
81+
- Drop support for Python 3.6 which has reached end of life.
82+
7983

8084
1.3.2_ - 2021-10-28
8185
===================

release_tools/update_contributors.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from itertools import groupby
2020
from pathlib import Path
2121
from textwrap import dedent, indent
22-
from typing import Any, Dict, Iterable, List, MutableMapping, Optional, Text, cast
22+
from typing import Any, Dict, Iterable, List, MutableMapping, Optional, cast
2323

2424
import click
2525
import defusedxml.ElementTree
@@ -175,7 +175,7 @@ def request( # type: ignore[override] # pylint: disable=arguments-differ
175175
self,
176176
method: str,
177177
url: str,
178-
headers: MutableMapping[Text, Text] = None,
178+
headers: MutableMapping[str, str] = None,
179179
**kwargs: Any,
180180
) -> Response:
181181
"""Query GitHub API with authorization, caching and host auto-fill-in

setup.cfg

+3-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ description = Apply Black formatting only in regions changed since last commit
1010
long_description_content_type = text/x-rst
1111
classifiers =
1212
Programming Language :: Python :: 3 :: Only
13-
Programming Language :: Python :: 3.6
1413
Programming Language :: Python :: 3.7
1514
Programming Language :: Python :: 3.8
1615
Programming Language :: Python :: 3.9
@@ -30,10 +29,9 @@ install_requires =
3029
black>=21.5b1
3130
toml>=0.10.0
3231
typing-extensions ; python_version < "3.8"
33-
dataclasses ; python_version < "3.7"
3432
# NOTE: remember to keep `.github/workflows/python-package.yml` in sync
3533
# with the minimum required Python version
36-
python_requires = >=3.6
34+
python_requires = >=3.7
3735

3836
[options.packages.find]
3937
where = src
@@ -70,19 +68,16 @@ test =
7068
pytest-mypy
7169
pyupgrade>=2.31.0
7270
regex>=2021.4.4
73-
# TODO: upgrade requests-cache once we've dropped Python 3.6 support
74-
requests_cache>=0.7,<0.8
71+
requests_cache>=0.7
7572
ruamel.yaml>=0.17.21
7673
safety>=1.10.3
77-
types-dataclasses ; python_version < "3.7"
7874
types-requests>=2.27.9
7975
types-toml>=0.10.4
8076
release =
8177
airium>=0.2.3
8278
click>=8.0.0
8379
defusedxml>=0.7.1
84-
# TODO: upgrade requests-cache once we've dropped Python 3.6 support
85-
requests_cache>=0.7,<0.8
80+
requests_cache>=0.7
8681

8782
[flake8]
8883
# Line length according to Black rules

src/darker/tests/helpers.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,14 @@
22

33
import re
44
import sys
5-
from contextlib import contextmanager
5+
from contextlib import contextmanager, nullcontext
66
from types import ModuleType
77
from typing import Any, ContextManager, Dict, List, Optional, Union
88
from unittest.mock import patch
99

1010
import pytest
1111
from _pytest.python_api import RaisesContext
1212

13-
if sys.version_info >= (3, 7):
14-
from contextlib import nullcontext
15-
else:
16-
from contextlib import suppress as nullcontext
17-
1813

1914
def filter_dict(dct: Dict[str, Any], filter_key: str) -> Dict[str, Any]:
2015
"""Return only given keys with their values from a dictionary"""

0 commit comments

Comments
 (0)