Consider the following code

def g():
    function("f", x)


which in SageMathCell gives the following warning messages (in Sage itself 
and SageMathCloud everything is even more useless without using an extra 
module due to ): DeprecationWarning: Calling function('f',x) is deprecated. 
Use function('f')(x) instead.
See for details.
  g() DeprecationWarning: use 0o as octal prefix instead of 0
If you do not want this number to be interpreted as octal, remove the leading 
See for details.
  g() DeprecationWarning:  html(...) will change soon to return 
HTML instead of printing it. Instead use pretty_print(html(...)) for strings or 
just pretty_print(...) for math. 
See for details.

The problem is - the first two messages go too far in the call stack and 
complain about a wrong piece of code, which is very confusing in longer 
examples. It may have something to do with Cython involved in dealing with 
symbolic functions and numbers.

The question is - what is the proper way to fix it??? Using different 
stacklevels on a case-by-case basis is too error-prone, so hopefully 
something automatic can be done in the deprecation function itself.

Thank you!

You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to