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

ci: Add Python 3.9 to build matrix #2622

Merged
merged 23 commits into from
Jul 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Skip tests that use subscripts in test_type_engine.py iff running p…
…ython 3.8

Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
  • Loading branch information
eapolinario committed Jul 30, 2024
commit 096bbaaeaba8238eba4d89c3c114ec774c00747e
21 changes: 16 additions & 5 deletions tests/flytekit/unit/core/test_type_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2389,17 +2389,28 @@ class Result(DataClassJsonMixin):
schema: TestSchema # type: ignore


@pytest.mark.parametrize(
"t",
[
def get_unsupported_complex_literals_tests():
if sys.version_info < (3, 9):
return [
typing_extensions.Annotated[typing.Dict[int, str], FlyteAnnotation({"foo": "bar"})],
typing_extensions.Annotated[typing.Dict[str, str], FlyteAnnotation({"foo": "bar"})],
typing_extensions.Annotated[Color, FlyteAnnotation({"foo": "bar"})],
typing_extensions.Annotated[Result, FlyteAnnotation({"foo": "bar"})],
]
return [
typing_extensions.Annotated[dict, FlyteAnnotation({"foo": "bar"})],
typing_extensions.Annotated[dict[int, str], FlyteAnnotation({"foo": "bar"})],
typing_extensions.Annotated[typing.Dict[int, str], FlyteAnnotation({"foo": "bar"})],
typing_extensions.Annotated[dict[str, str], FlyteAnnotation({"foo": "bar"})],
typing_extensions.Annotated[typing.Dict[str, str], FlyteAnnotation({"foo": "bar"})],
typing_extensions.Annotated[Color, FlyteAnnotation({"foo": "bar"})],
typing_extensions.Annotated[Result, FlyteAnnotation({"foo": "bar"})],
],
]


@pytest.mark.parametrize(
"t",
get_unsupported_complex_literals_tests(),
)
def test_unsupported_complex_literals(t):
with pytest.raises(ValueError):
Expand Down Expand Up @@ -3006,7 +3017,7 @@ def test_dataclass_encoder_and_decoder_registry():
class Datum:
x: int
y: str
z: dict[int, int]
z: typing.Dict[int, int]
w: List[int]

@task
Expand Down
Loading