Skip to content

Commit fa85a05

Browse files
committed
Merge branch 'cassandra-5.0' into trunk
2 parents 73cd1d6 + b5b1c52 commit fa85a05

File tree

4 files changed

+11
-58
lines changed

4 files changed

+11
-58
lines changed

pylib/Dockerfile.ubuntu.py3

Lines changed: 0 additions & 18 deletions
This file was deleted.

pylib/Dockerfile.ubuntu.py311

Lines changed: 0 additions & 13 deletions
This file was deleted.

pylib/Dockerfile.ubuntu.py38

Lines changed: 0 additions & 13 deletions
This file was deleted.

pylib/README.asc

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
== Overview
22

33
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.
45

56
== Requirements
6-
. Python 3.8-3.11 (for cqlsh)
7+
. Python 3.8+ (for cqlsh)
78
. virtualenv
89
. Docker (optional)
910

@@ -27,22 +28,18 @@ You can run tests on the python style compliance issues with:
2728
In order to run tests in a virtual environment for cqlshlib, run cassandra-cqlsh-tests.sh in this directory. It will
2829
automatically setup a virtualenv with the appropriate version of Python and run tests inside it.
2930

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.
3332

34-
$ docker build . --file Dockerfile.ubuntu.py3 -t ubuntu-lts-py3
33+
For Python 3.11:
3534

36-
Next, run cqlsh inside the newly built image -
35+
$ docker run -v $CASSANDRA_DIR:/code -it python:3.11-slim /code/bin/cqlsh host.docker.internal
3736

38-
$ docker run -v $CASSANDRA_DIR:/code -it ubuntu-lts-py3:latest /code/bin/cqlsh host.docker.internal
37+
For Python 3.8:
3938

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
4140

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"`:
4342

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

Comments
 (0)