-
Notifications
You must be signed in to change notification settings - Fork 37
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
chore: move python version compatibility to 3.10 #742
Conversation
cmatsuoka
commented
May 23, 2024
•
edited
Loading
edited
- Have you signed the CLA?
7257278
to
d20f2b6
Compare
Rebased on features/2.0 |
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
331853f
to
78bbc6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a few non-blocking thoughts:
- Can you use
from collections import namedtuple
instead offrom typing import NamedTuple
? - There's a leftover
Optional
here:cls, part: Part, *, previous_layer_hash: Optional["LayerHash"] - There's a leftover
Union
here:craft-parts/craft_parts/packages/apt_cache.py
Line 395 in 78bbc6a
path: Union[str, "os.PathLike[str]"], names: Iterable[str]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! The one thing I caught doesn't really need changing because it goes away with pydantic 2 anyway.
@@ -37,7 +37,7 @@ | |||
# see https://github.com/samuelcolvin/pydantic/issues/975#issuecomment-551147305 | |||
# The proper fix requires Python 3.9+ (needs `typing.Annotated`) | |||
if TYPE_CHECKING: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub's not letting me apply the suggestion to the full thing, but:
if TYPE_CHECKING: | |
UniqueStrList Annotated[liststr], conlist(str, unique_items=True)] |
Signed-off-by: Claudio Matsuoka <[email protected]>
Removed remaining |
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>