Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
Quality Assurance
-
Low Hanging Fruit
-
All
-
None
-
Description
Pytest reports several warnings regarding deprecated packages or methods:
../../../../../usr/local/lib/python3.10/site-packages/eventlet/support/greenlets.py:6 /usr/local/lib/python3.10/site-packages/eventlet/support/greenlets.py:6: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. preserves_excinfo = (distutils.version.LooseVersion(greenlet.__version__) ../../../../../usr/local/lib/python3.10/site-packages/eventlet/support/greenlets.py:7 /usr/local/lib/python3.10/site-packages/eventlet/support/greenlets.py:7: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. >= distutils.version.LooseVersion('0.3.2')) ../../../../../usr/local/lib/python3.10/site-packages/cassandra/io/asyncorereactor.py:34 /usr/local/lib/python3.10/site-packages/cassandra/io/asyncorereactor.py:34: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio import asyncore cqlshlib/test/test_copyutil.py: 42 warnings /Users/brad/Cassandra/cassandra/pylib/cqlshlib/copyutil.py:147: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead feeding_thread.setDaemon(True) cqlshlib/test/test_cqlsh_completion.py::testrun_cqlsh /usr/local/lib/python3.10/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but cqlshlib/test/test_cqlsh_completion.py::testrun_cqlsh returned <contextlib.closing object at 0x126dbc460>, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? warnings.warn( cqlshlib/test/test_cqlsh_output.py::testcall_cqlsh /usr/local/lib/python3.10/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but cqlshlib/test/test_cqlsh_output.py::testcall_cqlsh returned ('\nNotice: Credentials in the cqlshrc file is deprecated and will be ignored in the future.\nPlease use a credentials file to specify the username and password.\n\nWARNING: cqlsh was built against 5.1, but this server is 4.1.. All features may not work!\n', 0), which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? warnings.warn( cqlshlib/test/test_cqlsh_output.py::testrun_cqlsh /usr/local/lib/python3.10/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but cqlshlib/test/test_cqlsh_output.py::testrun_cqlsh returned <contextlib.closing object at 0x12710c520>, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? warnings.warn( cqlshlib/test/test_unicode.py::testrun_cqlsh /usr/local/lib/python3.10/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but cqlshlib/test/test_unicode.py::testrun_cqlsh returned <contextlib.closing object at 0x126c93700>, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? warnings.warn(
Resolution:
- distutils Version class is used in cassandra-cql-tests.sh and was introduced in Cassandra [3.11.4 title|https://github.com/apache/cassandra/blob/cassandra-3.11.4/pylib/cassandra-cqlsh-tests.sh.] It appears to be checking that the version used by ccm is > 3.8 to enable cdc. Thus the code block can be dropped now in > 4.x.
- Renamed testrun_cqlsh() to cqlsh_testrun() to avoid being picked up as a pytest
Out of scope:
Attachments
Issue Links
- relates to
-
CASSANDRA-18321 distutils Version classes are deprecated. Use packaging.version instead.
- Patch Available
- links to