Skip to content

Commit

Permalink
Support Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
waylan authored Nov 16, 2021
1 parent d1ed480 commit 7919bfd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,22 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
tox-env: [py36, py37, py38, py39, pypy3, pygments]
tox-env: [py36, py37, py38, py39, py310, pypy3, pygments]
include:
- tox-env: py36
python-version: 3.6
python-version: '3.6'
- tox-env: py37
python-version: 3.7
python-version: '3.7'
- tox-env: py38
python-version: 3.8
python-version: '3.8'
- tox-env: py39
python-version: 3.9
python-version: '3.9'
- tox-env: py310
python-version: '3.10'
- tox-env: pypy3
python-version: pypy3
- tox-env: pygments
python-version: 3.7
python-version: '3.7'

env:
TOXENV: ${{ matrix.tox-env }}
Expand Down
1 change: 1 addition & 0 deletions docs/change_log/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Under development: version 3.3.5 (a bug-fix release).
* Don't process shebangs in fenced code blocks when using CodeHilite (#1156).
* Improve email address validation for Automatic Links (#1165).
* Ensure `<summary>` tags are parsed correctly (#1079).
* Support Python 3.10 (#1124).

Feb 24, 2021: version 3.3.4 (a bug-fix release).

Expand Down
8 changes: 4 additions & 4 deletions markdown/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

from .pep562 import Pep562

try:
if sys.version_info >= (3, 10):
from importlib import metadata
except ImportError:
# <PY38 use backport
else:
# <PY310 use backport
import importlib_metadata as metadata

PY37 = (3, 7) <= sys.version_info
Expand Down Expand Up @@ -85,7 +85,7 @@
"""

# Only load extension entry_points once.
INSTALLED_EXTENSIONS = metadata.entry_points().get('markdown.extensions', ())
INSTALLED_EXTENSIONS = metadata.entry_points(group='markdown.extensions')
RTL_BIDI_RANGES = (
('\u0590', '\u07FF'),
# Hebrew (0590-05FF), Arabic (0600-06FF),
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def get_version():
license='BSD License',
packages=['markdown', 'markdown.extensions'],
python_requires='>=3.6',
install_requires=["importlib-metadata;python_version<'3.8'"],
install_requires=["importlib-metadata>='4.4';python_version<'3.10'"],
extras_require={
'testing': [
'coverage',
Expand Down Expand Up @@ -117,6 +117,7 @@ def get_version():
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36, py37, py38, py39, pypy3, pygments, flake8, checkspelling, pep517check, checklinks
envlist = py36, py37, py38, py39, py310, pypy3, pygments, flake8, checkspelling, pep517check, checklinks
isolated_build = True

[testenv]
Expand Down

0 comments on commit 7919bfd

Please sign in to comment.