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-120244: Fix re.sub() reference leak #120245

Merged
merged 3 commits into from
Jun 8, 2024
Merged

gh-120244: Fix re.sub() reference leak #120245

merged 3 commits into from
Jun 8, 2024

Conversation

neonene
Copy link
Contributor

@neonene neonene commented Jun 7, 2024

>python_d -X showrefcount -c "import re; re.sub(r'()', r'\1', '')"
[7140 refs, 4669 blocks]  # Before
[0 refs, 0 blocks]        # After

This patch is based on the commit: 75a6fad.

cc @serhiy-storchaka

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. Please add a NEWS entry, this is a user visible change.

@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) June 8, 2024 09:58
@serhiy-storchaka serhiy-storchaka added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jun 8, 2024
@serhiy-storchaka serhiy-storchaka merged commit 38a25e9 into python:main Jun 8, 2024
38 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 8, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jun 8, 2024

GH-120264 is a backport of this pull request to the 3.13 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 8, 2024
@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 8, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jun 8, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jun 8, 2024
@neonene
Copy link
Contributor Author

neonene commented Jun 8, 2024

Thanks.

@neonene neonene deleted the re_sub branch June 8, 2024 10:25
serhiy-storchaka pushed a commit that referenced this pull request Jun 8, 2024
serhiy-storchaka pushed a commit that referenced this pull request Jun 8, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
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.

2 participants