-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
sage: update tests to adapt to matplotlib and sphinx upgrades #123698
Conversation
dc1c549
to
9ec902f
Compare
Sage uses Sphinx 3.1.0, and a Sphinx upgrade (#119648) just graduated from staging-next as well. The new version sprinkles a bunch of |
Note that Sage upstream is already proceeding with a migration to Sphinx 4 (https://trac.sagemath.org/ticket/31696), and the patch I added here is mirrored there. Should I fetchpatch this single commit from the ticket given that it matches the patch exactly, even if it's part of a larger update we don't want to do at the moment? |
6dc16cb
to
916734c
Compare
Result of 3 packages built:
|
@ofborg build sage sageWithDoc |
|
cc @timokau |
Thanks for staying on top of this @collares. I think it would be nice to have some reference to the upstream sphinx ticket. I would prefer fetching the patch from the ticket (to indicate that a similar change is at least considered upstream). Mostly I would like to see a comment that refers to the ticket though. |
d6c9071
to
f1d66f4
Compare
@timokau Done. Many thanks for the review! Edit: I didn't realize the Sphinx 4 patch was not exactly the same as what I had! - <span class="sig-name descname"><span class="pre">numerical_approx</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">digits</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">algorithm</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span>...
+ <code class="sig-name descname"><span class="pre">numerical_approx</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">digits</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">algorithm</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span>... Top is the new test output from the Sphinx 4 upstream update patch, bottom is the new output from my patch. The very first tag ( |
f1d66f4
to
3e89349
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got another failure:
sage -t --random-seed=0 /nix/store/g9qqb1v5yhsnagy9ybf5c6vhlix3xvnr-sage-src-9.3/src/sage/misc/sagedoc.py
**********************************************************************
File "/nix/store/g9qqb1v5yhsnagy9ybf5c6vhlix3xvnr-sage-src-9.3/src/sage/misc/sagedoc.py", line 23, in sage.misc.sagedoc
Failed example:
with open(docfilename) as fobj: # optional - dochtml
for line in fobj:
if "#sage.symbolic.expression.Expression.numerical_approx" in line:
print(line)
Expected:
<span class="sig-name descname"><span class="pre">numerical_approx</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prec</span></span><span class="o"><span class="pre">=</span></span><span class="def>
Got:
<code class="sig-name descname"><span class="pre">numerical_approx</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prec</span></span><span class="o"><span class="pre">=</span></span><span class="def>
<BLANKLINE>
**********************************************************************
1 item had failures:
1 of 4 in sage.misc.sagedoc
[10 tests, 1 failure, 7.67 s]
@jonringer Thanks for testing! I made a mistake when updating the patch, but it should be fixed now, as described in the edit of my previous comment. I am also running nixpkgs-review to be sure. The current version is the one reviewed by timokau, with an extra comment as suggested. |
Result of 2 packages built:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jonringer! |
Sounds good. Thanks @jonringer for taking care of the merge before branchoff :) |
Motivation for this change
Sage is currently broken on Nixpkgs master because the Matplotlib upgrade from #119008 just graduated from staging-next.
ZHF: #122042
@NixOS/nixos-release-managers
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)