Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
For `python-markdown`, this means bumping the minimum supported version to
3.0.0. For system dependencies, it means leaving python2 behind.
  • Loading branch information
uniphil authored and waylan committed Apr 5, 2021
1 parent c03e963 commit 7b3a23c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ matrix:
python: 3.5
- env: TOXENV=py36
python: 3.6
- env: TOXENV=py37
python: 3.7
- env: TOXENV=py38
python: 3.8
- env: TOXENV=py39
python: 3.9
- env: TOXENV=pypy
python: pypy
- env: TOXENV=pypy3
Expand Down
12 changes: 6 additions & 6 deletions mdx_gh_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

from markdown.extensions import Extension
from markdown.inlinepatterns import Pattern
from markdown.util import etree
from xml.etree import ElementTree


URL_BASE = 'https://github.com'
Expand All @@ -43,7 +43,7 @@


def _build_link(label, title, href, classes):
el = etree.Element('a')
el = ElementTree.Element('a')
el.text = label
el.set('title', title)
el.set('href', href)
Expand Down Expand Up @@ -121,11 +121,11 @@ def __init__(self, *args, **kwargs):
}
super(GithubLinks, self).__init__(*args, **kwargs)

def extendMarkdown(self, md, md_globals):
def extendMarkdown(self, md):
md.ESCAPED_CHARS.append('@')
md.inlinePatterns['issue'] = IssuePattern(self.getConfigs(), md)
md.inlinePatterns['mention'] = MentionPattern(self.getConfigs(), md)
md.inlinePatterns['commit'] = CommitPattern(self.getConfigs(), md)
md.inlinePatterns.register(IssuePattern(self.getConfigs(), md), 'issue', 20)
md.inlinePatterns.register(MentionPattern(self.getConfigs(), md), 'mention', 20)
md.inlinePatterns.register(CommitPattern(self.getConfigs(), md), 'commit', 20)


def makeExtension(*args, **kwargs): # pragma: no cover
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,19 @@
url='https://github.com/Python-Markdown/github-links/',
license='BSD License',
py_modules=['mdx_gh_links'],
install_requires=['markdown>=2.6.11'],
install_requires=['markdown>=3.0.0'],
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Documentation',
Expand Down

0 comments on commit 7b3a23c

Please sign in to comment.