Brad Schoening created CASSANDRA-18827:
------------------------------------------

             Summary: Fix pytest warnings
                 Key: CASSANDRA-18827
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18827
             Project: Cassandra
          Issue Type: Improvement
            Reporter: Brad Schoening


Pytest reports several warnings regarding deprecated packages or methods:

 
{noformat}
 
../../../../../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(
{noformat}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to