Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-38981: Rename re.error to re.ReCompileError for better readability.#17501

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Carreau wants to merge5 commits intopython:masterfromCarreau:re-rename

Conversation

Carreau
Copy link
Contributor

@CarreauCarreau commentedDec 7, 2019
edited by bedevere-bot
Loading

This is also a name which is pep8 compliant.
Update all the usage in the core to the new spelling.

Keeperror alias for backward compatibility

https://bugs.python.org/issue38981

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
Copy link
Member

@terryjreedyterryjreedy left a 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.

@bedevere-bot
Copy link

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 phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@terryjreedy
Copy link
Member

The test failure is this:

$ make check suspicious html SPHINXOPTS="-q -W -j4"python3 tools/rstlint.py -i tools -i ./venv -i README.rst[2] library/re.rst:973: default role used1 problem with severity 2 found.Makefile:204: recipe for target 'check' failedmake: *** [check] Error 1

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>
@Carreau
Copy link
ContributorAuthor

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.

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)

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 forerror.

Copy link
ContributorAuthor

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 ?

@Carreau
Copy link
ContributorAuthor

I didn't expect the Spanish Inquisition

@bedevere-bot
Copy link

Nobody expects the Spanish Inquisition!

@terryjreedy: please review the changes made to this pull request.

@Carreau
Copy link
ContributorAuthor

One remaining question is the final name of this exception.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka left review comments

@gpsheadgpsheadAwaiting requested review from gpshead

@terryjreedyterryjreedyAwaiting requested review from terryjreedy

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@Carreau@bedevere-bot@terryjreedy@serhiy-storchaka@the-knights-who-say-ni

[8]ページ先頭

©2009-2025 Movatter.jp