Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Nov 12, 2024

Conversation

zsaladin
Copy link
Contributor

@zsaladin zsaladin commented Nov 2, 2024

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

Copy link

cpython-cla-bot bot commented Nov 2, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Nov 2, 2024

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
Copy link
Contributor Author

zsaladin commented Nov 2, 2024

@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
Copy link
Contributor

picnixz commented Nov 2, 2024

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!

Copy link
Contributor

@picnixz picnixz left a comment

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?

Lib/test/test_warnings/__init__.py Outdated Show resolved Hide resolved
Lib/test/test_warnings/__init__.py Outdated Show resolved Hide resolved
@zsaladin
Copy link
Contributor Author

zsaladin commented Nov 3, 2024

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.

@encukou encukou merged commit 0ef84b0 into python:main Nov 12, 2024
43 checks passed
@zsaladin zsaladin deleted the fix/warnings branch November 12, 2024 13:50
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