Skip to content

Update Python builtin keywords, functions, and exceptions to Python version 3 #2109

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

Merged
merged 6 commits into from
Jul 15, 2025

Conversation

joclement
Copy link
Contributor

@joclement joclement commented Feb 10, 2025

@joclement joclement changed the title Update Python builtin keywords, functions, and exception to version 3 Update Python builtin keywords, functions, and exceptions to Python version 3 Feb 10, 2025
@joclement joclement force-pushed the update-python-keywords branch from 0ae6928 to 3666812 Compare February 10, 2025 20:38
@tancnle
Copy link
Collaborator

tancnle commented Apr 11, 2025

@joclement Thank you for your contribution. Even though Python 2 is EOL, we still have users on the old version, plus we do not have a way to specify v2 and v3 like Pygments. For that reason, I would suggest avoid removing old keywords. What do you think?

@jneen
Copy link
Member

jneen commented Apr 12, 2025

We don't interpret or run code, we only highlight it. Despite Python 2 being EOL, it is still reasonable to, e.g. write a blog post about it. I think there may be some merit into splitting these if they diverge too much, into e.g. a python and a python2 lexer, but if we can have one lexer that can highlight both, I don't see an issue with it.

joclement added a commit to joclement/rouge that referenced this pull request Jul 11, 2025
See rouge-ruby#2109 (comment).

Revert "feat!: no longer detect Python2"
This reverts commit 3666812.
joclement added a commit to joclement/rouge that referenced this pull request Jul 11, 2025
@joclement
Copy link
Contributor Author

joclement commented Jul 11, 2025

Thank you for the feedback and sorry for not addressing this earlier.

I reverted the changes dropping Python2 support.

Using git log -p -w --word-diff shows much better than the diff on GitHub that I just re-added keywords and broke too long lines.

@joclement joclement force-pushed the update-python-keywords branch from c94c2b5 to b87e5cb Compare July 11, 2025 14:35
@tancnle
Copy link
Collaborator

tancnle commented Jul 15, 2025

Thanks @joclement. LGTM 🚀

@tancnle tancnle added this pull request to the merge queue Jul 15, 2025
Merged via the queue into rouge-ruby:master with commit 1ba62c9 Jul 15, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants