Skip to content

Commit

Permalink
Drop support for Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
hukkin committed Jul 30, 2023
1 parent 8713c9f commit 54431f5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12-dev']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12-dev']
os: [ubuntu-latest, macos-latest, windows-latest]
continue-on-error: ${{ matrix.python-version == '3.12-dev' }}

Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.7'
python-version: '3.8'
- name: Install build and publish tools
run: |
pip install build twine
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ sphinx:

# Optionally set the version of Python and requirements required to build your docs
python:
version: '3.7'
version: '3.8'
install:
- requirements: docs/requirements.txt
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ authors = [
{ name = "Taneli Hukkinen", email = "hukkin@users.noreply.github.com" },
]
license = { file = "LICENSE" }
requires-python = ">=3.7"
requires-python = ">=3.8"
dependencies = [
'tomli >=1.1.0; python_version < "3.11"',
'markdown-it-py >=1.0.0,<4.0.0',
'tomli >=1.1.0; python_version < "3.11"',
'importlib-metadata >=3.6.0; python_version < "3.10"',
'typing-extensions >=3.7.4; python_version < "3.8"',
]
readme = "README.md"
classifiers = [
Expand Down Expand Up @@ -64,10 +63,10 @@ xfail_strict = true
legacy_tox_ini = '''
[tox]
# Only run pytest envs when no args given to tox
envlist = py{37,38,39,310}
envlist = py{38,39,310,311}
isolated_build = True
[testenv:py{37,38,39,310}]
[testenv:py{38,39,310,311}]
description = run tests
deps =
-r tests/requirements.txt
Expand Down
7 changes: 1 addition & 6 deletions src/mdformat/_compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ("importlib_metadata", "Protocol", "Literal", "tomllib")
__all__ = ("importlib_metadata", "tomllib")

import sys

Expand All @@ -11,8 +11,3 @@
from importlib import metadata as importlib_metadata
else: # pragma: no cover
import importlib_metadata

if sys.version_info >= (3, 8): # pragma: no cover
from typing import Literal, Protocol
else: # pragma: no cover
from typing_extensions import Literal, Protocol
3 changes: 1 addition & 2 deletions src/mdformat/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
import re
import tempfile
from types import MappingProxyType
from typing import Any
from typing import Any, Literal

from markdown_it import MarkdownIt
from markdown_it.renderer import RendererHTML

from mdformat._compat import Literal
import mdformat.plugins

NULL_CTX = nullcontext()
Expand Down
3 changes: 2 additions & 1 deletion src/mdformat/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

import argparse
from collections.abc import Callable, Mapping
from typing import Protocol

from markdown_it import MarkdownIt

from mdformat._compat import Protocol, importlib_metadata
from mdformat._compat import importlib_metadata
from mdformat.renderer.typing import Postprocess, Render


Expand Down
3 changes: 1 addition & 2 deletions src/mdformat/renderer/_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
import re
import textwrap
from types import MappingProxyType
from typing import TYPE_CHECKING, Any, NamedTuple
from typing import TYPE_CHECKING, Any, Literal, NamedTuple

from markdown_it.rules_block.html_block import HTML_SEQUENCES

from mdformat import codepoints
from mdformat._compat import Literal
from mdformat._conf import DEFAULT_OPTS
from mdformat.renderer._util import (
RE_CHAR_REFERENCE,
Expand Down

0 comments on commit 54431f5

Please sign in to comment.