Details
Description
Lately I see a lot in Python DTests the below warning:
DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
Example from running auditlog_test.py::TestAuditlog::test_archive_on_shutdown with trunk:
dtest.py:48 /cassandra-dtest/dtest.py:48: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. MAJOR_VERSION_4 = LooseVersion('4.0') ../../dtest/lib/python3.8/site-packages/ccmlib/common.py:773 auditlog_test.py::TestAuditlog::test_archive_on_shutdown auditlog_test.py::TestAuditlog::test_archive_on_shutdown auditlog_test.py::TestAuditlog::test_archive_on_shutdown auditlog_test.py::TestAuditlog::test_archive_on_shutdown auditlog_test.py::TestAuditlog::test_archive_on_shutdown /dtest/lib/python3.8/site-packages/ccmlib/common.py:773: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. return LooseVersion(match.group(1)) auditlog_test.py: 42 warnings /dtest/lib/python3.8/site-packages/setuptools/_distutils/version.py:346: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. other = LooseVersion(other) auditlog_test.py::TestAuditlog::test_archive_on_shutdown /cassandra-dtest/conftest.py:437: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. since = LooseVersion(since_str_or_list) auditlog_test.py::TestAuditlog::test_archive_on_shutdown auditlog_test.py::TestAuditlog::test_archive_on_shutdown auditlog_test.py::TestAuditlog::test_archive_on_shutdown auditlog_test.py::TestAuditlog::test_archive_on_shutdown auditlog_test.py::TestAuditlog::test_archive_on_shutdown auditlog_test.py::TestAuditlog::test_archive_on_shutdown auditlog_test.py::TestAuditlog::test_archive_on_shutdown /dtest/lib/python3.8/site-packages/ccmlib/common.py:481: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. version = LooseVersion(str(version)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report===
Attachments
Issue Links
- is related to
-
CASSANDRA-18827 Fix pytest deprecations in cqlsh tests
- Resolved
- links to