Closed tparchambault closed 1 month ago
FC40 w/Python 3.12.2 does not exhibit the TypeError exception.
Changed line /usr/lib64/python3.13/site-packages/fapolicy_analyzer/ui/trust_file_list.py:169
to self._update_loading_status(f"Loading trust {pct}% complete...")
which addressed the issue. I don't know why this is OK in FC40/Py 3.12.2. Will do more extensive testing Monday.
There's a wrapper function, f()
to perform formatting in format.py
which works in Py 3.12.x but not in Py 3.13. We could use str.format() with locale.gettext() but will try and fix the existing code first. Py 3.13 added new typing features, and the version currently shipped in Rawhide is still in beta.
The eval()
built-n function's API and documentation for 3.13 is in a state of flux currently wrt to argument count and position:
eval(expression[, globals[, locals]])
- https://docs.python.org/3.9/library/functions.html#evaleval(expression, globals=None, locals=None)
- https://docs.python.org/3.12/library/functions.html#evaleval(source, /, globals=None, locals=None)
- https://docs.python.org/3.13/library/functions.html#evalI'd like to go w/keyword parameter passing, but have concerns about 3.9 support. Also note that if we are passing positionally (which is how we currently call eval() in master
to eval()
we have our globals/locals arguments reversed. Obviously Py <= 3.12 does not care; It was probably the addition of a new positional arg in 3.13 that broke things.
Both reversing the order of the globals/locals namespace arguments and also using globals
and locals
keyword parameter passing addressed the TypeError
exception observed on FC41/Rawhide. Tested on FC40 and no issues observed.
Checking the python version and calling eval with appropriate args may allow you to support both.
I only tested this from the repl:
if (3, 13) > sys.version_info:
use old eval
else:
use new eval
Executing in double verbose mode (-vv aka DEBUG), the following log messaging and the final exception were captured after attempting to see the
Trust
page:Note: FC41/Rawhide is shipping Python 3.13.