Skip to content

ElasticSearch incompatibility with Sphinx 4.2.0 #1552

@FreddieDev

Description

@FreddieDev

Hi all,

My Python project uses:

  • elasticsearch (7.14.1)
  • elasticsearch-dsl (7.4.0)
  • Sphinx to auto-generated documentation.

Issues started when we updated Sphinx from 3.0.4 to 4.2.0.

Example:
Usage of Elastic's Nested object (from elasticsearch_dsl import Nested), results in the Sphinx error:
TypeError: unhashable type: 'Nested'

The usage is as follows:

class CustomerPackage(InnerDoc):
    """A CustomerPackage Object."""

    @property
    def id(self):
        """Unique GUID for the CustomerPackage."""
        return self.meta.id

    type: Text = Text(analyzer="snowball")
    """ CustomerPackage Type. """

    description: Text = Text(analyzer="snowball")
    """ CustomerPackage Description. """

    lost: bool = Boolean()
    """ Determines if the CustomerPackage was lost in transmission."""

    package_content: Nested(PackageContent) = Nested(PackageContent, multi=False)
    """ Content involved in the message. """

If there are further details I can provide, please let me know.
Hoping someone else has ran into this too, in case there's an easy fix.

Many thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions