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

🔥 Drop support for Python 3.7 #830

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kinuax
Copy link

@kinuax kinuax commented May 15, 2024

CPython and click already dropped support for Python 3.7. I would propose to proceed accordingly here in order to benefit from:

  • reducing the CI tests
  • utilizing improved types without branching
  • making available the syntax provided by 3.8:
    • assignment expressions
    • positional-only arguments
    • f-strings with =

3.7 occurrences are updated. Literal related branching is cleaned. _typing is updated and simplified. All local tests pass on 3.8-3.12 and Linux.

Context: #828

Copy link

📝 Docs preview for commit 18178cf at: https://63aa4de4.typertiangolo.pages.dev

@kinuax kinuax force-pushed the drop-support-for-python-3.7 branch from 18178cf to 314f504 Compare May 15, 2024 09:59
Copy link

📝 Docs preview for commit 2e8fcdd at: https://27073bc3.typertiangolo.pages.dev

@kinuax kinuax force-pushed the drop-support-for-python-3.7 branch from 2e8fcdd to caf601e Compare May 15, 2024 10:04
Copy link

📝 Docs preview for commit caf601e at: https://8c1c8efc.typertiangolo.pages.dev

@kinuax
Copy link
Author

kinuax commented May 15, 2024

CI tests pass.

@svlandeg svlandeg added feature New feature, enhancement or request breaking p3 labels May 17, 2024
Copy link
Collaborator

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

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

Thanks for the very thorough PR!

I'll have to ask @tiangolo what the term is he wants to drop Python 3.7 by.

Note - I'm also maintaining spaCy and there we just bumped the Typer pin to allow any v0.x. If Typer drops Python 3.7 which spaCy v3 still supports, we'll have to again restrict the upper bound for Typer there. And I can imagine spaCy not being the only repo that would run into this.

I think we'll want to drop 3.7 at some point, it's just a question of when :-)

.github/workflows/test.yml Outdated Show resolved Hide resolved
Copy link

📝 Docs preview for commit 36c4439 at: https://0e84aba4.typertiangolo.pages.dev

@kinuax
Copy link
Author

kinuax commented May 17, 2024

@svlandeg, thanks for reviewing the PR and for sharing your thoughts. 👍

I understand the concern about avoiding breaking dependent libraries.

Besides, I rechecked the click repo and I would like to inform (and also correct previous statements) that, although old, the specific change that drops 3.7 is not released yet (it was merged in main branch right after the latest release 8.1.7).
This means that, in my opinion, the consideration of dropping support in Typer would happen, at least, after a new click release takes place. So this PR is just a prep for that moment.

@tiangolo
Copy link
Owner

Thanks @kinuax! I want to keep support for Python 3.7 for a while. It's currently not being a problem (yet) so I prefer to delay this a bit.

I would also want to have some features and fixes in before dropping support, so that people stuck in 3.7 can benefit from them too.

Copy link

📝 Docs preview for commit 5facc11 at: https://b83f7230.typertiangolo.pages.dev

@kinuax
Copy link
Author

kinuax commented May 20, 2024

@tiangolo, all right, I understand, thanks for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking feature New feature, enhancement or request p3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants