-
-
Notifications
You must be signed in to change notification settings - Fork 510
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
Silence initialization of giac #35513
Silence initialization of giac #35513
Conversation
You have a doctest failure
|
When sage.libs.giac.giac is imported for the first time, some noise is output to stderr. This is annoying and complicates doctesting as `...` has to be added to the _first_ time giac is used. This output comes from the line Pygen('add_language(1)').eval() # Add the french keywords in the giac library language. which doesn't seem to be necessary. This commit removes the line, and fixes a few doctests which where expecting some output when using libgiac for the first time. Also label `# long time` a doctest in `src/sage/calculus/functional.py` which takes 6-7 seconds. Doing this in the first place motivates the current change as the initialization noise would happen in different tests depending on whether `--long` or not is used. Same for a doctest in `src/sage/calculus/tests.py`, and one in `src/sage/symbolic/integration/integral.py`. A test in `src/sage/libs/giac/giac.pyx` was marked `# random` but after this fix it seems to work ok.
0d5f313
to
599ae9f
Compare
It should be fixed now, my bad... This change was not intended to go in. The I only meant to remove a few |
@fchapoton you are credited with the change adding "French keywords" in 7d3fd94 . What was your motivation with that? |
No, that's just a style change. I tracked that line all the way to the original commit that includes Here is the line: sage/src/sage/libs/giac/giac.pyx Line 6263 in d095c37
The ticket for this is #29171. Now, this code originates in https://gitlab.math.univ-paris-diderot.fr/han/giacpy-sage/, more precisely: And looking at the giacpy history, the file |
Thanks for doing the archeology. It is just so bizarre to single out French unless there is a deep reason to it. We definitely have to expunge this. |
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.
The bots are happy and everything that needed sorting has been. Let's move on.
This `...` corresponds to a warning in the version of giac bundled with sage, but the warning is removed in current version of giac (tested with 1.9.0-43). Before this `...` was ok since it was matching giac initialization, but after the last commit this is no longer the case. Placing the `...` in the same line as the output makes it optional.
@kiwifb I had to add a small fix to support new giac. Can you verify that everything is still ok for you?
|
I'll try to test it later today. |
Documentation preview for this PR is ready! 🎉 |
Well Volker is already merging it. It does work OK with 1.9.0-43. Although, I am not pushing for either -41 or -43. Both give me a segfault in pari when running the giac testsuite and I haven't really had time to investigate further. |
I'm running 1.9.0-43. |
Thanks heaps. Helps with 1.9.0-45 too, I just tested it. |
When sage.libs.giac.giac is imported for the first time, some noise is output to stderr. This is annoying and complicates doctesting as
...
has to be added to the first time giac is used.This output comes from the line
which doesn't seem to be necessary.
This commit removes the line, and fixes a few doctests which where expecting some output when using libgiac for the first time.
Also label
# long time
a doctest insrc/sage/calculus/functional.py
which takes 6-7 seconds. Doing this in the first place motivates the current change as the initialization noise would happen in different tests depending on whether--long
or not is used.Same for a doctest in
src/sage/calculus/tests.py
, and one insrc/sage/symbolic/integration/integral.py
. A test insrc/sage/libs/giac/giac.pyx
was marked# random
but after this fix it seems to work ok.📝 Checklist