Last active
December 2, 2021 21:12
-
-
Save iMichka/4ea358b055b9bfdb6e92cd31af9b4fcd to your computer and use it in GitHub Desktop.
markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/markdown/util.py b/markdown/util.py | |
index b443e3792..98cfbf754 100644 | |
--- a/markdown/util.py | |
+++ b/markdown/util.py | |
@@ -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 | |
@@ -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), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment