Skip to content

Ineffective deprecation warnings #32139

@mkoeppe

Description

@mkoeppe

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.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions