You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pylib/README.asc
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
== Overview
2
2
3
3
This directory contains code primarily for cqlsh. cqlsh uses cqlshlib in this directory.
4
+
Currently, cqlshlib drops support for Python 2.7. Python 3.6 and 3.7 are deprecated, making Python 3.8+ the recommended version.
4
5
5
6
== Requirements
6
-
. Python 3.8-3.11 (for cqlsh)
7
+
. Python 3.8+ (for cqlsh)
7
8
. virtualenv
8
9
. Docker (optional)
9
10
@@ -27,22 +28,18 @@ You can run tests on the python style compliance issues with:
27
28
In order to run tests in a virtual environment for cqlshlib, run cassandra-cqlsh-tests.sh in this directory. It will
28
29
automatically setup a virtualenv with the appropriate version of Python and run tests inside it.
29
30
30
-
There are Dockerfiles that can be used to test whether cqlsh works with a default, barebones
31
-
Python installation. Assuming Cassandra's source is checked out at `$CASSANDRA_DIR`. To test, first
32
-
build the Docker image containing the barebones Python installation -
31
+
To run cqlsh using publicly available Docker images to connect to Cassandra on the same host, with `$CASSANDRA_DIR` pointing to either the source or install directory where `bin/cqlsh` is located.
$ docker run -v $CASSANDRA_DIR:/code -it python:3.11-slim /code/bin/cqlsh host.docker.internal
37
36
38
-
$ docker run -v $CASSANDRA_DIR:/code -it ubuntu-lts-py3:latest /code/bin/cqlsh host.docker.internal
37
+
For Python 3.8:
39
38
40
-
If `host.docker.internal` isn't supported, then you can use `--net="host"` with `docker run`:
39
+
$ docker run -v $CASSANDRA_DIR:/code -it python:3.8-slim /code/bin/cqlsh host.docker.internal
41
40
42
-
$ docker run --net="host" -v $CASSANDRA_DIR:/code -it ubuntu-lts-py3:latest /code/bin/cqlsh
41
+
If `host.docker.internal` isn't supported, then you can use `--net="host"`:
43
42
44
-
This will try to spawn a cqlsh instance inside the Docker container running Ubuntu LTS (18.04)
45
-
with minimal Python installation. It will try to connect to the Cassandra instance running on the
46
-
Docker host at port 9042. If you have Cassandra running elsewhere, replace host.docker.internal
47
-
with the IP / hostname as usual. Please ensure that the IP / host is accessible from _within_ the
48
-
Docker container.
43
+
$ docker run --net="host" -v $CASSANDRA_DIR:/code -it python:3.11-slim /code/bin/cqlsh
44
+
45
+
This will try to spawn a cqlsh instance inside the Docker container with a minimal Python installation. It will try to connect to the Cassandra instance running on the Docker host at port 9042. If you have Cassandra running elsewhere, replace host.docker.internal with the IP / hostname as usual. Please ensure that the IP / host is accessible from _within_ the Docker container.
0 commit comments