Skip to content

gh-126209: Fix inconsistency of skip_file_prefixes in warnings.warn's C and Python implementations#126329

Merged
encukou merged 8 commits into
python:mainfrom
zsaladin:fix/warnings
Nov 12, 2024
Merged

gh-126209: Fix inconsistency of skip_file_prefixes in warnings.warn's C and Python implementations#126329
encukou merged 8 commits into
python:mainfrom
zsaladin:fix/warnings

Conversation

@zsaladin

@zsaladin zsaladin commented Nov 2, 2024

Copy link
Copy Markdown
Contributor

I think setting the argument end=-1 the function tailmatch may cause undefined behavior. Most of tailmatch functions I've seen are used with end=PY_SSIZE_T_MAX and never seen end=-1 except for this case.

hopefully I will help

@ghost

ghost commented Nov 2, 2024

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app

bedevere-app Bot commented Nov 2, 2024

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@zsaladin

zsaladin commented Nov 2, 2024

Copy link
Copy Markdown
Contributor Author

@corona10

@picnixz picnixz changed the title gh-126209: Fix the inconsistent results of c and python implementations gh-126209: Fix inconsistency of skip_file_prefixes in warnings.warn's C and Python implementations Nov 2, 2024
@picnixz

picnixz commented Nov 2, 2024

Copy link
Copy Markdown
Member

Some tips: could you avoid force-pushing your commits in the future please? It makes reviewing harder (see https://devguide.python.org/getting-started/pull-request-lifecycle). Thanks!

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add a test for skip_file_prefixes?

Comment thread Misc/NEWS.d/next/Core_and_Builtins/2024-11-02-18-01-31.gh-issue-126209.2ZIhrS.rst Outdated
terryjreedy and others added 2 commits November 2, 2024 16:16
…e-126209.2ZIhrS.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Comment thread Lib/test/test_warnings/__init__.py
Comment thread Lib/test/test_warnings/__init__.py Outdated
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@zsaladin

zsaladin commented Nov 3, 2024

Copy link
Copy Markdown
Contributor Author

Some tips: could you avoid force-pushing your commits in the future please? It makes reviewing harder (see https://devguide.python.org/getting-started/pull-request-lifecycle). Thanks!

My apology. I will avoid force-pushing as you said.

zsaladin and others added 2 commits November 3, 2024 18:50
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Comment thread Misc/NEWS.d/next/Core_and_Builtins/2024-11-02-18-01-31.gh-issue-126209.2ZIhrS.rst Outdated
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
@encukou encukou merged commit 0ef84b0 into python:main Nov 12, 2024
@zsaladin zsaladin deleted the fix/warnings branch November 12, 2024 13:50
picnixz added a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
…gs.warn`'s C and Python implementations (pythonGH-126329)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
…gs.warn`'s C and Python implementations (pythonGH-126329)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants