Consider the following code

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

g()

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 
https://groups.google.com/d/topic/sage-devel/-KiMrG--5x8/discussion ):

sagemathcell.py:5: DeprecationWarning: Calling function('f',x) is deprecated. 
Use function('f')(x) instead.
See http://trac.sagemath.org/17447 for details.
  g()
sagemathcell.py:5: DeprecationWarning: use 0o as octal prefix instead of 0
If you do not want this number to be interpreted as octal, remove the leading 
zeros.
See http://trac.sagemath.org/17413 for details.
  g()
sagemathcell.py:3: 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 http://trac.sagemath.org/18292 for details.
  html(04)


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!
Andrey

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to