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

feat!: support new algoliasearch and django versions #336

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from
Draft

Conversation

shortcuts
Copy link
Member

@shortcuts shortcuts commented Nov 20, 2024

🧭 What and Why

🎟 JIRA Ticket: https://algolia.atlassian.net/browse/DI-3186 https://algolia.atlassian.net/browse/DI-3187 https://algolia.atlassian.net/browse/DI-3188 https://algolia.atlassian.net/browse/DI-3189 https://algolia.atlassian.net/browse/DI-3191

Changes included:

upgrade the package to support django v4 and v5, also upgrade the algoliasearch client

List of breaking changes:

  • drop support for python <3.8
  • drop support for django <4.0
  • remove method clear_index, use clear_objects instead
  • upgrade to algoliasearch +4.0

@shortcuts shortcuts changed the title chore: upgrade tooling feat!: support new algoliasearch and django versions Nov 20, 2024
self.__index.partial_update_objects(batch)
batch = []

# TODO: pass batch_size to partial_update_objects
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes I need to support that

algoliasearch>=3.0,<4.0
Django>=4.0
# algoliasearch>=4.0,<5.0
algoliasearch @ git+https://github.com/algolia/algoliasearch-client-python@main
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waiting for bfcm to end for this

Copy link

@millotp millotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

soooo nice, gg


[testenv:lint]
deps =
ruff {[versions]ruff}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Website.objects.create(name='Facebook', url='https://www.facebook.com')
Website.objects.create(name='Facebook', url='https://www.facebook.fr')
Website.objects.create(name='Facebook', url='https://fb.com')
Website(name="Algolia", url="https://www.algolia.com", is_online=False)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you configure ruff to use single quote as before ? or you prefer double quotes ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with the default configuration just to have simpler maintenance logic but... I don't really mind

setup.py Show resolved Hide resolved
algoliasearch>=3.0,<4.0
Django>=4.0
# algoliasearch>=4.0,<5.0
algoliasearch @ git+https://github.com/algolia/algoliasearch-client-python@main
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will need to change when released

algoliasearch_django/registration.py Show resolved Hide resolved
MAINTAINERS.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
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.

2 participants