Skip to content

Commit fa215a3

Browse files
committed
Drop support for Python 3.9
This is EoL next month https://devguide.python.org/versions
1 parent 9ffe841 commit fa215a3

File tree

14 files changed

+25
-39
lines changed

14 files changed

+25
-39
lines changed

.github/workflows/benchmark.yml

Lines changed: 2 additions & 2 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

.github/workflows/tests.yml

Lines changed: 9 additions & 9 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,10 +87,10 @@ 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: |
@@ -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

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

markdown_it/ruler.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ class Ruler
2323
from typing import TYPE_CHECKING, Generic, TypedDict, TypeVar
2424
import warnings
2525

26-
from markdown_it._compat import DATACLASS_KWARGS
27-
2826
from .utils import EnvType
2927

3028
if TYPE_CHECKING:
@@ -66,7 +64,7 @@ class RuleOptionsType(TypedDict, total=False):
6664
"""A rule function, whose signature is dependent on the state type."""
6765

6866

69-
@dataclass(**DATACLASS_KWARGS)
67+
@dataclass(slots=True)
7068
class Rule(Generic[RuleFuncTv]):
7169
name: str
7270
enabled: bool

0 commit comments

Comments
 (0)