Skip to content

Test Python 3.9 and 3.10 on CI; Apply fixes #372

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
Mar 17, 2025

Conversation

kylebarron
Copy link
Member

@kylebarron kylebarron commented Mar 17, 2025

Closes #373

@kylebarron kylebarron changed the title Expand Python versions on CI Test Python 3.9 and 3.10 on CI Mar 17, 2025
@kylebarron kylebarron changed the title Test Python 3.9 and 3.10 on CI Test Python 3.9 and 3.10 on CI; Apply fixes Mar 17, 2025
@kylebarron kylebarron merged commit 7b1d9f0 into main Mar 17, 2025
6 checks passed
@kylebarron kylebarron deleted the kyle/ci-expand-python-versions branch March 17, 2025 23:04
@kylebarron kylebarron mentioned this pull request Mar 17, 2025
if sys.version_info >= (3, 10):
from typing import TypeAlias
else:
from typing_extensions import TypeAlias
Copy link
Member

Choose a reason for hiding this comment

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

You could safely do directly from typing_extensions import TypeAlias to avoid checking the python version twice (because typing_extensions` does it as well https://github.com/python/typing_extensions/blob/7def253cd65b3a916fcb76a6eb51428b60e1bcc8/src/typing_extensions.py#L1500-L1517

Copy link
Member Author

Choose a reason for hiding this comment

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

But people on latest Python versions might not have typing_extensions installed. (we should probably mark it as a runtime dependency ourselves for earlier Python versions I guess)

Copy link
Member

@vincentsarago vincentsarago Mar 18, 2025

Choose a reason for hiding this comment

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

(we should probably mark it as a runtime dependency ourselves for earlier Python versions I guess)

Yes we should 😅 (I didn't check the dependencies)

pydantic adds it for all version https://github.com/pydantic/pydantic/blob/main/pyproject.toml#L46

Copy link
Member

Choose a reason for hiding this comment

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

FYI it didn't fail on CI because we have a lot of tests dependencies that depends on typing-extensions https://github.com/developmentseed/obstore/blob/main/uv.lock#L281

IMO it doesn't hurt that much to add typing-extensions as a dependency (except that you won't be able to say that obstore is a zero dependency module 😬)

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

obstore 0.5 fails at runtime in Python 3.9
2 participants