You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brad Schoening (Jira)" <ji...@apache.org> on 2023/09/27 15:24:00 UTC
[jira] [Updated] (CASSANDRA-18827) Fix pytest deprecations
[ https://issues.apache.org/jira/browse/CASSANDRA-18827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brad Schoening updated CASSANDRA-18827:
---------------------------------------
Summary: Fix pytest deprecations (was: Fix pytest warnings)
> Fix pytest deprecations
> -----------------------
>
> Key: CASSANDRA-18827
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18827
> Project: Cassandra
> Issue Type: Improvement
> Components: CQL/Interpreter
> Reporter: Brad Schoening
> Priority: Normal
> Labels: low-hanging-fruit
> Fix For: 5.x
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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}
>
> Note:
> * DeprecationWarning: distutils Version in greenlets.py appears to be eventlet issue *[#763|https://github.com/eventlet/eventlet/issues/763]*
> * asyncorereactor warning appears to come from the eventlet issue [#804|https://github.com/eventlet/eventlet/issues/804]
> * 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.
> * the [eventlet|[https://github.com/eventlet/eventlet]] module asyncore requires an update to resolve distutil use and asyncore( [issue 804 )|https://github.com/eventlet/eventlet/issues/804]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org