Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround cgi removal in Python3.13 #765

Open
wants to merge 3 commits into
base: ete3
Choose a base branch
from

Conversation

mmore500
Copy link

@mmore500 mmore500 commented Dec 29, 2024

Currently, importing ete3 in Python3.13 fails due to the standard library cgi module having been removed.

Python 3.13.1 (main, Dec  9 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ete3
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import ete3
  File "/home/mmore500/.local/lib/python3.13/site-packages/ete3/__init__.py", line 56, in <module>
    from .webplugin.webapp import *
  File "/home/mmore500/.local/lib/python3.13/site-packages/ete3/webplugin/webapp.py", line 44, in <module>
    import cgi
ModuleNotFoundError: No module named 'cgi'

As a temporary solution, this pull request patches ete3/__init__.py to catch the generated ModuleNotFoundError and warn the user that webapp support is not available in Python3.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant