Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
Changelog
=========

7.4.1.py311 (2024-10-31)
------------------
Rover fork for Python 3.11 support
https://roverdotcom.atlassian.net/browse/DEV-96564
https://github.com/roverdotcom/web/pull/71333
* Update source dir elasticsearch_dsl -> elasticsearch7_dsl for build purposes
* Update setup.py to require Python 3.11


7.4.1 (2023-03-01)
------------------

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import datetime
import os

import elasticsearch_dsl
import elasticsearch7_dsl

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -70,7 +70,7 @@
# built documents.

# The short X.Y version.
version = elasticsearch_dsl.__versionstr__
version = elasticsearch7_dsl.__versionstr__
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

from elasticsearch import Elasticsearch, __version__
from elasticsearch7 import Elasticsearch, __version__
from six import string_types

from .serializer import serializer
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/alias_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from datetime import datetime
from fnmatch import fnmatch

from elasticsearch_dsl import Date, Document, Keyword, Text, connections
from elasticsearch7_dsl import Date, Document, Keyword, Text, connections

ALIAS = "test-blog"
PATTERN = ALIAS + "-*"
Expand Down
2 changes: 1 addition & 1 deletion examples/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from itertools import permutations

from elasticsearch_dsl import (
from elasticsearch7_dsl import (
Completion,
Document,
Keyword,
Expand Down
2 changes: 1 addition & 1 deletion examples/composite_agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from __future__ import print_function

from elasticsearch_dsl import A, Search, connections
from elasticsearch7_dsl import A, Search, connections


def scan_aggs(search, source_aggs, inner_aggs={}, size=10):
Expand Down
2 changes: 1 addition & 1 deletion examples/parent_child.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"""
from datetime import datetime

from elasticsearch_dsl import (
from elasticsearch7_dsl import (
Boolean,
Date,
Document,
Expand Down
2 changes: 1 addition & 1 deletion examples/percolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

from elasticsearch_dsl import (
from elasticsearch7_dsl import (
Document,
Keyword,
Percolator,
Expand Down
4 changes: 2 additions & 2 deletions examples/search_as_you_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"""
from __future__ import print_function, unicode_literals

from elasticsearch_dsl import (
from elasticsearch7_dsl import (
Document,
SearchAsYouType,
analyzer,
connections,
token_filter,
)
from elasticsearch_dsl.query import MultiMatch
from elasticsearch7_dsl.query import MultiMatch

# custom analyzer for names
ascii_fold = analyzer(
Expand Down
6 changes: 3 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
"setup.py",
"noxfile.py",
"docs/",
"elasticsearch_dsl/",
"elasticsearch7_dsl/",
"examples/",
"tests/",
"utils/",
)


@nox.session(python=["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9"])
@nox.session(python=["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"])
def test(session):
session.install(".[develop]")

Expand All @@ -37,7 +37,7 @@ def test(session):
else:
argv = (
"-vvv",
"--cov=elasticsearch_dsl",
"--cov=elasticsearch7_dsl",
"--cov=tests.test_integration.test_examples",
"tests/",
)
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from setuptools import find_packages, setup

VERSION = (7, 4, 1)
VERSION = (7, 4, 1, "dev2")
__version__ = VERSION
__versionstr__ = ".".join(map(str, VERSION))

Expand All @@ -31,7 +31,7 @@
install_requires = [
"six",
"python-dateutil",
"elasticsearch>=7.0.0,<8.0.0",
"elasticsearch7>=7.0.0,<8.0.0",
# ipaddress is included in stdlib since python 3.3
'ipaddress; python_version<"3.3"',
]
Expand All @@ -48,7 +48,7 @@
]

setup(
name="elasticsearch-dsl",
name="elasticsearch7-dsl",
description="Python client for Elasticsearch",
license="Apache-2.0",
url="https://github.com/elasticsearch/elasticsearch-dsl-py",
Expand Down Expand Up @@ -76,6 +76,8 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from mock import Mock
from pytest import fixture, skip

from elasticsearch_dsl.connections import add_connection, connections
from elasticsearch7_dsl.connections import add_connection, connections

from .test_integration.test_data import (
DATA,
Expand Down Expand Up @@ -143,7 +143,7 @@ def dummy_response():

@fixture
def aggs_search():
from elasticsearch_dsl import Search
from elasticsearch7_dsl import Search

s = Search(index="flat-git")
s.aggs.bucket("popular_files", "terms", field="files", size=2).metric(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_aggs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from pytest import raises

from elasticsearch_dsl import aggs, query
from elasticsearch7_dsl import aggs, query


def test_repr():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from pytest import raises

from elasticsearch_dsl import analysis
from elasticsearch7_dsl import analysis


def test_analyzer_serializes_as_name():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
# specific language governing permissions and limitations
# under the License.

from elasticsearch import Elasticsearch
from elasticsearch7 import Elasticsearch
from pytest import raises

from elasticsearch_dsl import connections, serializer
from elasticsearch7_dsl import connections, serializer


def test_default_connection_is_returned_by_default():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from pytest import raises

from elasticsearch_dsl import (
from elasticsearch7_dsl import (
Index,
InnerDoc,
Mapping,
Expand All @@ -33,7 +33,7 @@
field,
utils,
)
from elasticsearch_dsl.exceptions import IllegalOperation, ValidationException
from elasticsearch7_dsl.exceptions import IllegalOperation, ValidationException


class MyInner(InnerDoc):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_faceted_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import pytest

from elasticsearch_dsl.faceted_search import (
from elasticsearch7_dsl.faceted_search import (
DateHistogramFacet,
FacetedSearch,
TermsFacet,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import pytest
from dateutil import tz

from elasticsearch_dsl import InnerDoc, Range, ValidationException, field
from elasticsearch7_dsl import InnerDoc, Range, ValidationException, field


def test_date_range_deserialization():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from pytest import raises

from elasticsearch_dsl import Date, Document, Index, IndexTemplate, Text, analyzer
from elasticsearch7_dsl import Date, Document, Index, IndexTemplate, Text, analyzer


class Post(Document):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration/test_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

from elasticsearch_dsl import analyzer, token_filter, tokenizer
from elasticsearch7_dsl import analyzer, token_filter, tokenizer


def test_simulate_with_just__builtin_tokenizer(client):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration/test_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

from elasticsearch_dsl.search import Q, Search
from elasticsearch7_dsl.search import Q, Search


def test_count_all(data_client):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_integration/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
from ipaddress import ip_address

import pytest
from elasticsearch import ConflictError, NotFoundError
from elasticsearch7 import ConflictError, NotFoundError
from pytest import raises
from pytz import timezone

from elasticsearch_dsl import (
from elasticsearch7_dsl import (
Binary,
Boolean,
Date,
Expand All @@ -43,7 +43,7 @@
Text,
analyzer,
)
from elasticsearch_dsl.utils import AttrList
from elasticsearch7_dsl.utils import AttrList

snowball = analyzer("my_snow", tokenizer="standard", filter=["lowercase", "snowball"])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

from elasticsearch_dsl import A, Search
from elasticsearch7_dsl import A, Search

from .composite_agg import scan_aggs

Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration/test_examples/test_parent_child.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from pytest import fixture

from elasticsearch_dsl import Q
from elasticsearch7_dsl import Q

from .parent_child import Answer, Comment, Question, User, setup

Expand Down
4 changes: 2 additions & 2 deletions tests/test_integration/test_faceted_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import pytest

from elasticsearch_dsl import A, Boolean, Date, Document, Keyword
from elasticsearch_dsl.faceted_search import (
from elasticsearch7_dsl import A, Boolean, Date, Document, Keyword
from elasticsearch7_dsl.faceted_search import (
DateHistogramFacet,
FacetedSearch,
NestedFacet,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import warnings

from elasticsearch_dsl import Date, Document, Index, IndexTemplate, Text, analysis
from elasticsearch7_dsl import Date, Document, Index, IndexTemplate, Text, analysis


class Post(Document):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration/test_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from pytest import raises

from elasticsearch_dsl import analysis, exceptions, mapping
from elasticsearch7_dsl import analysis, exceptions, mapping


def test_mapping_saved_into_es(write_client):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_integration/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

import warnings

from elasticsearch import TransportError
from elasticsearch7 import TransportError
from pytest import raises

from elasticsearch_dsl import Date, Document, Keyword, MultiSearch, Q, Search, Text
from elasticsearch_dsl.response import aggs
from elasticsearch7_dsl import Date, Document, Keyword, MultiSearch, Q, Search, Text
from elasticsearch7_dsl.response import aggs

from .test_data import FLAT_DATA

Expand Down
4 changes: 2 additions & 2 deletions tests/test_integration/test_update_by_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# specific language governing permissions and limitations
# under the License.

from elasticsearch_dsl.search import Q
from elasticsearch_dsl.update_by_query import UpdateByQuery
from elasticsearch7_dsl.search import Q
from elasticsearch7_dsl.update_by_query import UpdateByQuery


def test_update_by_query_no_script(write_client, setup_ubq_tests):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import json

from elasticsearch_dsl import Keyword, Nested, Text, analysis, mapping
from elasticsearch7_dsl import Keyword, Nested, Text, analysis, mapping


def test_mapping_can_has_fields():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# specific language governing permissions and limitations
# under the License.

import elasticsearch_dsl
import elasticsearch7_dsl


def test__all__is_sorted():
assert elasticsearch_dsl.__all__ == sorted(elasticsearch_dsl.__all__)
assert elasticsearch7_dsl.__all__ == sorted(elasticsearch7_dsl.__all__)
Loading
Loading