Skip to content

sage: don't test for Cython source code in tracebacks (temporarily)#159351

Merged
7c6f434c merged 1 commit intoNixOS:masterfrom
collares:sage-ipython-8
Feb 14, 2022
Merged

sage: don't test for Cython source code in tracebacks (temporarily)#159351
7c6f434c merged 1 commit intoNixOS:masterfrom
collares:sage-ipython-8

Conversation

@collares
Copy link
Member

@collares collares commented Feb 11, 2022

Motivation for this change

To emit better tracebacks, IPython 8 (#154969) parses Python files using the ast module (via the stack_data package). Since Cython is a superset of Python, this results in no Cython code being printed in tracebacks. Fixing this properly is tracked in alexmojaki/stack_data#21, but for now we just disable the corresponding test. An alternative would be to revert IPython's IPython/core/ultratb.py, but this would need to be Sage-specific (since it would worsen tracebacks for pure Python code).

Sage tracks the IPython 8 upgrade at https://trac.sagemath.org/ticket/33170, a ticket which also includes two minor test changes. I added those to this PR as well.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Feb 11, 2022
@7c6f434c 7c6f434c merged commit 117fdae into NixOS:master Feb 14, 2022
@collares
Copy link
Member Author

Thanks for merging! This will be a temporary fix indeed, since upstream IPython just fixed this properly. But the fix will have to go through staging, so it's great to have this one merged already.

@collares collares deleted the sage-ipython-8 branch February 14, 2022 19:45
@collares
Copy link
Member Author

collares commented Feb 14, 2022

#160031 (targeting staging) removes this patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants