Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-18321

distutils Version classes are deprecated. Use packaging.version instead.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Low
    • Resolution: Unresolved
    • 5.x
    • CI
    • None
    • Quality Assurance
    • Normal
    • All
    • None
    • Hide

      When running of each files, compared output of my changed files to original files and no deprecated messages were shown. Tested files with Cassandra Version 4.1.5. 

      Show
      When running of each files, compared output of my changed files to original files and no deprecated messages were shown. Tested files with Cassandra Version 4.1.5. 

    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

          Activity

            People

              dhanush.ananthkar Dhanush Ananthkar
              e.dimitrova Ekaterina Dimitrova
              Dhanush Ananthkar
              Michael Semb Wever
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: