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

Python warning in tests (will fail will Python 3.13) #1327

Closed
kitterma opened this issue Aug 9, 2024 · 1 comment
Closed

Python warning in tests (will fail will Python 3.13) #1327

kitterma opened this issue Aug 9, 2024 · 1 comment

Comments

@kitterma
Copy link

kitterma commented Aug 9, 2024

Describe the bug

freshclam_test.py uses deprecated cgi module.

How to reproduce the problem

Run the test with Python 3.12. This is a warning now, but it'll fail with Python 3.12.

Attachments

5: =============================== warnings summary ===============================
5: freshclam_test.py:20
5: /<>/unit_tests/freshclam_test.py:20: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
5: import cgi
5:
5: -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
5: ================== 10 passed, 1 skipped, 1 warning in 20.76s ===================

@micahsnyder
Copy link
Contributor

Thanks for the report @kitterma. Strangely, it seems we're not even referencing cgi (or subprocess, sys, or time) from freshclam_test.py. I suspect that they are vestigial / dead code from initial implementation work.

micahsnyder added a commit to micahsnyder/clamav-micah that referenced this issue Aug 28, 2024
The 'cgi' module is deprecrated and will be removed in Python 3.13.
We weren't using it anyways.

Fixes: Cisco-Talos#1327
micahsnyder added a commit to micahsnyder/clamav-micah that referenced this issue Aug 28, 2024
The 'cgi' module is deprecrated and will be removed in Python 3.13.
We weren't using it anyways.

Fixes: Cisco-Talos#1327
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