Bug 2373915 - return in finally block triggers SyntaxError with python 3.14
Summary: return in finally block triggers SyntaxError with python 3.14
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pyparsing
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/pyparsing/pyparsin...
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-06-19 18:01 UTC by Mattias Ellert
Modified: 2025-06-20 10:00 UTC (History)
8 users (show)

Fixed In Version: pyparsing-3.1.2-11.fc43
Clone Of:
Environment:
Last Closed: 2025-06-20 10:00:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources pyparsing pull-request 24 0 None None None 2025-06-19 20:59:51 UTC

Description Mattias Ellert 2025-06-19 18:01:01 UTC
The current version of pyparsing-3.1.2-10.fc43 in rawhide has a return statement in a finally block that triggers a SyntaxError with Python 3.14. E.g. in the build log for the python-metakernel package where some tests fail due to this:

  File "/usr/lib/python3.14/site-packages/pyparsing/core.py", line 5579
    return f"{type(self).__name__}: {retString}"
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'return' in a 'finally' block

This is fixed upstream since version 3.2.2. See
https://github.com/pyparsing/pyparsing/issues/578

Reproducible: Always

Steps to Reproduce:
See e.g. build failures for python-metakernel in koshei:

https://koschei.fedoraproject.org//package/python-metakernel

Comment 1 Miro Hrončok 2025-06-19 19:17:03 UTC
Note for reference: This seems to be a new problem since b3 :(


Note You need to log in before you can comment on or make changes to this bug.