Skip to content

Commit

Permalink
Merge pull request #176 from pypa/support-python-3.9
Browse files Browse the repository at this point in the history
Support Python 3.9
  • Loading branch information
di authored Oct 20, 2020
2 parents 80f67ec + be14320 commit 64a95f5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ matrix:
- python: 3.8
env: TOXENV=py38
dist: xenial
- python: 3.9-dev
env: TOXENV=py39
dist: xenial
- python: pypy
env: TOXENV=pypy
- env: TOXENV=pep8
Expand Down
10 changes: 8 additions & 2 deletions readme_renderer/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
import pygments
import pygments.lexers
import pygments.formatters
from six.moves import html_parser

try:
from six.moves.html_parser import unescape
except ImportError: # Python 2
from six.moves import html_parser

unescape = html_parser.HTMLParser().unescape

from .clean import clean

Expand Down Expand Up @@ -99,7 +105,7 @@ def replacer(match):
# translate '"' to '"', but it confuses pygments. Pygments will
# escape any html entities when re-writing the code, and we run
# everything through bleach after.
code = html_parser.HTMLParser().unescape(code)
code = unescape(code)

highlighted = pygments.highlight(code, lexer, formatter)

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"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",
],
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 = py27,pypy,py35,py36,py37,py38,pep8,py2pep8,packaging,noextra
envlist = py27,pypy,py35,py36,py37,py38,py39,pep8,py2pep8,packaging,noextra

[testenv]
deps =
Expand Down

0 comments on commit 64a95f5

Please sign in to comment.