◐ Shell
clean mode source ↗

gh-39615: Add warnings.warn() skip_file_prefixes support by gpshead · Pull Request #100840 · python/cpython

`warnings.warn()` gains the ability to skip stack frames based on code
filename prefix rather than only a numeric `stacklevel=` via a new
`skip_file_prefixes=` keyword argument.

@gpshead added type-feature

A feature request or enhancement

stdlib

Standard Library Python modules in the Lib/ directory

labels

Jan 8, 2023

@gpshead

brettcannon

merwok

@gpshead

merwok

mdboom pushed a commit to mdboom/cpython that referenced this pull request

Jan 31, 2023
…n#100840)

`warnings.warn()` gains the ability to skip stack frames based on code
filename prefix rather than only a numeric `stacklevel=` via a new
`skip_file_prefixes=` keyword argument.

wimglenn added a commit to wimglenn/cpython that referenced this pull request

Aug 13, 2024
This uses the warnings feature skip_file_prefixes added in 3.12
python#100840