From ba7d104daca0233edb3385149aac8ee96c0dfcd9 Mon Sep 17 00:00:00 2001 From: Subhash Bhushan Date: Wed, 22 Nov 2023 07:55:36 -0800 Subject: [PATCH] Upgrade coverage and linked packages --- setup.py | 32 +++++++++---------- .../adapters/repository/elasticsearch.py | 4 +-- .../model/elasticsearch_model/tests.py | 4 +-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/setup.py b/setup.py index c08e6c0f..46aa36b3 100644 --- a/setup.py +++ b/setup.py @@ -58,20 +58,20 @@ def read(*names, **kwargs): testing_requires = all_external_requires + [ "autoflake>=2.2.1", - "isort>=5.10.1", - "mock==4.0.2", - "pluggy==0.13.1", - "pytest-asyncio>=0.15.1", - "pytest-cov==2.8.1", - "pytest-flake8>=1.0.7", - "pytest-mock==3.1.0", - "pytest>=5.4.2", + "isort>=5.12.0", + "mock==5.1.0", + "pluggy==1.3.0", + "pytest-asyncio>=0.21.1", + "pytest-cov>=4.1.0", + "pytest-flake8>=1.1.1", + "pytest-mock==3.12.0", + "pytest>=7.4.3", ] docs_requires = [ "livereload>=2.6.3", - "sphinx>=4.1.2", - "sphinx-tabs>=3.2.0", + "sphinx>=7.2.6", + "sphinx-tabs>=3.4.4", ] types_requires = [ @@ -86,13 +86,13 @@ def read(*names, **kwargs): + types_requires + testing_requires + [ - "black==21.11b1", - "check-manifest==0.42", - "coverage==5.1", - "docutils==0.16", + "black>=23.11.0", + "check-manifest>=0.49", + "coverage>=7.3.2", + "docutils>=0.18.0", "pre-commit>=2.16.0", - "tox==3.15.0", - "twine==3.1.1", + "tox>=4.11.3", + "twine>=4.0.2", ] ) diff --git a/src/protean/adapters/repository/elasticsearch.py b/src/protean/adapters/repository/elasticsearch.py index e9f0cbeb..ece73407 100644 --- a/src/protean/adapters/repository/elasticsearch.py +++ b/src/protean/adapters/repository/elasticsearch.py @@ -481,7 +481,7 @@ def _data_reset(self): if provider.conn_info[ "DATABASE" ] == Database.ELASTICSEARCH.value and conn.indices.exists( - model_cls._index._name + index=model_cls._index._name ): conn.delete_by_query( refresh=True, @@ -522,7 +522,7 @@ def _drop_database_artifacts(self): if provider.conn_info[ "DATABASE" ] == Database.ELASTICSEARCH.value and model_cls._index.exists(using=conn): - conn.indices.delete(model_cls._index._name) + conn.indices.delete(index=model_cls._index._name) class DefaultLookup(BaseLookup): diff --git a/tests/adapters/model/elasticsearch_model/tests.py b/tests/adapters/model/elasticsearch_model/tests.py index 721d33aa..cd604285 100644 --- a/tests/adapters/model/elasticsearch_model/tests.py +++ b/tests/adapters/model/elasticsearch_model/tests.py @@ -346,7 +346,7 @@ class ReceiverInlineModel: model_cls = test_domain.repository_for(Receiver)._model conn = test_domain.providers["default"].get_connection() if model_cls._index.exists(using=conn): - conn.indices.delete(model_cls._index._name) + conn.indices.delete(index=model_cls._index._name) model_cls.init(using=conn) receiver_dao = test_domain.repository_for(Receiver)._dao @@ -356,4 +356,4 @@ class ReceiverInlineModel: assert receiver is not None assert receiver.name == "John" - conn.indices.delete(model_cls._index._name) + conn.indices.delete(index=model_cls._index._name)