jeffwidman / cqlsh

Home of the cqlsh package on PyPI. Repackages the official Cassandra cqlsh for lighter-weight installs.
Apache License 2.0
19 stars 7 forks source link

Possible Packaging Issue When Using Python 3.11 #20

Closed JKomoroski closed 1 year ago

JKomoroski commented 1 year ago

I'm not sure if this is a packaging issue or an issue with upstream. Any thoughts?

pip install -U --user cqlsh==6.0.0b4
Requirement already satisfied: cqlsh==6.0.0b4 in /home/jkomoroski/.local/lib/python3.11/site-packages (6.0.0b4)
Requirement already satisfied: cql in /home/jkomoroski/.local/lib/python3.11/site-packages (from cqlsh==6.0.0b4) (1.4.0)
Requirement already satisfied: cassandra-driver in /home/jkomoroski/.local/lib/python3.11/site-packages (from cqlsh==6.0.0b4) (3.25.0)
Requirement already satisfied: six in /usr/lib/python3.11/site-packages (from cqlsh==6.0.0b4) (1.16.0)
Requirement already satisfied: geomet<0.3,>=0.1 in /home/jkomoroski/.local/lib/python3.11/site-packages (from cassandra-driver->cqlsh==6.0.0b4) (0.2.1.post1)
Requirement already satisfied: thrift in /home/jkomoroski/.local/lib/python3.11/site-packages (from cql->cqlsh==6.0.0b4) (0.16.0)
Requirement already satisfied: click in /usr/lib/python3.11/site-packages (from geomet<0.3,>=0.1->cassandra-driver->cqlsh==6.0.0b4) (8.1.3)

~/script_test on ☁️  (us-east-2) 
at 11:18:44 ❯ which cqlsh 
/home/jkomoroski/.local/bin/cqlsh

~/script_test on ☁️  (us-east-2) 
at 11:18:54 ❯ cqlsh --version
Traceback (most recent call last):
  File "/home/jkomoroski/.local/bin/cqlsh", line 167, in <module>
    from cqlshlib import cql3handling, cqlhandling, pylexotron, sslhandling, cqlshhandling
  File "/home/jkomoroski/.local/lib/python3.11/site-packages/cqlshlib/cql3handling.py", line 19, in <module>
    from cqlshlib.cqlhandling import CqlParsingRuleSet, Hint
  File "/home/jkomoroski/.local/lib/python3.11/site-packages/cqlshlib/cqlhandling.py", line 23, in <module>
    from cqlshlib import pylexotron, util
  File "/home/jkomoroski/.local/lib/python3.11/site-packages/cqlshlib/pylexotron.py", line 342, in <module>
    class ParsingRuleSet:
  File "/home/jkomoroski/.local/lib/python3.11/site-packages/cqlshlib/pylexotron.py", line 343, in ParsingRuleSet
    RuleSpecScanner = SaferScanner([
                      ^^^^^^^^^^^^^^
  File "/home/jkomoroski/.local/lib/python3.11/site-packages/cqlshlib/saferscanner.py", line 91, in __init__
    s = re.sre_parse.State()
        ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'
bschoening commented 1 year ago

It's upstream and has been reported as https://issues.apache.org/jira/browse/CASSANDRA-18088

JKomoroski commented 1 year ago

Thanks. I'll close this then.

EpiCanard commented 1 year ago

Hello, @jeffwidman The issue has been resolved on the Cassandra side and has been added in Cassandra 4.0.8. Can you repackage the pypi package to include the fix and support for Python 3.11 in the package ? Thanks in advance

bschoening commented 1 year ago

@EpiCanard It looks like that fix is scheduled for 4.1.1. Our last release was based upon 4.1.0, so it looks like we'll need to wait for that release.

EpiCanard commented 1 year ago

Damn ! Thank you @bschoening for the information :+1:

bschoening commented 1 year ago

@JKomoroski @EpiCanard I've cut a new release for 4.1.1 with the fix for python 3.11, could you test it and let me know if it works before I push it to pypi?

It's also available for install with pip on test.pypi at https://test.pypi.org/project/cqlsh/

EpiCanard commented 1 year ago

@bschoening Thank you ! It seems to be working well

bschoening commented 1 year ago

This has been released with 6.1.2.