On Sunday, October 20, 2019 at 2:00:49 PM UTC-7, Nils Bruin wrote:
>
> [I think that behaviour is a bug in Python's warning machinery. It's a
> silent failure to issue a warning in a case where some warning is almost
> certainly desired].
>
Correcting myself on this one. Nothing is wrong in
On Saturday, October 19, 2019 at 1:20:15 PM UTC-7, David Roe wrote:
>
> I think the idea is that if a user's typing interactively then they don't
> need a deprecation warning (since the behavior currently works). It's more
> important to show a user a warning if they have the deprecated
Le 20/10/2019 à 11:17, Vincent Delecroix a écrit :
Le 19/10/2019 à 13:19, David Roe a écrit :
I think the idea is that if a user's typing interactively then they don't
need a deprecation warning (since the behavior currently works). It's
more
important to show a user a warning if they have
Le 19/10/2019 à 13:19, David Roe a écrit :
I think the idea is that if a user's typing interactively then they don't
need a deprecation warning (since the behavior currently works). It's more
important to show a user a warning if they have the deprecated behavior in
a function they've written.
Okay, that makes sense. I thought I had seen deprecation warnings from
basic commands issued at the "sage:" prompt, but I must be misremembering.
John
On Saturday, October 19, 2019 at 1:20:15 PM UTC-7, David Roe wrote:
>
> The reason that the warning isn't printed is that the stacklevel is
The reason that the warning isn't printed is that the stacklevel is set to
4 by default in order to tell the user where the Integer('012') is
occurring. When you type '012' directly into the command line, the stack
isn't deep enough and no warning is printed. You do see a warning if you
write a
Here is a doctest from sage/rings/integer.pyx:
sage: Integer('012')
doctest:...: 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