Skip to content

Commit fb9d3ab

Browse files
authored
⬆️ Drop support for Python 3.9 (#360)
This is EoL next month https://devguide.python.org/versions
1 parent 9ffe841 commit fb9d3ab

File tree

16 files changed

+33
-47
lines changed

16 files changed

+33
-47
lines changed

.github/workflows/benchmark.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14-
- name: Set up Python 3.9
14+
- name: Set up Python
1515
uses: actions/setup-python@v5
1616
with:
17-
python-version: 3.9
17+
python-version: 3.10
1818

1919
- name: install pandoc
2020
uses: r-lib/actions/setup-pandoc@v2
@@ -27,7 +27,7 @@ jobs:
2727
pip install tox
2828
2929
- name: Run package benchmarks
30-
run: tox -e py39-bench-packages -- --benchmark-min-rounds 20 --benchmark-json bench-packages.json
30+
run: tox -e py310-bench-packages -- --benchmark-min-rounds 20 --benchmark-json bench-packages.json
3131

3232
# - name: Upload package data
3333
# uses: actions/upload-artifact@v3

.github/workflows/tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v4
23-
- name: Set up Python 3.9
23+
- name: Set up Python
2424
uses: actions/setup-python@v5
2525
with:
26-
python-version: '3.9'
26+
python-version: '3.10'
2727
- uses: pre-commit/[email protected]
2828

2929
tests:
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
python-version: ['pypy-3.9', '3.9', '3.10', '3.11', '3.12', '3.13']
35+
python-version: ['pypy-3.10', '3.10', '3.11', '3.12', '3.13']
3636

3737
steps:
3838
- uses: actions/checkout@v4
@@ -49,7 +49,7 @@ jobs:
4949
run: |
5050
pytest tests/ --cov=markdown_it --cov-report=xml --cov-report=term-missing
5151
- name: Upload to Codecov
52-
if: matrix.python-version == '3.9' && github.repository == 'executablebooks/markdown-it-py'
52+
if: matrix.python-version == '3.10' && github.repository == 'executablebooks/markdown-it-py'
5353
uses: codecov/codecov-action@v5
5454
with:
5555
name: markdown-it-py-pytests
@@ -63,7 +63,7 @@ jobs:
6363
runs-on: ubuntu-latest
6464
strategy:
6565
matrix:
66-
python-version: ['3.9']
66+
python-version: ['3.10']
6767
steps:
6868
- uses: actions/checkout@v4
6969
- name: Set up Python ${{ matrix.python-version }}
@@ -87,18 +87,18 @@ jobs:
8787
steps:
8888
- uses: actions/checkout@v4
8989

90-
- name: Set up Python 3.9
90+
- name: Set up Python
9191
uses: actions/setup-python@v5
9292
with:
93-
python-version: '3.9'
93+
python-version: '3.10'
9494

9595
- name: Install tox
9696
run: |
9797
python -m pip install --upgrade pip
9898
pip install tox
9999
100100
- name: Run benchmark
101-
run: tox -e py39-bench-core -- --benchmark-json bench-core.json
101+
run: tox -e py310-bench-core -- --benchmark-json bench-core.json
102102

103103
- name: Upload data
104104
uses: actions/upload-artifact@v4
@@ -116,10 +116,10 @@ jobs:
116116
steps:
117117
- name: Checkout source
118118
uses: actions/checkout@v4
119-
- name: Set up Python 3.9
119+
- name: Set up Python
120120
uses: actions/setup-python@v5
121121
with:
122-
python-version: '3.9'
122+
python-version: '3.10'
123123
- name: install flit
124124
run: |
125125
pip install flit~=3.4

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: ubuntu-22.04
55
tools:
6-
python: "3.9"
6+
python: "3.10"
77

88
python:
99
install:

docs/conf.py

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

8686

8787
intersphinx_mapping = {
88-
"python": ("https://docs.python.org/3.9", None),
88+
"python": ("https://docs.python.org/3.10", None),
8989
"mdit-py-plugins": ("https://mdit-py-plugins.readthedocs.io/en/latest/", None),
9090
}
9191

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This can also be used to run benchmarking tests using [pytest-benchmark](https:/
5050

5151
```shell
5252
>> cd markdown-it-py
53-
tox -e py39-bench-packages -- --benchmark-min-rounds 50
53+
tox -e py310-bench-packages -- --benchmark-min-rounds 50
5454
```
5555

5656
For documentation build tests:

markdown_it/_compat.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
11
from __future__ import annotations
2-
3-
from collections.abc import Mapping
4-
import sys
5-
from typing import Any
6-
7-
DATACLASS_KWARGS: Mapping[str, Any]
8-
if sys.version_info >= (3, 10):
9-
DATACLASS_KWARGS = {"slots": True}
10-
else:
11-
DATACLASS_KWARGS = {}

markdown_it/_punycode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2222

2323
import codecs
24+
from collections.abc import Callable
2425
import re
25-
from typing import Callable
2626

2727
REGEX_SEPARATORS = re.compile(r"[\x2E\u3002\uFF0E\uFF61]")
2828
REGEX_NON_ASCII = re.compile(r"[^\0-\x7E]")

markdown_it/parser_block.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
from __future__ import annotations
44

5+
from collections.abc import Callable
56
import logging
6-
from typing import TYPE_CHECKING, Callable
7+
from typing import TYPE_CHECKING
78

89
from . import rules_block
910
from .ruler import Ruler

markdown_it/parser_core.py

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

88
from __future__ import annotations
99

10-
from typing import Callable
10+
from collections.abc import Callable
1111

1212
from .ruler import Ruler
1313
from .rules_core import (

markdown_it/parser_inline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import TYPE_CHECKING, Callable
5+
from collections.abc import Callable
6+
from typing import TYPE_CHECKING
67

78
from . import rules_inline
89
from .ruler import Ruler

0 commit comments

Comments
 (0)