Skip to content

Drop python 3.6 support #529

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

Merged
merged 6 commits into from
Sep 21, 2022
Merged

Drop python 3.6 support #529

merged 6 commits into from
Sep 21, 2022

Conversation

sanders41
Copy link
Collaborator

Pull Request

This drops support for Python 3.6 and updates to 3.7+ syntax.

What does this PR do?

Fixes #378

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

@sanders41 sanders41 added the breaking-change The related changes are breaking for the users label Sep 17, 2022
@sanders41
Copy link
Collaborator Author

@alallema if you want to merge this integration-tests (3.6) needs to be removed and integration-tests (3.10) needs to be added in the branch protection rules. That will fix the stuck 3.6 test and make 3.10 required.

Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

Thanks, @sanders41 for this PR ❤️ !!!
I just had few questions on it

@@ -1,7 +1,10 @@
from __future__ import annotations
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for this question but why did we import __future__ here if we did use it on this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Technically it isn't needed but it doesn't hurt anything to have it. I added it because I have had cases where I didn't put it, then later went back and added something that need it and forgot to import __future__. The issue there is python 3.10+ works without it so everything seems good, but then errors show up if you try to use < 3.10.

So it's just there as a future __future__ 😄 safety net. If you would rather remove I can.

@@ -1,3 +1,5 @@
from __future__ import annotations
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same as above.

from typing import Any, List, Dict, Optional
from __future__ import annotations

from typing import Any, Dict, Optional
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we didn't remove Dict too in this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pydantic, which is what CamelBase is using behind the scenes, doesn't like __future__ style annotations. Doing it this way makes Pydantic happy while still providing the benefits it brings. To the end user it is all the same, they don't see any difference with the different annotation types.

alallema
alallema previously approved these changes Sep 21, 2022
Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

Thanks @sanders41 for this PR and for your explanations ❤️ 🚀
LGTM! 🔥 🔥

alallema
alallema previously approved these changes Sep 21, 2022
@alallema
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Sep 21, 2022

Configuration problem:
bors.toml: syntax error

@alallema
Copy link
Contributor

Configuration problem: bors.toml: syntax error

@sanders41 - Oopsy, bors is right we need to modify the bors.toml file too.

@sanders41
Copy link
Collaborator Author

Oops, I fixed the toml file.

@alallema
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Sep 21, 2022

Build succeeded:

@bors bors bot merged commit 4e51370 into main Sep 21, 2022
@bors bors bot deleted the drop-python3.6 branch September 21, 2022 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change The related changes are breaking for the users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.6 EOL
2 participants