Skip to content

Increment Pygements release to support Python 3.5 syntax #1865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aaugustin opened this issue Dec 15, 2015 · 6 comments
Closed

Increment Pygements release to support Python 3.5 syntax #1865

aaugustin opened this issue Dec 15, 2015 · 6 comments
Labels
Improvement Minor improvement to code

Comments

@aaugustin
Copy link
Contributor

Hello,

Read the Docs offers the option to build docs with Python 2.x or 3.x, which is great.

Python 3.5 introduced some new syntax, namely the await and async keywords. Since Read the Docs runs Python 3.4, code samples that use this syntax cannot be parsed and thus aren't syntax-highlighted. See the first block on this page for example.

Have you considered making it possible to pick a specific Python version, perhaps among 2.7, 3.4, 3.5? Alternatively, do you have a rough idea of when you'll upgrade the platform to 3.5?

Thanks!

@aaugustin
Copy link
Contributor Author

I appear to have incorrectly assumed that it was related to the version of Python running Sphinx.

Apparently the next release of Pygments (for which there's no ETA) should solve the problem.

https://bitbucket.org/birkenfeld/pygments-main/issues/1154/please-make-next-release

@agjohnson
Copy link
Contributor

Regarding the Python version selection: we haven't yet, though the ability to use arbitrary versions of Python might be a good future feature.

The real issue seems to be a pending Pygments release, we'll pin the next release to come out.

@agjohnson agjohnson added the Improvement Minor improvement to code label Dec 21, 2015
@agjohnson agjohnson changed the title Building docs with Python 3.5 Increment Pygements release to support Python 3.5 syntax Dec 21, 2015
@aaugustin
Copy link
Contributor Author

Pygments 2.1 was releaseed mid-January, unblocking this issue.

@aaugustin
Copy link
Contributor Author

Is it just a matter of bumping Pygments to 2.1.3 in requirements/pip.txt?

@agjohnson
Copy link
Contributor

@aaugustin
Copy link
Contributor Author

I just submitted a PR with this change, I hope this helps. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

2 participants