Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-39615: Add warnings.warn() skip_file_prefixes support#100840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gpshead merged 3 commits intopython:mainfromgpshead:feature/warn/skip
Jan 28, 2023

Conversation

gpshead
Copy link
Member

@gpsheadgpshead commentedJan 8, 2023
edited
Loading

warnings.warn() gains the ability to skip stack frames based on code filename prefix rather than only a numericstacklevel= via a newskip_file_prefixes= keyword argument.

My motivation work finally tackling this feature: It will avoid the hacks around putting the warning in the right place in#100618.

`warnings.warn()` gains the ability to skip stack frames based on codefilename prefix rather than only a numeric `stacklevel=` via a new`skip_file_prefixes=` keyword argument.
@gpsheadgpshead self-assigned thisJan 23, 2023
@gpsheadgpshead requested a review fromYhg1sJanuary 25, 2023 02:53
@gpsheadgpshead merged commit052f53d intopython:mainJan 28, 2023
@gpsheadgpshead deleted the feature/warn/skip branchJanuary 28, 2023 02:35
mdboom pushed a commit to mdboom/cpython that referenced this pull requestJan 31, 2023
…n#100840)`warnings.warn()` gains the ability to skip stack frames based on codefilename 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 requestAug 13, 2024
This uses the warnings feature skip_file_prefixes added in 3.12python#100840
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@merwokmerwokmerwok left review comments

@brettcannonbrettcannonbrettcannon approved these changes

@Yhg1sYhg1sAwaiting requested review from Yhg1s

Assignees

@gpsheadgpshead

Labels
stdlibPython modules in the Lib dirtype-featureA feature request or enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@gpshead@brettcannon@merwok@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp