Title: 3.11.0b1 regression: re.template removed without a deprecation period · Issue #92728 · python/cpython · GitHub
Open Graph Title: 3.11.0b1 regression: re.template removed without a deprecation period · Issue #92728 · python/cpython
X Title: 3.11.0b1 regression: re.template removed without a deprecation period · Issue #92728 · python/cpython
Description: Bug report In Python 3.10, the re.template function exists and is 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('...
Open Graph Description: Bug report In Python 3.10, the re.template function exists and is not deprecated: >>> import re >>> re.template('', re.I) re.compile('', re.TEMPLATE|re.IGNORECASE) In Python 3.11.0b1 this function ...
X Description: Bug report In Python 3.10, the re.template function exists and is not deprecated: >>> import re >>> re.template('', re.I) re.compile('', re.TEMPLATE|re.IGNORECASE)...
Opengraph URL: https://github.com/python/cpython/issues/92728
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"3.11.0b1 regression: re.template removed without a deprecation period","articleBody":"\u003c!--\r\n If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not\r\n the right place to seek help. Consider the following options instead:\r\n\r\n - reading the Python tutorial: https://docs.python.org/3/tutorial/\r\n - posting in the \"Users\" category on discuss.python.org: https://discuss.python.org/c/users/7\r\n - emailing the Python-list mailing list: https://mail.python.org/mailman/listinfo/python-list\r\n - searching our issue tracker (https://github.com/python/cpython/issues) to see if\r\n your problem has already been reported\r\n--\u003e\r\n\r\n**Bug report**\r\n\r\nIn Python 3.10, the `re.template` function exists and *is not* deprecated:\r\n\r\n```pycon\r\n\u003e\u003e\u003e import re\r\n\u003e\u003e\u003e re.template('', re.I)\r\nre.compile('', re.TEMPLATE|re.IGNORECASE)\r\n```\r\n\r\nIn Python 3.11.0b1 this function is gone:\r\n\r\n```pycon\r\n\u003e\u003e\u003e import re\r\n\u003e\u003e\u003e re.template('', re.I)\r\nTraceback (most recent call last):\r\n File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\r\nAttributeError: module 're' has no attribute 'template'\r\n```\r\n\r\nThis was removed in https://github.com/python/cpython/commit/b09184bf05 without a depreciation period.\r\nDespite being undocumented, projects actually use this function, see e.g. https://github.com/rpm-software-management/dnf/pull/1827\r\n\r\nPlease 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 understand [PEP 387, section *Making Incompatible Changes*](https://peps.python.org/pep-0387/#making-incompatible-changes).)\r\n\r\n**Your environment**\r\n\r\n\u003c!-- Include as many relevant details as possible about the environment you experienced the bug in --\u003e\r\n\r\n- CPython versions tested on: 3.11.0b1\r\n- Operating system and architecture: All\r\n\r\n\u003c!--\r\nYou can freely edit this text. Remove any lines you believe are unnecessary.\r\n--\u003e\r\n","author":{"url":"https://github.com/hroncok","@type":"Person","name":"hroncok"},"datePublished":"2022-05-12T14:39:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":26},"url":"https://github.com/92728/cpython/issues/92728"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6ccf0b03-64df-95c4-cfbe-989b93d52bea |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C70C:2FE4F4:87AC61:C0CDC3:696A5A06 |
| html-safe-nonce | b8ff5735cb0e8dd078c3dae84e93ea3020b939273decd6f568c17401fbe71474 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzBDOjJGRTRGNDo4N0FDNjE6QzBDREMzOjY5NkE1QTA2IiwidmlzaXRvcl9pZCI6IjI4NzkxMjg2MDEzMzc5NDQ1ODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 056514d7cfa9051ec182a1a5e00f24bd8459840756b5b650b2e824e2626cbcbf |
| hovercard-subject-tag | issue:1234088577 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/92728/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9ff93b02882c7e31199194a7ed9888ae7cf81f7060666fb812033a2c7adac01c/python/cpython/issues/92728 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9ff93b02882c7e31199194a7ed9888ae7cf81f7060666fb812033a2c7adac01c/python/cpython/issues/92728 |
| og:image:alt | Bug report In Python 3.10, the re.template function exists and is not deprecated: >>> import re >>> re.template('', re.I) re.compile('', re.TEMPLATE|re.IGNORECASE) In Python 3.11.0b1 this function ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hroncok |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63c426b30d262aba269ef14c40e3c817b384cd61 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width