Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Closed
Description
Bug report
In Python 3.10, there.template
function exists andis not deprecated:
>>>import re>>> re.template('', re.I)re.compile('', re.TEMPLATE|re.IGNORECASE)
In Python 3.11.0b1 this function is gone:
>>>import re>>> re.template('', re.I)Traceback (most recent call last): File "<stdin>", line 1, in <module>AttributeError: module 're' has no attribute 'template'
This was removed inb09184bf05 without a depreciation period.
Despite being undocumented, projects actually use this function, see e.g.rpm-software-management/dnf#1827
Please restore this function and deprecate it in 3.11 and 3.12 if you want to remove it in 3.13. (That is how I understandPEP 387, sectionMaking Incompatible Changes.)
Your environment
- CPython versions tested on: 3.11.0b1
- Operating system and architecture: All