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-122358: Remove re._compile #122357

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

gh-122358: Remove re._compile #122357

wants to merge 13 commits into from

Conversation

wimglenn
Copy link
Contributor

@wimglenn wimglenn commented Jul 27, 2024

@wimglenn wimglenn changed the title Remove re._compile gh-#122358: Remove re._compile Jul 27, 2024
@wimglenn wimglenn marked this pull request as ready for review July 27, 2024 16:35
@picnixz picnixz changed the title gh-#122358: Remove re._compile gh-122358: Remove re._compile Jul 27, 2024
@wimglenn wimglenn force-pushed the re-compile branch 3 times, most recently from 4e06a9c to e6506a6 Compare August 2, 2024 02:39
Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

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

LGTM, GitHub is making the diff look weird.

@hugovk
Copy link
Member

hugovk commented Aug 4, 2024

Please add a news entry.

If you use the blurb CLI, please upgrade to 1.2: https://discuss.python.org/t/new-blurb-1-2-please-upgrade/59159

Move implementation directly into re.compile.
Simplifies tracebacks and reduces call stack.
@wimglenn
Copy link
Contributor Author

wimglenn commented Aug 4, 2024

@hugovk Blurbed it, though there is no user-facing change here.

@hugovk
Copy link
Member

hugovk commented Aug 4, 2024

Thanks!

Also please don't force push in this repo, we squash merge everything at the end:

https://devguide.python.org/getting-started/pull-request-lifecycle/#quick-guide

@@ -1227,7 +1227,7 @@ def test_pickling(self):
pickled = pickle.dumps(oldpat, proto)
newpat = pickle.loads(pickled)
self.assertEqual(newpat, oldpat)
# current pickle expects the _compile() reconstructor in re module
# previous pickles may expect the _compile() reconstructor in re module
Copy link
Member

Choose a reason for hiding this comment

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

Is it worth adding a test for pickles that expect _compile()? ("No" is a valid answer)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added it in df79dd5

…pnaq4.rst

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@serhiy-storchaka
Copy link
Member

There are arguments against this change. See details in my comment in the issue.

@wimglenn
Copy link
Contributor Author

@serhiy-storchaka ping? anything more to do here?

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.

6 participants