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

Fix Python SyntaxWarning: "is not" with a literal. Did you mean "!="

    XMLWordPrintableJSON

Details

    Description

      With the upgrade to Python 3.8 there are SyntaxWarnings now showing up in the tests, which should be fixed.

      /home/cassandra/cassandra/cassandra-dtest/conftest.py:207: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        if len(errors) is not 0:
      /home/cassandra/cassandra/cassandra-dtest/conftest.py:240: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        if len(logs) is not 0:
      /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:393: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        while attempt < 3 and ret_val is not 0:
      /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:399: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        if ret_val is not 0:
      /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:422: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        if ret_val is not 0:
      /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:425: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        if ret_val is not 0:
      /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:124: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        if len(filtered_errors) is not 0:
      /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:152: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        if len(logs) is not 0:
      /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:286: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        if len(errors) is not 0:
      

      Attachments

        Issue Links

          Activity

            People

              eduard.tudenhoefner Eduard Tudenhoefner
              eduard.tudenhoefner Eduard Tudenhoefner
              Eduard Tudenhoefner
              Michael Semb Wever
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m