Skip to content
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

python2.pkgs.ipython, python2.pkgs.sphinx: use proper python2 lexer #78348

Merged
merged 2 commits into from Jan 23, 2020

Conversation

timokau
Copy link
Member

@timokau timokau commented Jan 23, 2020

Motivation for this change

Pygments 2.5 made the PythonLexer an alias to Python3Lexer. To use python2, one now has to explicitly use Python2Lexer.

Sphinx and ipython both use this lexer. The sphinx patch fixes the currently broken sage docbuild.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Since pygments 2.5 `PythonLexer` refers to python3 [1]. We have to be
explicit if we want to use python2.

[1] https://pygments.org/docs/changelog/
@timokau timokau changed the title Pygments lexer fix python2.pkgs.ipython, python2.pkgs.sphinx: use proper python2 lexer Jan 23, 2020
@ofborg ofborg bot requested review from bjornfor and LnL7 January 23, 2020 08:53
@timokau
Copy link
Member Author

timokau commented Jan 23, 2020

I left nix-review running for quite some time and found no regressions. I wouldn't expect any either.

@timokau timokau merged commit 7db53cc into NixOS:master Jan 23, 2020
@timokau timokau deleted the pygments-lexer-fix branch January 23, 2020 15:10
timokau added a commit to timokau/dotfiles that referenced this pull request Jan 24, 2020
This reverts commit 699a8d2.

The sage.doc issue was fixed in
NixOS/nixpkgs#78348.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants