Skip to content

Warnings need different stacklevel after NEP 18 overrides #13329

Closed
@rgommers

Description

@rgommers

An example can be seen in recent doc builds:

/home/circleci/repo/venv/lib/python3.6/site-packages/numpy/core/overrides.py:150: RankWarning: Polyfit may be poorly conditioned
  implementation, public_api, relevant_args, args, kwargs)
/home/circleci/repo/venv/lib/python3.6/site-packages/numpy/core/overrides.py:150: RankWarning: Polyfit may be poorly conditioned
  implementation, public_api, relevant_args, args, kwargs)

In every function that got an override, the warnings stacklevel needs to be increased by 1.

I looked for an existing issue for this but couldn't find it. @shoyer does this need to be added to the NEP 18 tracking issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions