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

Ignore cgi deprecation warning on CI #17758

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

perseoGI
Copy link
Contributor

@perseoGI perseoGI commented Feb 12, 2025

Changelog: omit
Docs: omit

From #17736,

Fix the WebOb warning, might need to update the test-dependency WebTest

Until Pylons/webob#437 is resolved, the best approach is to use the legacy-cgi package, which will allow Conan to run in Python environments greater than 3.12.

Edit

Recent versions of WebOb uses legacy-cgi as a substitute of cgi deprecated module since python 3.13.
This means it is safe to ignore the pytest warning complaining about cgi deprecation.

Also, updated python versions used in linux-tests.yml.

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

@perseoGI perseoGI requested a review from memsharded February 12, 2025 10:01
@defnull
Copy link

defnull commented Feb 12, 2025

Recent versions of webob already pull legacy-cgi as a dependency, and WebTest does not seem to restrict webob from beeing upgraded. This should not be necessary. (Not tested, just wondering why this is an issue here)

@memsharded
Copy link
Member

Recent versions of webob already pull legacy-cgi as a dependency, and WebTest does not seem to restrict webob from beeing upgraded. This should not be necessary. (Not tested, just wondering why this is an issue here)

this is weird then, we don't have WebTest constrained (WebTest>=3.0.0, <4, and latest is 3.0.4), but we are still getting the warnings of webob in CI

@perseoGI
Copy link
Contributor Author

Absolutely right, @defnull. I wasn't aware of this:

$ uv pip install webtest                                                                                                  
Resolved 7 packages in 189 ms
Installed 3 packages in 6 ms
 + legacy-cgi==2.6.2
 + webob==1.8.9
 + webtest==3.0.4

I have just added a pytest filter to avoid receiving the warning. @memsharded I believe that we willll always receive complaints about cgi usage if using Python versions earlier than 3.13, even with legacy-cgi installed. It's important to note that having the module installed doesn't guarantee that pytest won't detect this import.

@perseoGI perseoGI changed the title Added legacy-cgi dev dependency Ignore cgi deprecation warning on CI Feb 12, 2025
@perseoGI perseoGI marked this pull request as ready for review February 12, 2025 14:37
@memsharded memsharded merged commit 1ee3f74 into conan-io:develop2 Feb 12, 2025
34 checks passed
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.

3 participants