Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net
https://www.clamav.net/
GNU General Public License v2.0
4.48k stars 708 forks source link

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

Closed kitterma closed 3 months ago

kitterma commented 3 months ago

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 commented 3 months ago

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.