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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

zsaladin
Copy link

@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
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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants