Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 8.x] Use Python types to declare document fields #1847

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

github-actions[bot]
Copy link

Backport 0c3ffcd from #1845.

* basic type annotation support

* support for optional, list, and other type hints

* additional typing support

* dataclass-like behavior for Document and InnerDoc

* unit tests

* support InstrumentedField in Search class

* documentation

* Update docs/persistence.rst

Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>

* Update elasticsearch_dsl/document_base.py

Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>

* addressed review feedback

* better docs for Optional

* fix optional in test

---------

Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>
(cherry picked from commit 0c3ffcd)
@miguelgrinberg miguelgrinberg merged commit f49d8c5 into 8.x Jun 21, 2024
17 checks passed
@miguelgrinberg miguelgrinberg deleted the backport-1845-to-8.x branch June 21, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant