This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Remove re.template() and re.TEMPLATE
Type: enhancement Stage: resolved
Components: Library (Lib), Regular Expressions Versions: Python 3.11
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, malin, mrabarnett, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2022-04-04 08:56 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 32300 merged serhiy.storchaka, 2022-04-04 09:01
Messages (2)
msg416658 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-04-04 08:56
They were added in 436c3d58a2570f3b599e59b4071f944f774ec441 (between 1.6a2 and 2.0), but the purpose is not known. See also The feature was not fully implemented, and it was disabled short time later in 29c4ba9ada44d62988c62c85c8046985f10a1c85. Currently the only effect of this flag is that repetition operators (+, *, ?, {}) do not work. A comment was added in 3562f1176403653ebfbef6275d449ad42d1b843a:

SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking)

It's all. I guess it could have some relation to possessive repetition operators, except that it is a global flag.

I think it should be removed without deprecation because it never really worked and never was documented.
msg416884 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-04-06 16:54
New changeset b09184bf05b07b77c5ecfedd4daa846be3cbf0a9 by Serhiy Storchaka in branch 'main':
bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)
Date User Action Args
2022-04-11 14:59:58adminsetgithub: 91367
2022-04-06 17:04:13serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-04-06 16:54:27serhiy.storchakasetmessages: + msg416884
2022-04-06 07:14:17malinsetnosy: + malin
2022-04-04 09:01:32serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request30362
2022-04-04 08:56:13serhiy.storchakacreate