GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-105687: Remove deprecated objects from `re` module by sobolevn · Pull Request #105688 · python/cpython Conversation
|
|
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? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| * Remove deprecated ``re.template`` function | ||
| and ``re.T`` and ``re.TEMPLATE`` flags. | ||
| Also removes ``SRE_FLAG_TEMPLATE`` constant | ||
| from ``sre_constants`` and ``re._constants``. |
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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 with re.compile(), otherwise they would use re.compile() at first place. Perhaps.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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`.) |
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Of course!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem 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 👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
cc @hugovk |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| * Remove deprecated ``re.template`` function | ||
| and ``re.T`` and ``re.TEMPLATE`` flags. | ||
| Also removes ``SRE_FLAG_TEMPLATE`` constant | ||
| from ``sre_constants`` and ``re._constants``. |
There was a problem 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 with re.compile(), otherwise they would use re.compile() at first place. Perhaps.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the enhanced doc.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Merged, thanks. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.