Skip to content

Commit 1ea5457

Browse files
authored
⬆️ Drop Python 3.7 (#264)
Python 3.7 is end-of-life on 2023-06-27 https://devguide.python.org/versions/
1 parent baa8658 commit 1ea5457

File tree

6 files changed

+12
-19
lines changed

6 files changed

+12
-19
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ubuntu-latest
3232
strategy:
3333
matrix:
34-
python-version: ['pypy-3.7', '3.7', '3.8', '3.9', '3.10', '3.11']
34+
python-version: ['pypy-3.8', '3.8', '3.9', '3.10', '3.11']
3535

3636
steps:
3737
- uses: actions/checkout@v3
@@ -47,10 +47,10 @@ jobs:
4747
run: |
4848
pytest tests/ --cov=markdown_it --cov-report=xml --cov-report=term-missing
4949
- name: Upload to Codecov
50-
if: matrix.python-version == '3.7' && github.repository == 'executablebooks/markdown-it-py'
50+
if: matrix.python-version == '3.8' && github.repository == 'executablebooks/markdown-it-py'
5151
uses: codecov/codecov-action@v3
5252
with:
53-
name: markdown-it-py-pytests-py3.7
53+
name: markdown-it-py-pytests
5454
flags: pytests
5555
file: ./coverage.xml
5656
fail_ci_if_error: true

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2
22

33
python:
4-
version: 3
4+
version: "3.8"
55
install:
66
- method: pip
77
path: .

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181

8282
intersphinx_mapping = {
83-
"python": ("https://docs.python.org/3.7", None),
83+
"python": ("https://docs.python.org/3.8", None),
8484
"mdit-py-plugins": ("https://mdit-py-plugins.readthedocs.io/en/latest/", None),
8585
}
8686

markdown_it/renderer.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,12 @@ class Renderer
99

1010
from collections.abc import MutableMapping, Sequence
1111
import inspect
12-
from typing import Any, ClassVar
12+
from typing import Any, ClassVar, Protocol
1313

1414
from .common.utils import escapeHtml, unescapeAll
1515
from .token import Token
1616
from .utils import OptionsDict
1717

18-
try:
19-
from typing import Protocol
20-
except ImportError: # Python <3.8 doesn't have `Protocol` in the stdlib
21-
from typing_extensions import Protocol # type: ignore
22-
2318

2419
class RendererProtocol(Protocol):
2520
__output__: ClassVar[str]

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ classifiers = [
1414
"Intended Audience :: Developers",
1515
"License :: OSI Approved :: MIT License",
1616
"Programming Language :: Python :: 3",
17-
"Programming Language :: Python :: 3.7",
1817
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
@@ -25,10 +24,9 @@ classifiers = [
2524
"Topic :: Text Processing :: Markup",
2625
]
2726
keywords = ["markdown", "lexer", "parser", "commonmark", "markdown-it"]
28-
requires-python = ">=3.7"
27+
requires-python = ">=3.8"
2928
dependencies = [
3029
"mdurl~=0.1",
31-
"typing_extensions>=3.7.4;python_version<'3.8'",
3230
]
3331

3432
[project.urls]

tox.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
# then run `tox` or `tox -- {pytest args}`
55
# run in parallel using `tox -p`
66
[tox]
7-
envlist = py37
7+
envlist = py38
88

99
[testenv]
1010
usedevelop = true
1111

12-
[testenv:py{37,38,39,310,311}]
12+
[testenv:py{38,39,310,311}]
1313
extras =
1414
linkify
1515
testing
1616
commands = pytest {posargs:tests/}
1717

18-
[testenv:py{37,38,39,310,311}-plugins]
18+
[testenv:py{38,39,310,311}-plugins]
1919
extras = testing
2020
changedir = {envtmpdir}
2121
allowlist_externals =
@@ -27,11 +27,11 @@ commands_pre =
2727
commands =
2828
pytest {posargs}
2929

30-
[testenv:py{37,38,39}-bench-core]
30+
[testenv:py{38,39,310,311}-bench-core]
3131
extras = benchmarking
3232
commands = pytest benchmarking/bench_core.py {posargs}
3333

34-
[testenv:py{37,38}-bench-packages]
34+
[testenv:py{38,39,310,311}-bench-packages]
3535
extras = benchmarking,compare
3636
commands = pytest benchmarking/bench_packages.py {posargs}
3737

0 commit comments

Comments
 (0)