Skip to content

Commit 49a6cba

Browse files
authored
Drop Python 3.7 (#521)
* Drop Python 3.7 * Add news fragment
1 parent fad7282 commit 49a6cba

File tree

7 files changed

+6
-19
lines changed

7 files changed

+6
-19
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ jobs:
6060
fail-fast: false
6161
matrix:
6262
python:
63-
- name: CPython 3.7
64-
action: 3.7
6563
- name: CPython 3.8
6664
action: 3.8
6765
- name: CPython 3.9
@@ -70,8 +68,6 @@ jobs:
7068
action: '3.10'
7169
- name: CPython 3.11
7270
action: '3.11'
73-
- name: PyPy 3.7
74-
action: pypy3.7
7571
- name: PyPy 3.8
7672
action: pypy3.8
7773
task:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
rev: v3.4.0
1313
hooks:
1414
- id: pyupgrade
15-
args: [--py37-plus]
15+
args: [--py38-plus]
1616

1717
- repo: https://github.com/PyCQA/isort
1818
rev: 5.12.0

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Rather than reading the Git history, or having one single file which developers
1919

2020
Used by `Twisted <https://github.com/twisted/twisted>`_, `pytest <https://github.com/pytest-dev/pytest/>`_, `pip <https://github.com/pypa/pip/>`_, `BuildBot <https://github.com/buildbot/buildbot>`_, and `attrs <https://github.com/python-attrs/attrs>`_, among others.
2121

22-
While the command line tool ``towncrier`` works on Python 3.7+ only, as long as you don't use any Python-specific affordances (like auto-detection of the project version), it is usable with **any project type** on **any platform**.
22+
While the command line tool ``towncrier`` requires Python to run, as long as you don't use any Python-specific affordances (like auto-detection of the project version), it is usable with **any project type** on **any platform**.
2323

2424

2525
Philosophy

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def pre_commit(session: nox.Session) -> None:
1717
session.run("pre-commit", "run", "--all-files", "--show-diff-on-failure")
1818

1919

20-
@nox.session(python=["pypy3.7", "pypy3.8", "3.7", "3.8", "3.9", "3.10", "3.11"])
20+
@nox.session(python=["pypy3.8", "3.8", "3.9", "3.10", "3.11"])
2121
def tests(session: nox.Session) -> None:
2222
session.install("Twisted", "coverage[toml]")
2323
posargs = list(session.posargs)

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@ classifiers = [
1818
"Operating System :: POSIX :: Linux",
1919
"Operating System :: MacOS :: MacOS X",
2020
"Operating System :: Microsoft :: Windows",
21-
"Programming Language :: Python :: 3",
22-
"Programming Language :: Python :: 3.7",
2321
"Programming Language :: Python :: 3.8",
2422
"Programming Language :: Python :: 3.9",
2523
"Programming Language :: Python :: 3.10",
2624
"Programming Language :: Python :: 3.11",
2725
"Programming Language :: Python :: Implementation :: CPython",
2826
"Programming Language :: Python :: Implementation :: PyPy",
2927
]
30-
requires-python = ">=3.7"
28+
requires-python = ">=3.8"
3129
dependencies = [
3230
"click",
3331
"click-default-group",

src/towncrier/_settings/load.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,13 @@
1111

1212
from contextlib import ExitStack
1313
from pathlib import Path
14-
from typing import TYPE_CHECKING, Any, Mapping, Sequence
14+
from typing import Any, Literal, Mapping, Sequence
1515

1616
from click import ClickException
1717

1818
from .._settings import fragment_types as ft
1919

2020

21-
if TYPE_CHECKING:
22-
# We only use Literal for type-checking and Mypy always brings its own
23-
# typing_extensions so this is safe without further dependencies.
24-
if sys.version_info < (3, 8):
25-
from typing_extensions import Literal
26-
else:
27-
from typing import Literal
28-
2921
if sys.version_info < (3, 10):
3022
import importlib_resources as resources
3123
else:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The support for Python 3.7 has been dropped.

0 commit comments

Comments
 (0)