-
-
Couldn't load subscription status.
- Fork 680
Description
As observed in #14270 with 9.4.beta4, some of our deprecation warnings are currently not issued.
This happens through an interaction of several flaws.
- fixing invalid escape sequences in various places #26132 (merged in Sage 8.4) broke the
filterwarningsregex insage.allthat is supposed to make "sure to keep OUR deprecation warnings" - counting the
stacklevelmay depend on whether Cython functions are involved
This ticket fixes these two issues. As a result, the following deprecation warning is again issued:
sage: var('y')
y
sage: (x+y)(1, 2)
<ipython-input-2-63751830fa4e>:1: DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...)
See http://trac.sagemath.org/5930 for details.
(x+y)(Integer(1), Integer(2))
3
In addition, some of the regexes in filterwarnings in sage.all are too broad, such as matching on module='.*ast' (added in #30184). We remove all leading .* for module patterns -- they are only needed when some deprecation warnings are introduced by vendored versions of some modules -- for example, pip vendors packaging as pip._vendor.packaging. This can be checked by find local/lib/python*/ -name "_vendor" | xargs ls
CC: @fchapoton @tscrim @jhpalmieri @vbraun
Component: refactoring
Author: Matthias Koeppe
Branch/Commit: 69a81ca
Reviewer: John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/32139