-
-
Notifications
You must be signed in to change notification settings - Fork 445
Description
Description
Within a recent rebuild of package in Debian the litestar test suite is failing on the test tests/unit/test_typing.py::test_unwrap_type_alias_type_keyword
since typing-extensions 4.13.0 did reach the Debian archive. With typing-extensions << 4.13.0 the tests did succeed.
The relevant output of the failing test is
=================================== FAILURES ===================================
_____________________ test_unwrap_type_alias_type_keyword ______________________
@pytest.mark.skipif(sys.version_info < (3, 12), reason="type keyword not available before 3.12")
def test_unwrap_type_alias_type_keyword() -> None:
ctx: dict[str, Any] = {}
exec("type IntAlias = int", ctx, None)
annotation = ctx["IntAlias"]
field_definition = FieldDefinition.from_annotation(annotation)
> assert field_definition.is_type_alias_type
E AssertionError: assert False
E + where False = FieldDefinition(raw=IntAlias, annotation=IntAlias, type_wrappers=set(), origin=None, args=(), metadata=(), instantiabl...one, safe_generic_origin=None, inner_types=(), default=<_EmptyEnum.EMPTY: 0>, extra={}, kwarg_definition=None, name='').is_type_alias_type
The full log is visible on https://bugs.debian.org/1101855
polyfactory did had a similar issue that got fixed by litestar-org/polyfactory#684
I've seen there is also #3982 but I don't know enough if this PR is targeted to fix the issue from above.
URL to code causing the issue
No response
MCVE
Steps to reproduce
Should be visible if the tests are run with typing-extensions 4.13.0 is around. I haven't run any tests within a venv, only within chroot while a rebuild of the Debian package.
Screenshots
No response
Logs
Litestar Version
2.15.1
Platform
- Linux
- Mac
- Windows
- Other (Please specify in the description above)