Skip to content

WebOb dependency: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 #264

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

Closed
perseoGI opened this issue Feb 12, 2025 · 1 comment

Comments

@perseoGI
Copy link

Feature Request

WebTest depends on WebOb>1.2, which internally uses the cgi module, deprecated in Python 3.13. Python 3.14 is now available, and this module is also not included.

We are using WebTest internally in our organization's test suite, and this issue is blocking our progress to newer Python versions.
I understand that this issue is not directly related to this project. There is an open issue at WebOb Pylons/webob#437, but it seems to be inactive.

Is your feature request related to an issue? Please describe.

Yes, when running our tests, this warning constantly appears:

webob/compat.py:5: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
    from cgi import parse_header

This simple program is not able to run in Python >= 3.13

from cgi import parse_header
parse_header('')

Image

Describe the solution you'd like

Contact WebOb organization directly as this project is a main consumer and try convincing them to fix this issue ASAP

Describe alternatives you've considered

Consider using a different backend with similar capabilities as WebOb

@gawel
Copy link
Member

gawel commented Feb 12, 2025

There is nothing to do here. Looks like you can pip install legacy-cgi to fix your problem:

https://github.com/jackrosenthal/legacy-cgi

@gawel gawel closed this as completed Feb 12, 2025
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

No branches or pull requests

2 participants