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

gh-105687: Remove deprecated objects fromre module#105688

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

Merged
vstinner merged 3 commits intopython:mainfromsobolevn:issue-105687
Jun 14, 2023

Conversation

sobolevn
Copy link
Member

@sobolevnsobolevn commentedJun 12, 2023
edited by github-actionsbot
Loading

@sobolevnsobolevn requested a review fromvstinnerJune 12, 2023 12:24
@vstinner
Copy link
Member

I already proposed to remove these APIs directly, without deprecation period. But@serhiy-storchaka wanted to collect feedback of users with a deprecation period. So far, I am not aware of any feedback.

This feature can be reimplemented outside Python stdlib if needed, no?

* Remove deprecated ``re.template`` function
and ``re.T`` and ``re.TEMPLATE`` flags.
Also removes ``SRE_FLAG_TEMPLATE`` constant
from ``sre_constants`` and ``re._constants``.
Copy link
Member

Choose a reason for hiding this comment

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

Please explain how to update existing code. I suppose that replacing re.template() with re.compile() works in most cases, no?

Please mention also that the flag never worked, see the previous removal commit.

Choose a reason for hiding this comment

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

I think that these who use it should find how to replace it themselves. It cannot just be replaced withre.compile(), otherwise they would usere.compile() at first place. Perhaps.

and ``re.T`` and ``re.TEMPLATE`` flags.
Also removes ``SRE_FLAG_TEMPLATE`` constant
from ``sre_constants`` and ``re._constants``.
(Contributed by Nikita Sobolev in :gh:`105687`.)
Copy link
Member

Choose a reason for hiding this comment

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

You might want to credit Serhiy who attempted first to remove it.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Of course!

Copy link
MemberAuthor

@sobolevnsobolevnJun 13, 2023
edited
Loading

Choose a reason for hiding this comment

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

I added Serhiy as the first name in the name tuple 👍

@vstinner
Copy link
Member

cc@hugovk

hugovk reacted with thumbs up emoji

* Remove deprecated ``re.template`` function
and ``re.T`` and ``re.TEMPLATE`` flags.
Also removes ``SRE_FLAG_TEMPLATE`` constant
from ``sre_constants`` and ``re._constants``.

Choose a reason for hiding this comment

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

I think that these who use it should find how to replace it themselves. It cannot just be replaced withre.compile(), otherwise they would usere.compile() at first place. Perhaps.

@serhiy-storchaka
Copy link
Member

I already proposed to remove these APIs directly, without deprecation period. But@serhiy-storchaka wanted to collect feedback of users with a deprecation period.

Actually, I initially removed it without deprecation, because it clearly looked to me as unfinished in process of initial implementation and later broken feature.

My best guess is that it was purposed to make all quntifiers possessive. But initial implementation of atomic groups and possessive quantifiers was broken. Now we have working implementation, and can enable that feature. To disable backtracking it would need also wrap every alternation into atomic group. We can do this now if it was initial purpose, but I have no idea why somebody would need such feature.

sobolevn reacted with thumbs up emoji

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the enhanced doc.

sobolevn reacted with thumbs up emoji
@vstinnervstinner merged commit67f69db intopython:mainJun 14, 2023
@vstinner
Copy link
Member

Merged, thanks.

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

@vstinnervstinnervstinner approved these changes

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@sobolevn@vstinner@serhiy-storchaka@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp