Skip to content

Improved typing #784

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

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

Improved typing #784

wants to merge 7 commits into from

Conversation

mberk
Copy link
Contributor

@mberk mberk commented Feb 27, 2025

Work in progress

Suggest we take this opportunity to drop support for Python 3.8 which is end of life and does not support parameterizing generic classes (dict, tuple, etc)

@mzaja
Copy link
Contributor

mzaja commented Apr 9, 2025

While I am not against dropping support for EOL 3.8, container type hints in 3.8 can be parametrised as long as they are imported from typing module:

from typing import List, Dict, Tuple, Set

What is not supported in 3.8 is parametrising the built-in classes (lowercase letters) since they do not support indexing:

list[int]  # Fails in 3.8 because class "list" does not support indexing
List[int]  # Works in 3.8

Admittedly, this would be a tad bit more work, but hardly insurmountable.

@mberk
Copy link
Contributor Author

mberk commented Apr 9, 2025

@mzaja - of course. Let me rephrase: I am not going to make these changes 3.8 compatible

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