Bug 2578803

Summary: python-simpleeval fails to build with Python 3.16: DeprecationWarning: 'ast.Index' is deprecated and slated for removal in Python 3.21
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-simpleevalAssignee: Dan Horák <dan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dan, ksurma, mhroncok
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-simpleeval-1.0.8-2.fc46 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-11-20 16:59:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2567340    

Description Karolina Surma 2026-11-20 16:05:38 UTC
python-simpleeval fails to build with Python 3.16.0a2.

ERROR: test_trailing (tests.test_whitespace.TestWhitespace.test_trailing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-simpleeval-1.0.8-build/simpleeval-1.0.8/tests/base.py", line 14, in setUp
    self.s = SimpleEval()
             ~~~~~~~~~~^^
  File "/builddir/build/BUILD/python-simpleeval-1.0.8-build/simpleeval-1.0.8/simpleeval.py", line 582, in __init__
    ast.Index: self._eval_index,
    ^^^^^^^^^
  File "/usr/lib64/python3.16/ast.py", line 734, in __getattr__
    warnings._deprecated(f"ast.{attr}", remove=(3, 21))
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.16/_py_warnings.py", line 893, in _deprecated
    _wm.warn(msg, DeprecationWarning, stacklevel=stacklevel)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DeprecationWarning: 'ast.Index' is deprecated and slated for removal in Python 3.21

https://docs.python.org/3.16/whatsnew/3.16.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.16/fedora-rawhide-x86_64/11359705-python-simpleeval/

For all our attempts to build python-simpleeval with Python 3.16, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.16/package/python-simpleeval/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.16:
https://copr.fedorainfracloud.org/coprs/g/python/python3.16/

Let us know here if you have any questions.

Python 3.16 is planned to be included in Fedora 47.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.16.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Dan Horák 2026-11-20 16:43:06 UTC
I believe the easy way to resolve the issue now is to drop -Werror from https://src.fedoraproject.org/rpms/python-simpleeval/blob/rawhide/f/python-simpleeval.spec#_50.

Comment 2 Fedora Update System 2026-11-20 16:57:46 UTC
FEDORA-2026-ca30583372 (python-simpleeval-1.0.8-2.fc46) has been submitted as an update to Fedora 46.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-ca30583372

Comment 3 Fedora Update System 2026-11-20 16:59:59 UTC
FEDORA-2026-ca30583372 (python-simpleeval-1.0.8-2.fc46) has been pushed to the Fedora 46 stable repository.
If problem still persists, please make note of it in this bug report.