-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
bpo-38981: Rename re.error to re.ReCompileError for better readability. #17501
Conversation
This is also a name which is pep8 compliant. Update all the usage in the core to the new spelling. Keep `error` alias for backward compatibility
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.
This was discussed on python-ideas and I believe Guido approved of this specific change as long as the old name were kept as alias. There should be a new test that the alias works.
Misc/NEWS.d/next/Library/2019-12-07-13-19-03.bpo-38981.kJrSbj.rst
Outdated
Show resolved
Hide resolved
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 |
The test failure is this:
I don't understand 'default role' or why using such is bad. The only markup change is the addition of backticks around 'ReCompileError' on line 973. Maybe this is the error. Perhaps ask about this on core-mentorship list. I do not see error with 'make html' on Windows, so this is doing a more severe test. |
Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
Yes it likely need to be double backticks. I'll try to do that. I'll remove the change from idlelib and add a test the alias works. |
@@ -965,12 +965,12 @@ form. | |||
Clear the regular expression cache. | |||
|
|||
|
|||
.. exception:: error(msg, pattern=None, pos=None) | |||
.. exception:: ReCompileError(msg, pattern=None, pos=None) |
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.
We need an explicit index reference for error
.
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 would I add and explicit index reference ? .. error:
on top ?
Misc/NEWS.d/next/Library/2019-12-07-13-19-03.bpo-38981.kJrSbj.rst
Outdated
Show resolved
Hide resolved
I didn't expect the Spanish Inquisition |
Nobody expects the Spanish Inquisition! @terryjreedy: please review the changes made to this pull request. |
One remaining question is the final name of this exception. |
This is also a name which is pep8 compliant.
Update all the usage in the core to the new spelling.
Keep
error
alias for backward compatibilityhttps://bugs.python.org/issue38981