You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Patrick Bannister (Jira)" <ji...@apache.org> on 2019/09/12 17:58:00 UTC

[jira] [Commented] (CASSANDRA-10190) Python 3 support for cqlsh

    [ https://issues.apache.org/jira/browse/CASSANDRA-10190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16928785#comment-16928785 ] 

Patrick Bannister commented on CASSANDRA-10190:
-----------------------------------------------

I'm experimenting with changing the cqlshlib unit tests in {{test_cqlsh_completion}}. These are the slowest part of the cqlshlib unit test suite. They currently work by running cqlsh in a subprocess to connect to a ccm cluster, sending partial commands to the cqlsh, and reading the completions suggested by the cqlsh. This is slow, because we have to use a timeout to wait for the cqlsh to accept our input and output its recommended completions.

In general, these don't really look like unit tests, they look more like dtests. One approach would be to remove this from the unit tests and make it part of the dtests. But I'd prefer to convert them to something more like a unit test. We can make them run faster by using cqlshlib internals directly, instead of running cqlsh in a subprocess. We can call {{cql_complete}} on each partial command and assert that the completions are what we expect.

Once I've rewritten the {{test_cqlsh_completion.py}} tests like this, it'll be up on the branch for consideration.

> Python 3 support for cqlsh
> --------------------------
>
>                 Key: CASSANDRA-10190
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10190
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Legacy/Tools
>            Reporter: Andrew Pennebaker
>            Assignee: Patrick Bannister
>            Priority: Normal
>              Labels: cqlsh
>             Fix For: 4.0, 4.0-alpha
>
>         Attachments: coverage_notes.txt
>
>
> Users who operate in a Python 3 environment may have trouble launching cqlsh. Could we please update cqlsh's syntax to run in Python 3?
> As a workaround, users can setup pyenv, and cd to a directory with a .python-version containing "2.7". But it would be nice if cqlsh supported modern Python versions out of the box.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org