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

Drop unused/deprecated dependency on `cql` package #4

Closed bschoening closed 2 years ago

bschoening commented 2 years ago

I noticed the dependencies in setup.py include both 'cql' and 'cassandra-driver'. Probably only the later is needed.

The cql package (https://pypi.org/project/cql/1.4.0) is deprecated on their own project page at cassndra-dbapi2 and doesn't work with python 3:

https://code.google.com/archive/a/apache-extras.org/p/cassandra-dbapi2
Python DB-API 2.0 client interface for Cassandra [DEPRECATED]

A DB-API 2.0 compliant client library for Cassandra/CQL

This driver has been deprecated. Please use python-driver https://github.com/datastax/python-driver instead.
jeffwidman commented 2 years ago

Hmm, good question.

I think this is included because of https://github.com/apache/cassandra/blob/cassandra-4.0.0/pylib/requirements.txt

Is it not actually used in the non-test code anymore? Please confirm that it's only used in the cqlsh test code before we remove here... And honestly, it may not be used even in tests anymore, in which case it'd be nice to submit a PR upstream against Cassandra itself to drop this requirement... then it'd be super clear that we should drop it here.

bschoening commented 2 years ago

Good point, I've created a Jira https://issues.apache.org/jira/browse/CASSANDRA-17247 for this.

If you grep for 'import' you'll observe they aren't used.

jeffwidman commented 2 years ago

Two things:

  1. Thanks for opening the JIRA. I saw you attached a patch to the JIRA. In the past when I've opened JIRA's against the Cassandra project, I've also opened PR's against their github repo: https://github.com/apache/cassandra. That seemed to make it easier for them to merge, as I could simply nudge the PR's every so often to get visibility, plus it was easy for them to leave review comments compared to managing a patch attachment. So you might get more traction that route.
  2. Given that the JIRA is open plus this import isn't used in the portion of the code that we ship, I agree we should drop that dep from there. That'd make life simpler for anyone doing pip install cqlsh as one less dep for them. Would you be interested in opening a PR for that?
jeffwidman commented 2 years ago

Also FYI @bschoening if you use backticks(`) rather than single quotes(''), github markdown will format the enclosed section as code. Example: 'cqlsh' vscqlsh`

jeffwidman commented 2 years ago

Fixed by #10