Skip to content

Commit

Permalink
Merge pull request #7 from radaron/social/HSS-29596-upgrade-python-ve…
Browse files Browse the repository at this point in the history
…rsion-in-elasticmock

[HSS-29596] Add python 3.9 and 3.10 support
  • Loading branch information
csizmaziakiki authored Jun 7, 2024
2 parents 665c86d + cdae972 commit fb7dc6b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ELASTICMOCK_VERSION='2.3.0'
ELASTICMOCK_VERSION='3.0.0'

install:
pip install -r requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion elasticmock/fake_elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ def search(self, index=None, doc_type=None, body=None, params=None, headers=None
else:
hits = sorted(hits, key=lambda k: k['_source'][key])

if 'from' in body and 'size' in body and body['from'] + body['size'] > 0:
if body is not None and 'from' in body and 'size' in body and body['from'] + body['size'] > 0:
hits = hits[body['from']:body['from'] + body['size']]

if 'scroll' in params:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import setuptools

__version__ = '2.3.0'
__version__ = '3.0.0'

# read the contents of your readme file
from os import path
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# content of: tox.ini , put in same dir as setup.py
[tox]
envlist =
py36-elasticsearch{1,2,5,6,7}
py37-elasticsearch{1,2,5,6,7}
py38-elasticsearch{1,2,5,6,7}
py39-elasticsearch{1,2,5,6,7}
py310-elasticsearch{1,2,5,6,7}

[testenv]
deps =
parameterized
pytest==4.6.9
pytest==6.2.5
pytest-cov==2.8.1
elasticsearch1: elasticsearch ==1.9.0
elasticsearch2: elasticsearch >=2.0.0, <5.0.0
Expand Down

0 comments on commit fb7dc6b

Please sign in to comment.