nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
10.1k stars 1.32k forks source link

Cheetah version is using deprecated `cgi` package, removed in Python3.13 #2973

Open thomas-bc opened 1 month ago

thomas-bc commented 1 month ago
F´ Version
Affected Component

Problem Description

See https://github.com/nasa/fprime/actions/runs/11395186564/job/31838364025

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/Current/bin/cheetah-compile", line 2, in <module>
    from Cheetah.CheetahWrapper import _cheetah_compile
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/Cheetah/CheetahWrapper.py", line 17, in <module>
    from Cheetah.Template import Template
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/Cheetah/Template.py", line 24, in <module>
    import cgi  # Used by .webInput() if the template is a CGI script.
    ^^^^^^^^^^
ModuleNotFoundError: No module named 'cgi'

Python3.13 release notes (ctrl+f cgi) https://docs.python.org/3/whatsnew/3.13.html

Fixed in Cheetah version: https://cheetahtemplate.org/news.html#id1

Need to upgrade our requirements.txt

LeStarch commented 1 month ago

This is a problem with an underlying dependency (Cheetah3/CT3). There does not seem to be a fix for that dependency at this time.

Current work-around: revert to Python3.12 or below. Desired fix: remove XML code generate and Cheetah depenency