From 354edcee061ae012660dadf7c70797efc4d487be Mon Sep 17 00:00:00 2001 From: Francisco Lara <35785430+flara-infoxchange@users.noreply.github.com> Date: Mon, 3 Oct 2022 09:19:24 +1100 Subject: [PATCH] Stop supporting elastic-app-search in favour of enterprise-search and update dependencies (#215) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove support for legacy elastic-app-search and update dependecies * Bump version: 1.3.2 → 2.0.0 * Update Readme * Update dependencies --- Pipfile | 1 - Pipfile.lock | 280 ++++++++++++++------------- README.rst | 8 +- django_elastic_appsearch/__init__.py | 2 +- django_elastic_appsearch/clients.py | 24 --- django_elastic_appsearch/orm.py | 14 +- setup.cfg | 2 +- setup.py | 3 +- tests/test_clients.py | 8 - tests/test_orm.py | 6 - tox.ini | 1 - 11 files changed, 154 insertions(+), 195 deletions(-) diff --git a/Pipfile b/Pipfile index 4a7df62..7267f1a 100644 --- a/Pipfile +++ b/Pipfile @@ -15,7 +15,6 @@ tox = "*" pydocstyle = "*" [packages] -elastic-app-search = "*" serpy = "*" django = "*" elastic-enterprise-search = "*" diff --git a/Pipfile.lock b/Pipfile.lock index d3757af..c54d96e 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "d0d4ee9bfcf0f76acde121257f9ec644a90672d552dd759050bf84d0233b4cbd" + "sha256": "2d33b487ee0449e6e848ac33912332eb57f4af04dc2ffaa9aa25e9ab13d2d707" }, "pipfile-spec": 6, "requires": {}, @@ -22,36 +22,43 @@ "markers": "python_version >= '3.7'", "version": "==3.5.2" }, - "certifi": { - "hashes": [ - "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d", - "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412" - ], - "markers": "python_version >= '3.6'", - "version": "==2022.6.15" + "backports.zoneinfo": { + "hashes": [ + "sha256:17746bd546106fa389c51dbea67c8b7c8f0d14b5526a579ca6ccf5ed72c526cf", + "sha256:1b13e654a55cd45672cb54ed12148cd33628f672548f373963b0bff67b217328", + "sha256:1c5742112073a563c81f786e77514969acb58649bcdf6cdf0b4ed31a348d4546", + "sha256:4a0f800587060bf8880f954dbef70de6c11bbe59c673c3d818921f042f9954a6", + "sha256:5c144945a7752ca544b4b78c8c41544cdfaf9786f25fe5ffb10e838e19a27570", + "sha256:7b0a64cda4145548fed9efc10322770f929b944ce5cee6c0dfe0c87bf4c0c8c9", + "sha256:8439c030a11780786a2002261569bdf362264f605dfa4d65090b64b05c9f79a7", + "sha256:8961c0f32cd0336fb8e8ead11a1f8cd99ec07145ec2931122faaac1c8f7fd987", + "sha256:89a48c0d158a3cc3f654da4c2de1ceba85263fafb861b98b59040a5086259722", + "sha256:a76b38c52400b762e48131494ba26be363491ac4f9a04c1b7e92483d169f6582", + "sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc", + "sha256:e55b384612d93be96506932a786bbcde5a2db7a9e6a4bb4bffe8b733f5b9036b", + "sha256:e81b76cace8eda1fca50e345242ba977f9be6ae3945af8d46326d776b4cf78d1", + "sha256:e8236383a20872c0cdf5a62b554b27538db7fa1bbec52429d8d106effbaeca08", + "sha256:f04e857b59d9d1ccc39ce2da1021d196e47234873820cbeaad210724b1ee28ac", + "sha256:fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2" + ], + "markers": "python_version < '3.9'", + "version": "==0.2.1" }, - "charset-normalizer": { + "certifi": { "hashes": [ - "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845", - "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f" + "sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14", + "sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382" ], "markers": "python_version >= '3.6'", - "version": "==2.1.1" + "version": "==2022.9.24" }, "django": { "hashes": [ - "sha256:42573831292029639b798fe4d3812996bfe4ff3275f04566da90764daec011a5", - "sha256:f6d2c4069c9b9bfac03bedff927ea1f9e0d29e34525cec8a68fd28eb2a8df7af" + "sha256:a153ffd5143bf26a877bfae2f4ec736ebd8924a46600ca089ad96b54a1d4e28e", + "sha256:acb21fac9275f9972d81c7caf5761a89ec3ea25fe74545dd26b8a48cb3a0203e" ], "index": "pypi", - "version": "==3.2.8" - }, - "elastic-app-search": { - "hashes": [ - "sha256:e6813e54da27eedf30db3d86f772ec403b215875d4c1047f2e68cddc45525f54" - ], - "index": "pypi", - "version": "==7.10.0" + "version": "==4.1.1" }, "elastic-enterprise-search": { "hashes": [ @@ -69,20 +76,13 @@ "markers": "python_version >= '3.6'", "version": "==8.4.0" }, - "idna": { - "hashes": [ - "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", - "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" - ], - "markers": "python_version >= '3.5'", - "version": "==3.3" - }, "pyjwt": { "hashes": [ - "sha256:5c6eca3c2940464d106b99ba83b00c6add741c9becaec087fb7ccdefea71350e", - "sha256:8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96" + "sha256:8d82e7087868e94dd8d7d418e5088ce64f7daab4b36db654cbaedb46f9d1ca80", + "sha256:e77ab89480905d86998442ac5788f35333fa85f65047a534adc38edf3c88fc3b" ], - "version": "==1.7.1" + "markers": "python_version >= '3.7'", + "version": "==2.5.0" }, "python-dateutil": { "hashes": [ @@ -92,21 +92,6 @@ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.2" }, - "pytz": { - "hashes": [ - "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197", - "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5" - ], - "version": "==2022.2.1" - }, - "requests": { - "hashes": [ - "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983", - "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349" - ], - "markers": "python_version >= '3.7' and python_version < '4'", - "version": "==2.28.1" - }, "serpy": { "hashes": [ "sha256:3772b2a9923fbf674000ff51abebf6ea8f0fca0a2cfcbfa0d63ff118193d1ec5", @@ -125,11 +110,11 @@ }, "sqlparse": { "hashes": [ - "sha256:0c00730c74263a94e5a9919ade150dfc3b19c574389985446148402998287dae", - "sha256:48719e356bb8b42991bdbb1e8b83223757b93789c00910a616a071910ca4a64d" + "sha256:0323c0ec29cd52bceabc1b4d9d579e311f3e4961b98d174201d5622a23b85e34", + "sha256:69ca804846bb114d2ec380e4360a8a340db83f0ccf3afceeb1404df028f57268" ], "markers": "python_version >= '3.5'", - "version": "==0.4.2" + "version": "==0.4.3" }, "urllib3": { "hashes": [ @@ -167,11 +152,11 @@ }, "certifi": { "hashes": [ - "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d", - "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412" + "sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14", + "sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382" ], "markers": "python_version >= '3.6'", - "version": "==2022.6.15" + "version": "==2022.9.24" }, "cffi": { "hashes": [ @@ -247,7 +232,7 @@ "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845", "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f" ], - "markers": "python_version >= '3.6'", + "markers": "python_full_version >= '3.6.0'", "version": "==2.1.1" }, "codecov": { @@ -259,13 +244,12 @@ "index": "pypi", "version": "==2.1.12" }, - "colorama": { + "commonmark": { "hashes": [ - "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da", - "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4" + "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60", + "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==0.4.5" + "version": "==0.9.1" }, "coverage": { "hashes": [ @@ -305,31 +289,35 @@ }, "cryptography": { "hashes": [ - "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59", - "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596", - "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3", - "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5", - "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab", - "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884", - "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82", - "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b", - "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441", - "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa", - "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d", - "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b", - "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a", - "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6", - "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157", - "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280", - "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282", - "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67", - "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8", - "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046", - "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327", - "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9" + "sha256:0297ffc478bdd237f5ca3a7dc96fc0d315670bfa099c04dc3a4a2172008a405a", + "sha256:10d1f29d6292fc95acb597bacefd5b9e812099d75a6469004fd38ba5471a977f", + "sha256:16fa61e7481f4b77ef53991075de29fc5bacb582a1244046d2e8b4bb72ef66d0", + "sha256:194044c6b89a2f9f169df475cc167f6157eb9151cc69af8a2a163481d45cc407", + "sha256:1db3d807a14931fa317f96435695d9ec386be7b84b618cc61cfa5d08b0ae33d7", + "sha256:3261725c0ef84e7592597606f6583385fed2a5ec3909f43bc475ade9729a41d6", + "sha256:3b72c360427889b40f36dc214630e688c2fe03e16c162ef0aa41da7ab1455153", + "sha256:3e3a2599e640927089f932295a9a247fc40a5bdf69b0484532f530471a382750", + "sha256:3fc26e22840b77326a764ceb5f02ca2d342305fba08f002a8c1f139540cdfaad", + "sha256:5067ee7f2bce36b11d0e334abcd1ccf8c541fc0bbdaf57cdd511fdee53e879b6", + "sha256:52e7bee800ec869b4031093875279f1ff2ed12c1e2f74923e8f49c916afd1d3b", + "sha256:64760ba5331e3f1794d0bcaabc0d0c39e8c60bf67d09c93dc0e54189dfd7cfe5", + "sha256:765fa194a0f3372d83005ab83ab35d7c5526c4e22951e46059b8ac678b44fa5a", + "sha256:79473cf8a5cbc471979bd9378c9f425384980fcf2ab6534b18ed7d0d9843987d", + "sha256:896dd3a66959d3a5ddcfc140a53391f69ff1e8f25d93f0e2e7830c6de90ceb9d", + "sha256:89ed49784ba88c221756ff4d4755dbc03b3c8d2c5103f6d6b4f83a0fb1e85294", + "sha256:ac7e48f7e7261207d750fa7e55eac2d45f720027d5703cd9007e9b37bbb59ac0", + "sha256:ad7353f6ddf285aeadfaf79e5a6829110106ff8189391704c1d8801aa0bae45a", + "sha256:b0163a849b6f315bf52815e238bc2b2346604413fa7c1601eea84bcddb5fb9ac", + "sha256:b6c9b706316d7b5a137c35e14f4103e2115b088c412140fdbd5f87c73284df61", + "sha256:c2e5856248a416767322c8668ef1845ad46ee62629266f84a8f007a317141013", + "sha256:ca9f6784ea96b55ff41708b92c3f6aeaebde4c560308e5fbbd3173fbc466e94e", + "sha256:d1a5bd52d684e49a36582193e0b89ff267704cd4025abefb9e26803adeb3e5fb", + "sha256:d3971e2749a723e9084dd507584e2a2761f78ad2c638aa31e80bc7a15c9db4f9", + "sha256:d4ef6cc305394ed669d4d9eebf10d3a101059bdcf2669c366ec1d14e4fb227bd", + "sha256:d9e69ae01f99abe6ad646947bba8941e896cb3aa805be2597a0400e0764b5818" ], "markers": "python_version >= '3.6'", - "version": "==37.0.4" + "version": "==38.0.1" }, "distlib": { "hashes": [ @@ -356,27 +344,35 @@ }, "flake8": { "hashes": [ - "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d", - "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d" + "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db", + "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248" ], "index": "pypi", - "version": "==4.0.1" + "version": "==5.0.4" }, "idna": { "hashes": [ - "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", - "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" + "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4", + "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2" ], "markers": "python_version >= '3.5'", - "version": "==3.3" + "version": "==3.4" }, "importlib-metadata": { "hashes": [ - "sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670", - "sha256:7401a975809ea1fdc658c3aa4f78cc2195a0e019c5cbc4c06122884e9ae80c23" + "sha256:da31db32b304314d044d3c12c79bd59e307889b287ad12ff387b3500835fc2ab", + "sha256:ddb0e35065e8938f867ed4928d0ae5bf2a53b7773871bfe6bcc7e4fcdc7dea43" + ], + "markers": "python_version < '3.10'", + "version": "==5.0.0" + }, + "jaraco.classes": { + "hashes": [ + "sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158", + "sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a" ], "markers": "python_version >= '3.7'", - "version": "==4.12.0" + "version": "==3.2.3" }, "jeepney": { "hashes": [ @@ -388,18 +384,19 @@ }, "keyring": { "hashes": [ - "sha256:0d9973f8891850f1ade5f26aafd06bb16865fbbae3fc56b0defb6a14a2624003", - "sha256:10d2a8639663fe2090705a00b8c47c687cacdf97598ea9c11456679fa974473a" + "sha256:69732a15cb1433bdfbc3b980a8a36a04878a6cfd7cb99f497b573f31618001c0", + "sha256:69b01dd83c42f590250fe7a1f503fc229b14de83857314b1933a3ddbf595c4a5" ], "markers": "python_version >= '3.7'", - "version": "==23.8.2" + "version": "==23.9.3" }, "mccabe": { "hashes": [ - "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", - "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" + "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", + "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e" ], - "version": "==0.6.1" + "markers": "python_version >= '3.6'", + "version": "==0.7.0" }, "mock": { "hashes": [ @@ -409,6 +406,14 @@ "index": "pypi", "version": "==4.0.3" }, + "more-itertools": { + "hashes": [ + "sha256:1bc4f91ee5b1b31ac7ceacc17c09befe6a40a503907baf9c839c229b5095cfd2", + "sha256:c09443cd3d5438b8dafccd867a6bc1cb0894389e90cb53d227456b0b0bccb750" + ], + "markers": "python_version >= '3.5'", + "version": "==8.14.0" + }, "packaging": { "hashes": [ "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb", @@ -451,18 +456,17 @@ }, "pycodestyle": { "hashes": [ - "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20", - "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f" + "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785", + "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==2.8.0" + "markers": "python_version >= '3.6'", + "version": "==2.9.1" }, "pycparser": { "hashes": [ "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9", "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.21" }, "pydocstyle": { @@ -475,11 +479,11 @@ }, "pyflakes": { "hashes": [ - "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c", - "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e" + "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2", + "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.4.0" + "markers": "python_version >= '3.6'", + "version": "==2.5.0" }, "pygments": { "hashes": [ @@ -499,11 +503,11 @@ }, "readme-renderer": { "hashes": [ - "sha256:07b7ea234e03e58f77cc222e206e6abb8f4c0435becce5104794ee591f9301c5", - "sha256:9fa416704703e509eeb900696751c908ddeb2011319d93700d8f18baff887a69" + "sha256:d3f06a69e8c40fca9ab3174eca48f96d9771eddb43517b17d96583418427b106", + "sha256:e8ad25293c98f781dbc2c5a36a309929390009f902f99e1798c761aaf04a7923" ], "markers": "python_version >= '3.7'", - "version": "==37.0" + "version": "==37.2" }, "requests": { "hashes": [ @@ -528,6 +532,14 @@ "markers": "python_version >= '3.7'", "version": "==2.0.0" }, + "rich": { + "hashes": [ + "sha256:a4eb26484f2c82589bd9a17c73d32a010b1e29d89f1604cd9bf3a2097b81bb5e", + "sha256:ba3a3775974105c221d31141f2c116f4fd65c5ceb0698657a11e9f295ec93fd0" + ], + "markers": "python_full_version >= '3.6.3' and python_full_version < '4.0.0'", + "version": "==12.6.0" + }, "secretstorage": { "hashes": [ "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77", @@ -551,37 +563,37 @@ ], "version": "==2.2.0" }, - "toml": { + "tomli": { "hashes": [ - "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", - "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", + "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f" ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==0.10.2" + "markers": "python_version < '3.11' and python_version >= '3.7'", + "version": "==2.0.1" }, "tox": { "hashes": [ - "sha256:5e274227a53dc9ef856767c21867377ba395992549f02ce55eb549f9fb9a8d10", - "sha256:c30b57fa2477f1fb7c36aa1d83292d5c2336cd0018119e1b1c17340e2c2708ca" + "sha256:44f3c347c68c2c68799d7d44f1808f9d396fc8a1a500cbc624253375c7ae107e", + "sha256:bf037662d7c740d15c9924ba23bb3e587df20598697bb985ac2b49bdc2d847f6" ], "index": "pypi", - "version": "==3.24.4" + "version": "==3.26.0" }, - "tqdm": { + "twine": { "hashes": [ - "sha256:40be55d30e200777a307a7585aee69e4eabb46b4ec6a4b4a5f2d9f11e7d5408d", - "sha256:74a2cdefe14d11442cedf3ba4e21a3b84ff9a2dbdc6cfae2c34addb2a14a5ea6" + "sha256:42026c18e394eac3e06693ee52010baa5313e4811d5a11050e7d48436cf41b9e", + "sha256:96b1cf12f7ae611a4a40b6ae8e9570215daff0611828f5fe1f37a16255ab24a0" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==4.64.0" + "index": "pypi", + "version": "==4.0.1" }, - "twine": { + "typing-extensions": { "hashes": [ - "sha256:4caad5ef4722e127b3749052fcbffaaf71719b19d4fd4973b29c469957adeba2", - "sha256:916070f8ecbd1985ebed5dbb02b9bda9a092882a96d7069d542d4fc0bb5c673c" + "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02", + "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6" ], - "index": "pypi", - "version": "==3.6.0" + "markers": "python_version < '3.9'", + "version": "==4.3.0" }, "urllib3": { "hashes": [ @@ -593,11 +605,11 @@ }, "virtualenv": { "hashes": [ - "sha256:4193b7bc8a6cd23e4eb251ac64f29b4398ab2c233531e66e40b19a6b7b0d30c1", - "sha256:d86ea0bb50e06252d79e6c241507cb904fcd66090c3271381372d6221a3970f9" + "sha256:227ea1b9994fdc5ea31977ba3383ef296d7472ea85be9d6732e42a91c04e80da", + "sha256:d07dfc5df5e4e0dbc92862350ad87a36ed505b978f6c39609dc489eadd5b0d27" ], "markers": "python_version >= '3.6'", - "version": "==20.16.3" + "version": "==20.16.5" }, "webencodings": { "hashes": [ @@ -608,11 +620,11 @@ }, "wheel": { "hashes": [ - "sha256:21014b2bd93c6d0034b6ba5d35e4eb284340e09d63c59aef6fc14b0f346146fd", - "sha256:e2ef7239991699e3355d54f8e968a21bb940a1dbf34a4d226741e64462516fad" + "sha256:4bdcd7d840138086126cd09254dc6195fb4fc6f01c050a1d7236f2630db1d22a", + "sha256:e9a504e793efbca1b8e0e9cb979a249cf4a0a7b5b8c9e8b65a5e39d49529c1c4" ], "index": "pypi", - "version": "==0.37.0" + "version": "==0.37.1" }, "zipp": { "hashes": [ diff --git a/README.rst b/README.rst index 95f9e61..f1c5520 100644 --- a/README.rst +++ b/README.rst @@ -34,7 +34,7 @@ Dependencies * Python >= 3.6 * Django >= 2.2 -* `elastic-app-search `_ +* `elastic-enterprise-search `_ * `serpy `_ Usage @@ -397,13 +397,13 @@ If you are using a subclass of `AppSearchQuerySet` that overrides methods withou Using the elastic app search python client ========================================== -We use the official `elastic app search python client `_ under the hood to communicate with the app search instance. So if needed, you can access the app search instance directly and use the functionality of the official elastic app search `client `_. Example below. +We use the official `elastic app search python client `_ under the hood to communicate with the app search instance. So if needed, you can access the app search instance directly and use the functionality of the official elastic app search `client `_. Example below. .. code-block:: python - from django_elastic_appsearch.clients import get_api_v1_client + from django_elastic_appsearch.clients import get_api_v1_enterprise_search_client - client = get_api_v1_client() + client = get_api_v1_enterprise_search_client() client.search('cars', 'Toyota Corolla', {}) Contributing diff --git a/django_elastic_appsearch/__init__.py b/django_elastic_appsearch/__init__.py index 4eda31b..f1836d5 100644 --- a/django_elastic_appsearch/__init__.py +++ b/django_elastic_appsearch/__init__.py @@ -3,4 +3,4 @@ # pylint:disable=invalid-name # Django requires `default_app_config` default_app_config = 'django_elastic_appsearch.apps.DjangoAppSearchConfig' -__version__ = '1.3.2' +__version__ = '2.0.0' diff --git a/django_elastic_appsearch/clients.py b/django_elastic_appsearch/clients.py index a6437aa..b234dd6 100644 --- a/django_elastic_appsearch/clients.py +++ b/django_elastic_appsearch/clients.py @@ -1,33 +1,9 @@ """Django App Search Client utilities.""" -import warnings from django.apps import apps -from elastic_app_search import Client from elastic_enterprise_search import AppSearch -def get_api_v1_client(): - """Return the app search client.""" - warnings.warn( - "`get_api_v1_client` is deprecated and will be removed in a future release. " - "Please configure your application to use " - "`get_api_v1_enterprise_search_client` instead.", - DeprecationWarning - ) - config = apps.get_app_config('django_elastic_appsearch') - - base_endpoint = config.api_v1_base_endpoint - api_key = config.api_key - use_https = config.use_https - - return Client( - api_key=api_key, - base_endpoint=base_endpoint, - use_https=use_https, - **config.extra_config_options - ) - - def get_api_v1_enterprise_search_client(): """Return the enterprise-search appsearch client.""" config = apps.get_app_config('django_elastic_appsearch') diff --git a/django_elastic_appsearch/orm.py b/django_elastic_appsearch/orm.py index 5e00123..2c87a82 100644 --- a/django_elastic_appsearch/orm.py +++ b/django_elastic_appsearch/orm.py @@ -1,10 +1,9 @@ """ORM features for Elastic App Search.""" -import warnings from django.apps import apps from django.db import models -from django_elastic_appsearch.clients import get_api_v1_client, get_api_v1_enterprise_search_client +from django_elastic_appsearch.clients import get_api_v1_enterprise_search_client from django_elastic_appsearch.slicer import slice_queryset @@ -67,17 +66,6 @@ class Meta: abstract = True - @classmethod - def get_appsearch_client(cls): - """Get the App Search client.""" - warnings.warn( - "`get_appsearch_client` is deprecated and will be removed in a future " - "release. Please configure your application to use " - "`get_enterprise_search_appsearch_client` instead.", - DeprecationWarning - ) - return get_api_v1_client() - @classmethod def get_enterprise_search_appsearch_client(cls): """Get the Enterprise Search appsearch client.""" diff --git a/setup.cfg b/setup.cfg index ff4b769..586d6a1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.3.2 +current_version = 2.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 7337e54..b5762ac 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def get_version(*file_paths): setup( name='django_elastic_appsearch', - version='1.3.2', + version='2.0.0', description="""Integrate your Django Project with Elastic App Search with ease.""", long_description=readme + '\n\n' + history, author='Infoxchange', @@ -57,7 +57,6 @@ def get_version(*file_paths): ], include_package_data=True, install_requires=[ - 'elastic-app-search', 'elastic-enterprise-search>=7.15.0', 'serpy', ], diff --git a/tests/test_clients.py b/tests/test_clients.py index 07847e5..b6bfabf 100644 --- a/tests/test_clients.py +++ b/tests/test_clients.py @@ -5,22 +5,14 @@ from django.test import TestCase from django_elastic_appsearch.clients import ( - get_api_v1_client, get_api_v1_enterprise_search_client ) -from elastic_app_search import Client from elastic_enterprise_search import AppSearch class TestClients(TestCase): """Test clients.""" - def test_get_api_v1_client(self): - """Test if the `get_api_v1_client` returns valid client.""" - - client = get_api_v1_client() - self.assertEqual(type(client), Client) - def test_get_api_v1_enterprise_search_client(self): """Test `get_api_v1_enterprise_search_client`.""" diff --git a/tests/test_orm.py b/tests/test_orm.py index 12d80da..75fcc9c 100644 --- a/tests/test_orm.py +++ b/tests/test_orm.py @@ -5,7 +5,6 @@ from django.utils import timezone from django_elastic_appsearch import serialisers -from elastic_app_search import Client from elastic_enterprise_search import AppSearch from example.models import Car, Truck @@ -31,11 +30,6 @@ def setUp(self): ) car.save() - def test_get_appsearch_client(self): - """Test `get_appsearch_client` class method.""" - client = Car.objects.first().get_appsearch_client() - self.assertIsInstance(client, Client) - def test_get_enterprise_search_appsearch_client(self): """Test `get_enterprise_search_appsearch_client` class method.""" client = Car.objects.first().get_enterprise_search_appsearch_client() diff --git a/tox.ini b/tox.ini index f52ee54..a8444bd 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,6 @@ deps = django-22: Django>=2.2.0,<2.3.0 django-31: Django>=3.1.0,<3.2.0 django-32: Django>=3.2.0,<3.3.0 - elastic-app-search elastic-enterprise-search serpy coverage