Fedora Account System
Red Hat Associate
Red Hat Customer
re.TEMPLATE was removed in Python 3.13: https://github.com/python/cpython/issues/92728 Unfortunately, IPython only stopped relying on it very recently: commit f7a09f5f5fe52740825acf5a72a427922eb48dbe (Oct 24 2024). The oldest IPython version with the fix is 8.29.0, but Fedora is shipping 8.26.0. The bug causes an exception to be thrown when the IPython repr() of a regular expression is generated. pip install ipython==8.29.0 works around this issue. Reproducible: Always Steps to Reproduce: 1. Launch ipython. 2. import re 3. re.compile('foo') Actual Results: File /usr/lib/python3.13/site-packages/IPython/lib/pretty.py:729, in _ReFlags._repr_pretty_(self, p, cycle) 726 done_one = False 727 for flag in ('TEMPLATE', 'IGNORECASE', 'LOCALE', 'MULTILINE', 'DOTALL', 728 'UNICODE', 'VERBOSE', 'DEBUG'): --> 729 if self.value & getattr(re, flag): 730 if done_one: 731 p.text('|') AttributeError: module 're' has no attribute 'TEMPLATE' Expected Results: Out[2]: re.compile(r'foo', re.UNICODE)
I can reproduce this.
FEDORA-2025-dc0074871f (ipython-8.26.0-3.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2025-dc0074871f
FEDORA-2025-dc0074871f has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-dc0074871f` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-dc0074871f See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-dc0074871f (ipython-8.26.0-3.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.