-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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-83162: Rename re.error for better clarity. #101677
Conversation
Maybe it's just me, but I initially read |
Thanks for pointing that out, I agree that it can easily be read as recompile error. I think both |
Nice PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Ask whether this should also be added
Python 3.12 What's New
Yes please, in the 3.13 one.
…ility. Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu>
Thanks! I like the idea of the module name being more precise, however, that would be a very disruptive change and not something that should be done in this PR without any further discussions. Feel free to create another issue/start a discussion over at discuss.python.org to see if you can get any momentum. |
Yowza, I didn't expect this to happen. Out of habit, I rebased instead of merging on upstream/main for new changes since the last time I touched this branch. That seems to have touched all the files and add all the module owners... sorry about that! I'll try to revert this, or might just close this PR and create a new one if I can't salvage it. |
…Python 3.13 What's New.
Okay, a forced push to the previous commit seemed to fix that. Sorry I know that a force push is not recommended in cpythons workflow, but it seemed to be the easiest thing I could think of instead of trying to revert the previous rebase. @hugovk I've added the exception renaming to the 3.13 What's New section, do you think I should change this PR from draft to review? I can also continue the discussions for the new name for the exception in the original issue. |
Yes, I think think is ready for review. |
Misc/NEWS.d/next/Library/2023-02-08-00-43-29.gh-issue-83162.ufdI9F.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
…dI9F.rst Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Great, done, and fixed the Sphinx warnings. Just need to settle on the new exception name now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did RESyntaxError suddenly become RECompileError, which I think is worse. Like Barney, I prefer PatternError. The error is in the pattern, not the compilation process.
The pattern in error naming is SomethingError. I dislike multiple capitals, as in JSONDecodeError. Any of JsonError, DecodeError, ever JsonDecodeError would have been better. RegexError would have been OK with me too, but that apparently was not considered.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
This was the error message chosen in the original PR that was closed; I had not made any changes to it yet, as I wanted to get a consensus on the name first before going through the effort of renaming.
Got it, seems to be two votes for |
Nobody expects the Spanish Inquisition! @terryjreedy: please review the changes made to this pull request. |
@terryjreedy would there be anything else that needs to be done here? |
Please could you resolve the merge conflict? |
Sorry on mobile, will do later today. |
Hi @hugovk, I've gone ahead and resolved the merge conflicts. |
Hi, friendly ping @terryjreedy, would you mind taking another look at this PR? |
Thanks @hugovk, I've gone ahead and made the requested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Backport idlelib part of python#101677 with simple rename.
GH-112987 is a backport of this pull request to the 3.12 branch. |
…ythonGH-112987) Backport idlelib part of pythonGH-101677 with simple rename. (cherry picked from commit fd3b894) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Renamed re.error for clarity, and kept re.error for backward compatibility. Updated idlelib files at TJR's request. --------- Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Renamed re.error for clarity, and kept re.error for backward compatibility. Updated idlelib files at TJR's request. --------- Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Follow-up of rebased/squashed PR-1751 - renaming
re.error
for better clarity.TODO
Settle on new exception name. We seem to have a consensus forPatternError
.Follow-up on whether we rename the exception in. Approved for now.idlelib/replace.py
Ask whether this should also be added. Added toPython 3.13 What's New
Python 3.13 What's New
.