Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15659

Better support of Python 3 for cqlsh

    XMLWordPrintableJSON

Details

    Description

      From mailing list:

      https://lists.apache.org/thread.html/r377099b632c62b641e4feef5b738084fc5369b0c7157fae867853597%40%3Cdev.cassandra.apache.org%3E

       

      As of today (24/3/2020) and current trunk, there is Python 3.6 supported (1) but there is not any 3.6 version ootb in Debian for example. E.g. Buster has Python 3.7 and other (recent) releases have version 2.7. This means that if one wants to use Python 3 in Debian, he has to use 3.6 but it is not in the repository so he has to download / compile / install it on his own.

      There should be some sane Python 3 version supported which is as well present in Debian repository (or requirement to run with 3.6 should be relaxed) .

      (1) https://github.com/apache/cassandra/blob/bf9a1d487b9ba469e8d740cf7d1cd419535a7e79/bin/cqlsh#L57-L65

      Summary of work that was done:

      I relaxed the requirement of cqlsh only working with Python 2.7 & 3.6 by allowing Python 3.6+.
      Note that I left the constraint for Python 3.6 being the minimum Python3 version.
      As ptbannister pointed out, we could remove the Python 3.6 min version once we remove Python 2.7 support, as otherwise testing with lots of different Python versions will get costly.

      2 Dockerfiles were added in pylib for minimal local testing of cqlsh starting up with Python 3.7 & 3.8 and that both revealed
      CASSANDRA-15572 and CASSANDRA-15573.
      CASSANDRA-15572 was fixed here as it was a one-liner. And I'm going to tackle CASSANDRA-15573 later.

      Python 3.8 testing was added to the CircleCI config so that we can actually see what else breaks with newer Python versions.

      A new Docker images with Ubuntu 19.10 was required for testing (https://github.com/apache/cassandra-builds/pull/17). This docker image sets up Python 2.7/3.6/3.7/3.8 with their respective virtual environments, which are then being used by the CircleCI yaml.

      The image spod/cassandra-testing-ubuntu1810-java11-w-dependencies:20190306 couldn't be updated unfortunately because it can't be built anymore, due to Ubuntu 18.10 being EOL.

      Attachments

        Issue Links

          Activity

            People

              eduard.tudenhoefner Eduard Tudenhoefner
              stefan.miklosovic Stefan Miklosovic
              Eduard Tudenhoefner
              Michael Semb Wever
              Votes:
              0 Vote for this issue
              Watchers:
              8 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 - 1.5h
                  1.5h