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

sympy: 1.6.2 -> 1.7.1 #107663

Merged
merged 2 commits into from Jan 6, 2021
Merged

sympy: 1.6.2 -> 1.7.1 #107663

merged 2 commits into from Jan 6, 2021

Conversation

suhr
Copy link
Contributor

@suhr suhr commented Dec 26, 2020

Motivation for this change

Required by Mathics (#107652).

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.

@timokau
Copy link
Member

timokau commented Dec 28, 2020

Have you tested if sage still builds after this update?

@suhr
Copy link
Contributor Author

suhr commented Dec 30, 2020

@timokau No. I thought the CI does that?

@timokau
Copy link
Member

timokau commented Dec 30, 2020

No, ofBorg only builds the package itself by default. Building all reverse-dependencies of every PR would take too much resources. Its possible to tell ofBorg to build additional packages, but in this case it would most likely time out.

@collares
Copy link
Member

collares commented Jan 5, 2021

(Edit: I submitted a PR with this change to your fork)

According to https://trac.sagemath.org/ticket/30985, you probably need to apply a small patch available at https://git.sagemath.org/sage.git/patch?id2=b16b6b5b0c815482560b00d12f7e528d7aab1dcd&id=de5d173ede03cd4932661dbafaf1e02f927f64d1. Typically you would use the fetchSageDiff function, but since the patch does not apply cleanly to the 9.2 branch, here's an untested rebased version that you can add to the patch list at https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/science/math/sage/sage-src.nix#L95

diff --git a/src/sage/interfaces/sympy.py b/src/sage/interfaces/sympy.py
index cc35a42a9f..6e577d5d8d 100644
--- a/src/sage/interfaces/sympy.py
+++ b/src/sage/interfaces/sympy.py
@@ -397,7 +397,7 @@ def _sympysage_rf(self):
         sage: from sympy import Symbol, rf
         sage: _ = var('x, y')
         sage: rfxy = rf(Symbol('x'), Symbol('y'))
-        sage: assert rising_factorial(x,y)._sympy_() == rfxy.rewrite('gamma')
+        sage: assert rising_factorial(x,y)._sympy_() == rfxy.rewrite('gamma', piecewise=False)
         sage: assert rising_factorial(x,y) == rfxy._sage_()
     """
     from sage.arith.all import rising_factorial
diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
index 7c18ec1efa..c2619ac42d 100644
--- a/src/sage/symbolic/expression.pyx
+++ b/src/sage/symbolic/expression.pyx
@@ -955,7 +955,7 @@ cdef class Expression(CommutativeRingElement):
             sage: unicode_art(13 - I)
             13 - ⅈ
             sage: unicode_art(1.3 - I)
-            1.3 - 1.0⋅ⅈ
+            1.3 - ⅈ
             sage: unicode_art(cos(I))
             cosh(1)

Let me know if you encounter any issues.

@collares
Copy link
Member

collares commented Jan 5, 2021

Note that the singular.pyx Sage segfault is intermittent, doesn't happen too often, happens upstream too and is unfixed there (https://trac.sagemath.org/ticket/30945). If that's the only failure (which was the case on the x86_64 builder), I think we can consider the test run a success.

Edit: Looks like the aarch64 build was killed. It had to build a jdk and R for some reason, so it probably timed out before it could run the tests. If those outputs are cached it should run fine next time, let's see.

@ofborg build sage

@collares
Copy link
Member

collares commented Jan 5, 2021

Yep, this new run was all green, both on aarch64 and on x86_64. Sage seems OK with the update.

Copy link
Contributor

@omasanori omasanori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm, is the SRI hash allowed to use in nixpkgs? If so, I have no objection.
Thank you all for your effort!


src = fetchPypi {
inherit pname version;
sha256 = "1cfadcc80506e4b793f5b088558ca1fcbeaec24cd6fc86f1fdccaa3ee1d48708";
sha256 = "sha256-o96SYel1Nbg7uGB7DaLH0DEmZQ+v6isniWV7Ipwkay4=";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the SRI hash format is not allowed, you can use this instead:

Suggested change
sha256 = "sha256-o96SYel1Nbg7uGB7DaLH0DEmZQ+v6isniWV7Ipwkay4=";
sha256 = "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3";

(converted by nix to-base32 sha256-o96SYel1Nbg7uGB7DaLH0DEmZQ+v6isniWV7Ipwkay4=)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of packages with SRI hash in nixpkgs, so I believe it's allowed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Thank you for confirmation.

@timokau
Copy link
Member

timokau commented Jan 6, 2021

Note that the singular.pyx Sage segfault is intermittent

In that case I think it would be best to disable that test. Otherwise users will have to run the whole testsuite locally whenever the test fails on hydra.

That is unrelated to this PR though. Thanks for the reviews @collares and @omasanori!

@timokau timokau merged commit 4746e17 into NixOS:master Jan 6, 2021
@timokau
Copy link
Member

timokau commented Jan 6, 2021

Took the liberty to squash & merge to avoid an intermediate commit where sage is broken.

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

4 participants