IntelFsp2Pkg: Support Python 3.14 AST constants
Python 3.14 no longer dispatches ast.Constant nodes to the deprecated
visit_Num() and visit_NameConstant() methods. Replace them with
visit_Constant(). Use Constant.value instead of the removed Constant.s
alias when extracting offset() and length() variable names.
visit_Constant() accepts int, float, complex, and None. Since bool is a
subclass of int, True and False are also accepted by the isinstance()
check. Other constant values, including strings, bytes, and Ellipsis,
continue to be rejected through generic_visit().
Fixes: https://github.com/tianocore/edk2/issues/13413
Signed-off-by: Poncho Figueroa Esqueda <poncho.figueroa.esqueda@intel.com>
1 file changed