fix several deprecation warnings
adding -Werror flag to pytest configuration so we can flush all of those with the test we have so we won't have user of the driver running into those and get them fixed address as soon as we support new python versions
pending on #344
warning happening during integration test runs:
2024-11-06T11:33:09.8086834Z FAILED tests/integration/standard/test_cluster.py::ClusterTests::test_profile_load_balancing - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8087782Z FAILED tests/integration/standard/test_cluster.py::ClusterTests::test_refresh_schema_type - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8088773Z FAILED tests/integration/standard/test_cluster.py::ContextManagementTest::test_cluster_no_session - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8089747Z FAILED tests/integration/standard/test_cluster.py::ContextManagementTest::test_session_no_cluster - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8090698Z FAILED tests/integration/standard/test_cluster.py::ContextManagementTest::test_simple_nested - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8092259Z FAILED tests/integration/standard/test_cluster.py::DeprecationWarningTest::test_deprecation_warning_default_consistency_level - DeprecationWarning: Setting the consistency level at the session level will be removed in 4.0. Consider using execution profiles and setting the desired consistency level to the EXEC_PROFILE_DEFAULT profile.
2024-11-06T11:33:09.8093273Z FAILED tests/integration/standard/test_cluster.py::DeprecationWarningTest::test_deprecation_warnings_legacy_parameters - DeprecationWarning: Legacy execution parameters will be removed in 4.0. Consider using execution profiles.
2024-11-06T11:33:09.8094562Z FAILED tests/integration/standard/test_cluster.py::DeprecationWarningTest::test_deprecation_warnings_meta_refreshed - DeprecationWarning: Cluster.set_meta_refresh_enabled is deprecated and will be removed in 4.0. Set Cluster.schema_metadata_enabled and Cluster.token_metadata_enabled instead.
2024-11-06T11:33:09.8095229Z FAILED tests/integration/standard/test_metadata.py::MetaDataRemovalTest::test_bad_contact_point - DeprecationWarning: Please use assertNotEqual instead.
2024-11-06T11:33:09.8096385Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_basic_table_meta_properties - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8097480Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_cluster_column_ordering_reversed_metadata - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8098443Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_compact_storage - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8099531Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_composite_in_compound_primary_key - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8100606Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_composite_in_compound_primary_key_compact - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8101671Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_composite_in_compound_primary_key_ordering - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8102649Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_composite_primary_key - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8103669Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_composite_primary_key_compact - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8104643Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_compound_primary_keys - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8105650Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_compound_primary_keys_compact - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8106683Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_compound_primary_keys_more_columns - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8107756Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_compound_primary_keys_more_columns_compact - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8108885Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_compound_primary_keys_more_columns_ordering - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8109908Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_compound_primary_keys_ordering - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8111162Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_compound_primary_keys_protected - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8112156Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_compression_disabled - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8113256Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_counter - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8114297Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_counter_with_compact_storage - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8115340Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_counter_with_dense_compact_storage - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8116388Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_dense_compact_storage - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8117373Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_metadata_pagination - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8118390Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_metadata_pagination_keyspaces - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8119394Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_non_size_tiered_compaction - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8120391Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_refresh_keyspace_metadata - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8121378Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_refresh_metadata_for_mv - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8122366Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_refresh_table_metadata - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8123369Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_refresh_user_type_metadata - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8124401Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_refresh_user_type_metadata_proto_2 - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8125469Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_schema_metadata_disable - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8126441Z FAILED tests/integration/standard/test_metadata.py::SchemaMetadataTests::test_table_extensions - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8127545Z FAILED tests/integration/standard/test_metadata.py::MaterializedViewMetadataTestComplex::test_base_table_column_addition_mv - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8128675Z FAILED tests/integration/standard/test_metadata.py::MaterializedViewMetadataTestComplex::test_create_view_metadata - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8129844Z FAILED tests/integration/standard/test_metadata.py::MaterializedViewMetadataTestComplex::test_metadata_with_quoted_identifiers - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8130806Z FAILED tests/integration/standard/test_policies.py::ExponentialRetryPolicyTests::test_exponential_retries - DeprecationWarning: Legacy execution parameters will be removed in 4.0. Consider using execution profiles.
2024-11-06T11:33:09.8131862Z FAILED tests/integration/standard/test_query.py::PreparedStatementMetdataTest::test_prepared_metadata_generation - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8132930Z FAILED tests/integration/standard/test_query.py::PreparedStatementArgTest::test_prepare_batch_statement - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8133908Z FAILED tests/integration/standard/test_query.py::SerialConsistencyTests::test_conditional_update - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8134974Z FAILED tests/integration/standard/test_query.py::SerialConsistencyTests::test_conditional_update_with_batch_statements - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8136048Z FAILED tests/integration/standard/test_query.py::SerialConsistencyTests::test_conditional_update_with_prepared_statements - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8136951Z FAILED tests/integration/standard/test_routing.py::RoutingTests::test_composite - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8137862Z FAILED tests/integration/standard/test_routing.py::RoutingTests::test_singular_key - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8138884Z FAILED tests/integration/cqlengine/columns/test_container_columns.py::TestListColumn::test_partial_updates - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8140010Z FAILED tests/integration/cqlengine/columns/test_counter_column.py::TestCounterColumn::test_concurrent_updates - DeprecationWarning: 'create' and 'save' actions on Counters are deprecated. It will be disallowed in 4.0. Use the 'update' mechanism instead.
2024-11-06T11:33:09.8141211Z FAILED tests/integration/cqlengine/columns/test_counter_column.py::TestCounterColumn::test_save_after_no_update - DeprecationWarning: 'create' and 'save' actions on Counters are deprecated. It will be disallowed in 4.0. Use the 'update' mechanism instead.
2024-11-06T11:33:09.8142318Z FAILED tests/integration/cqlengine/columns/test_counter_column.py::TestCounterColumn::test_update_from_none - DeprecationWarning: 'create' and 'save' actions on Counters are deprecated. It will be disallowed in 4.0. Use the 'update' mechanism instead.
2024-11-06T11:33:09.8143390Z FAILED tests/integration/cqlengine/columns/test_counter_column.py::TestCounterColumn::test_updates - DeprecationWarning: 'create' and 'save' actions on Counters are deprecated. It will be disallowed in 4.0. Use the 'update' mechanism instead.
2024-11-06T11:33:09.8144491Z FAILED tests/integration/cqlengine/connections/test_connection.py::ConnectionInitTest::test_connection_from_session_with_legacy_settings - DeprecationWarning: Legacy execution parameters will be removed in 4.0. Consider using execution profiles.
2024-11-06T11:33:09.8146115Z FAILED tests/integration/cqlengine/connections/test_connection.py::ConnectionInitTest::test_connection_with_legacy_settings - DeprecationWarning: Setting the consistency level at the session level will be removed in 4.0. Consider using execution profiles and setting the desired consistency level to the EXEC_PROFILE_DEFAULT profile.
2024-11-06T11:33:09.8147560Z FAILED tests/integration/cqlengine/connections/test_connection.py::ConnectionInitTest::test_legacy_insert_query - DeprecationWarning: Setting the consistency level at the session level will be removed in 4.0. Consider using execution profiles and setting the desired consistency level to the EXEC_PROFILE_DEFAULT profile.
2024-11-06T11:33:09.8148431Z FAILED tests/integration/cqlengine/management/test_management.py::TablePropertiesTests::test_table_property_update - DeprecationWarning: assertDictContainsSubset is deprecated
2024-11-06T11:33:09.8149303Z FAILED tests/integration/cqlengine/management/test_management.py::InconsistentTable::test_sync_warnings - PendingDeprecationWarning: Model __table_name_case_sensitive__ will be removed in 4.0.
2024-11-06T11:33:09.8150131Z FAILED tests/integration/cqlengine/management/test_management.py::IndexTests::test_sync_index - PendingDeprecationWarning: Model __table_name_case_sensitive__ will be removed in 4.0.
2024-11-06T11:33:09.8151150Z FAILED tests/integration/cqlengine/management/test_management.py::IndexTests::test_sync_index_case_sensitive - PendingDeprecationWarning: Model __table_name_case_sensitive__ will be removed in 4.0.
2024-11-06T11:33:09.8152525Z FAILED tests/integration/cqlengine/model/test_class_construction.py::TestManualTableNamingCaseSensitive::test_proper_table_naming_case_insensitive - UserWarning: Model __table_name__ will be case sensitive by default in 4.0. You should fix the __table_name__ value of the 'RenamedCaseInsensitiveTest' model.
2024-11-06T11:33:09.8153576Z FAILED tests/integration/cqlengine/model/test_class_construction.py::TestManualTableNamingCaseSensitive::test_proper_table_naming_case_sensitive - PendingDeprecationWarning: Model __table_name_case_sensitive__ will be removed in 4.0.
2024-11-06T11:33:09.8154414Z FAILED tests/integration/cqlengine/model/test_model.py::TestModel::test_column_family_case_sensitive - PendingDeprecationWarning: Model __table_name_case_sensitive__ will be removed in 4.0.
2024-11-06T11:33:09.8155547Z FAILED tests/integration/cqlengine/query/test_batch_query.py::BatchTypeQueryTests::test_cassandra_batch_type - DeprecationWarning: 'create' and 'save' actions on Counters are deprecated. It will be disallowed in 4.0. Use the 'update' mechanism instead.
2024-11-06T11:33:09.8156664Z FAILED tests/integration/cqlengine/query/test_batch_query.py::BatchTypeQueryTests::test_cqlengine_batch_type - DeprecationWarning: 'create' and 'save' actions on Counters are deprecated. It will be disallowed in 4.0. Use the 'update' mechanism instead.
2024-11-06T11:33:09.8157770Z FAILED tests/integration/cqlengine/query/test_updates.py::QueryUpdateTests::test_list_prepend_updates - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
2024-11-06T11:33:09.8158882Z FAILED tests/integration/cqlengine/statements/test_base_statement.py::ExecuteStatementTest::test_insert_statement_execute - DeprecationWarning: ResultSet indexing support will be removed in 4.0. Consider using ResultSet.one() to get a single row.
down to 19 warnings in integration tests (python 3.13):
FAILED tests/integration/standard/test_cluster.py::DeprecationWarningTest::test_deprecation_warning_default_consistency_level - DeprecationWarning: Setting the consistency level at the session level will be removed in 4.0. Consider using execution profiles and setting the desired consistency level to the EXEC_PROFILE_DEFAULT profile.
FAILED tests/integration/standard/test_policies.py::ExponentialRetryPolicyTests::test_exponential_retries - DeprecationWarning: Legacy execution parameters will be removed in 4.0. Consider using execution profiles.
FAILED tests/integration/cqlengine/columns/test_container_columns.py::TestMapColumn::test_element_count_validation - DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
FAILED tests/integration/cqlengine/columns/test_counter_column.py::TestCounterColumn::test_concurrent_updates - DeprecationWarning: 'create' and 'save' actions on Counters are deprecated. It will be disallowed in 4.0. Use the 'update' mechanism instead.
FAILED tests/integration/cqlengine/columns/test_validation.py::TestDatetime::test_datetime_invalid - DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
FAILED tests/integration/cqlengine/columns/test_validation.py::TestDatetime::test_datetime_timestamp - DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
FAILED tests/integration/cqlengine/columns/test_validation.py::TestTimeUUIDFromDatetime::test_conversion_specific_date - DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
FAILED tests/integration/cqlengine/management/test_management.py::InconsistentTable::test_sync_warnings - PendingDeprecationWarning: Model __table_name_case_sensitive__ will be removed in 4.0.
FAILED tests/integration/cqlengine/model/test_class_construction.py::TestManualTableNamingCaseSensitive::test_proper_table_naming_case_insensitive - UserWarning: Model __table_name__ will be case sensitive by default in 4.0. You should fix the __table_name__ value of the 'RenamedCaseInsensitiveTest' model.
FAILED tests/integration/cqlengine/model/test_class_construction.py::TestManualTableNamingCaseSensitive::test_proper_table_naming_case_sensitive - PendingDeprecationWarning: Model __table_name_case_sensitive__ will be removed in 4.0.
FAILED tests/integration/cqlengine/model/test_model.py::TestModel::test_column_family_case_sensitive - PendingDeprecationWarning: Model __table_name_case_sensitive__ will be removed in 4.0.
FAILED tests/integration/cqlengine/model/test_model_io.py::TestModelIO::test_can_insert_model_with_all_column_types - DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
FAILED tests/integration/cqlengine/model/test_udts.py::UserDefinedTypeTests::test_can_insert_udts_with_all_datatypes - DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
FAILED tests/integration/cqlengine/query/test_batch_query.py::BatchTypeQueryTests::test_cassandra_batch_type - DeprecationWarning: 'create' and 'save' actions on Counters are deprecated. It will be disallowed in 4.0. Use the 'update' mechanism instead.
FAILED tests/integration/cqlengine/query/test_batch_query.py::BatchTypeQueryTests::test_cqlengine_batch_type - DeprecationWarning: 'create' and 'save' actions on Counters are deprecated. It will be disallowed in 4.0. Use the 'update' mechanism instead.
FAILED tests/integration/cqlengine/query/test_queryset.py::TestQuerySetSlicing::test_negative_indexing_works_properly - DeprecationWarning: ModelQuerySet indexing with negative indices support will be removed in 4.0.
FAILED tests/integration/cqlengine/query/test_queryset.py::TestQuerySetSlicing::test_negative_slicing - DeprecationWarning: ModelQuerySet slicing with negative indices support will be removed in 4.0.
FAILED tests/integration/cqlengine/query/test_queryset.py::TestMinMaxTimeUUIDFunctions::test_success_case - DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
FAILED tests/integration/cqlengine/query/test_queryset.py::TestMinMaxTimeUUIDFunctions::test_tzaware_datetime_support - DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
= 19 failed, 752 passed, 125 skipped, 8 xfailed, 5 warnings, 135 errors in 1446.20s (0:24:06) =
Fixed on master
SyntaxWarning: invalid escape sequence ... fixed in https://github.com/scylladb/python-driver/pull/405 and available since version 3.28.1 https://github.com/scylladb/python-driver/commits/3.28.1-scylla .