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

cqlsh tests broken in Python 3.7+

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.0-beta2, 4.0
    • Tool/cqlsh
    • None
    • Code
    • Low
    • Low Hanging Fruit
    • Unit Test
    • All
    • None
    • Hide

      repro/validation:

      • activate python 3.7+
      • cd pylib/cqlshlib; nosetests
        <confirm attribute error>
      • apply patch
      • run tests again, expecting success
      • activate python 3.6 and/or 2.7 and verify

      No docs required.

      Show
      repro/validation: activate python 3.7+ cd pylib/cqlshlib; nosetests <confirm attribute error> apply patch run tests again, expecting success activate python 3.6 and/or 2.7 and verify No docs required.

    Description

      // cassandra/pylib/cqlshlib/test/run_cqlsh.py", line 221, in read_until
          if not isinstance(until, re._pattern_type):
      AttributeError: module 're' has no attribute '_pattern_type'
      

      An internal module attribute was changed/removed from Python 3.7 on.

      https://github.com/python/cpython/pull/1646/files#diff-daea55f2fca784d9a64ca8f190403904R267-L272

      This breakage did not manifest in CI because the test use the Jenkins host system Python, which is 3.6.

      I have a trivial patch I'll add shortly.

      Attachments

        Activity

          People

            aholmber Adam Holmberg
            aholmber Adam Holmberg
            Adam Holmberg
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            1 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 - 10m
                10m