Deprecation warning when calling certain symbolic commands on Ubuntu 21.10 but not on 20.04 (SageMath 9.4)

51 visualizzazioni
Passa al primo messaggio da leggere

Marcus Aichmayr

da leggere,
13 dic 2021, 14:31:4813/12/21
a sage-support
Hi,

I'm using SageMath 9.4 on both Ubuntu 20.04 and 21.10. In Ubuntu 21.10, certain symbolic commands trigger a deprecation warning. This is not the case in Ubuntu 20.04.

Example 1:
sage: assume(x > 0)                                                            
/opt/SageMath/local/lib/python3.9/site-packages/sage/symbolic/expression_conversions.py:972: DeprecationWarning: invalid escape sequence \|
  """

Example 2:
sage: bool(SR(2) < 0)                                                          
/opt/SageMath/local/lib/python3.9/site-packages/sage/symbolic/expression_conversions.py:972: DeprecationWarning: invalid escape sequence \|
  """

False

Note that SR(2) < 0 alone does not trigger the deprecation warning.

I am not sure, what causes this deprecation warning on Ubuntu 21.10.
Note that I have used the sage-9.4-Ubuntu_20.04-x86_64.tar.bz2 binaries to install SageMath 9.4 on both computers. The deprecation warning might not occur if SageMath is built from source code on Ubuntu 21.10. I have not tried this.

Emmanuel Charpentier

da leggere,
13 dic 2021, 17:36:2413/12/21
a sage-support
Smells of an interface problem...

Are you using a notebook, the command line or another interface (e. g. sage_shell_mode in emacs) ? If notebook, which browser do you use ?

Marcus Aichmayr

da leggere,
13 dic 2021, 17:40:3913/12/21
a sage-support
It happens in command line and in jupyter notebook (firefox).

Emmanuel Charpentier

da leggere,
13 dic 2021, 19:05:0413/12/21
a sage-support
Hmmm... Hypothesis : the tarball you used depends on some system library that got updated in Ubuntu 21.10. You might try to compile yourself from source, or wait for a tarball compiled for your version of Ubuntu.
My preference would go to the first solution, which makes you independent of further tarballs, and haves other advantages, such as being able to install optional packages. It's not that hard, just a bit long, and well explained in the installation guide.

HTH,

Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi