[ https://issues.apache.org/jira/browse/CASSANDRA-17242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470827#comment-17470827 ]
Brad Schoening edited comment on CASSANDRA-17242 at 1/7/22, 11:00 PM: ---------------------------------------------------------------------- Thanks for your quick reply. The code in cqlsy.py states it supports python 2.7 AND python 3.x. Python 2.7 its deprecated, but still supported, unless I'm misreading it. if sys.version_info < (3, 6) and sys.version_info[0:2] != (2, 7): [ |https://gitbox.apache.org/repos/asf?p=cassandra.git;a=blob;f=bin/cqlsh.py;h=aa005ce95233415a8e4a3d99fb27ebe170da0b26;hb=HEAD#l40] sys.exit("\ncqlsh requires Python 3.6+ or Python 2.7 (deprecated)\n") and the cqlshlib code imports 'six' for cross-compatibility instead of using native python 3.x constructs. If the intention is to no longer support python 2.7, the above should be simply changed to exit if sys.version_info is less than 3.6 if sys.version_info < (3, 6): [ |https://gitbox.apache.org/repos/asf?p=cassandra.git;a=blob;f=bin/cqlsh.py;h=aa005ce95233415a8e4a3d99fb27ebe170da0b26;hb=HEAD#l40] sys.exit("\ncqlsh requires Python 3.6+\n") was (Author: bschoeni): Thanks for your quick reply. The code in cqlsy.py states it supports python 2.7 AND python 3.x, but 2.7 its deprecated, unless I'm misreading it. if sys.version_info < (3, 6) and sys.version_info[0:2] != (2, 7): [ |https://gitbox.apache.org/repos/asf?p=cassandra.git;a=blob;f=bin/cqlsh.py;h=aa005ce95233415a8e4a3d99fb27ebe170da0b26;hb=HEAD#l40] sys.exit("\ncqlsh requires Python 3.6+ or Python 2.7 (deprecated)\n") and the cqlshlib code imports 'six' for cross-compatibility instead of using native python 3.x constructs. If the intention is to no longer support python 2.7, the above should be simply changed to exit if sys.version_info is less than 3.6 if sys.version_info < (3, 6): [ |https://gitbox.apache.org/repos/asf?p=cassandra.git;a=blob;f=bin/cqlsh.py;h=aa005ce95233415a8e4a3d99fb27ebe170da0b26;hb=HEAD#l40] sys.exit("\ncqlsh requires Python 3.6+\n") > Remove Python 2.x support from CQLSH > ------------------------------------ > > Key: CASSANDRA-17242 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17242 > Project: Cassandra > Issue Type: Task > Components: CQL/Interpreter > Reporter: Brad Schoening > Priority: Normal > Fix For: 4.0.x, 4.x > > > Python 2 has now reached EOL and should be removed from CQLSH and other > Cassandra components. > "We are volunteers who make and take care of the Python programming language. > We have decided that January 1, 2020, was the day that we sunset Python 2. > That means that we will not improve it anymore after that day, even if > someone finds a security problem in it. You should upgrade to Python 3 as > soon as you can. > And if many people keep using Python 2, then that makes it hard for [the > volunteers who use Python to make > software|https://python3statement.org/#sections50-why]. They can't use the > good new things in Python 3 to improve the tools they make. > As of January 1st, 2020 no new bug reports, fixes, or changes will be made to > Python 2, and Python 2 is no longer supported. > " > [https://www.python.org/doc/sunset-python-2/] > > > > -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org