Skip to content

gh-106052: Fix bug in the matching of possessive quantifiers #106515

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

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jul 7, 2023

It did not work in the case of a subpattern containing backtraces.

Temporary implement possessive quantifiers as equivalent greedy qualifiers in atomic groups.

@ferdnyc
Copy link
Contributor

ferdnyc commented Jul 10, 2023

@serhiy-storchaka

Nit: (and not necessarily one that needs to be addressed directly) -- do you mean "backtracking", where you write "backtraces"?

It did not work in the case of a subpattern containing backtracking.

Temporary implement possessive quantifiers as equivalent greedy qualifiers
in atomic groups.
@serhiy-storchaka serhiy-storchaka force-pushed the re-possesive-quant-nested-backtrace branch from 1a420c0 to 89bf9dc Compare July 10, 2023 08:09
@serhiy-storchaka
Copy link
Member Author

Thank you @ferdnyc. Fixed.

@serhiy-storchaka
Copy link
Member Author

It is a last resort. It will be merged if we not find a fix for POSSESSIVE_REPEAT implementation before the next releases.

@Yhg1s
Copy link
Member

Yhg1s commented Jul 10, 2023

Since 'the next releases' for Python 3.12 is today, do you want this in for 3.12.0 beta 4, or wait for rc1?

@serhiy-storchaka
Copy link
Member Author

I think it can wait for rc1, but we should not miss bugfix release for 3.11.

@gpshead
Copy link
Member

gpshead commented Jul 26, 2023

rc1 is in a few days if you want this in before then. I don't think this is really a release blocker even if it does sound nice to fix. 3.11 users already have to deal with the bug existence even if we manage to get a fix into a patch release.

@serhiy-storchaka serhiy-storchaka merged commit 7b6e34e into python:main Aug 9, 2023
@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the re-possesive-quant-nested-backtrace branch August 9, 2023 05:48
@miss-islington
Copy link
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7b6e34e5baeb4162815ffa4d943b09a58e3f6580 3.12

@miss-islington
Copy link
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7b6e34e5baeb4162815ffa4d943b09a58e3f6580 3.11

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Aug 9, 2023
…iers (pythongh-106515)

It did not work in the case of a subpattern containing backtracking.

Temporary implement possessive quantifiers as equivalent greedy qualifiers
in atomic groups..
(cherry picked from commit 7b6e34e)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot
Copy link

GH-107795 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 9, 2023
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Aug 9, 2023
…iers (pythongh-106515)

It did not work in the case of a subpattern containing backtracking.

Temporary implement possessive quantifiers as equivalent greedy qualifiers
in atomic groups..
(cherry picked from commit 7b6e34e)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot
Copy link

GH-107796 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Aug 9, 2023
serhiy-storchaka added a commit that referenced this pull request Aug 9, 2023
…H-106515) (GH-107795)

It did not work in the case of a subpattern containing backtracking.

Temporary implement possessive quantifiers as equivalent greedy qualifiers
in atomic groups.
(cherry picked from commit 7b6e34e)
Yhg1s pushed a commit that referenced this pull request Aug 9, 2023
…H-106515) (#107796)

[3.12] gh-106052: Fix bug in the matching of possessive quantifiers (gh-106515)

It did not work in the case of a subpattern containing backtracking.

Temporary implement possessive quantifiers as equivalent greedy qualifiers
in atomic groups..
(cherry picked from commit 7b6e34e)
@serhiy-storchaka serhiy-storchaka removed their assignment Sep 8, 2023
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.

6 participants