Details

    Description

      Python 3.8 renamed sre_parse.Pattern to sre_parse.State (see https://bugs.python.org/issue34681 and corresponding pull request https://github.com/python/cpython/pull/9310)

      So when executing cqlsh with Python 3.8, it throws error:

      Traceback (most recent call last):
        File ".\bin\cqlsh.py", line 175, in <module>
          from cqlshlib import cql3handling, cqlhandling, pylexotron, sslhandling, cqlshhandling
        File "C:\Users\Yuki Morishita\Projects\cassandra\bin\..\pylib\cqlshlib\cql3handling.py", line 19, in <module>
          from cqlshlib.cqlhandling import CqlParsingRuleSet, Hint
        File "C:\Users\Yuki Morishita\Projects\cassandra\bin\..\pylib\cqlshlib\cqlhandling.py", line 23, in <module>
          from cqlshlib import pylexotron, util
        File "C:\Users\Yuki Morishita\Projects\cassandra\bin\..\pylib\cqlshlib\pylexotron.py", line 342, in <module>
          class ParsingRuleSet:
        File "C:\Users\Yuki Morishita\Projects\cassandra\bin\..\pylib\cqlshlib\pylexotron.py", line 343, in ParsingRuleSet
          RuleSpecScanner = SaferScanner([
        File "C:\Users\Yuki Morishita\Projects\cassandra\bin\..\pylib\cqlshlib\saferscanner.py", line 74, in __init__
          s = re.sre_parse.Pattern()
      AttributeError: module 'sre_parse' has no attribute 'Pattern'
      

      Summary of Work that was done

      Added a Python 3.8 compatible SaferScanner implementation (diff here). Note that the changes from CASSANDRA-15659 are required in order to verify that the issue is fixed.

      Attachments

        Issue Links

          Activity

            People

              eduard.tudenhoefner Eduard Tudenhoefner
              yukim Yuki Morishita
              Eduard Tudenhoefner
              Dinesh Joshi, Michael Semb Wever
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 0.5h
                  0.5h