newer Pythons seem to accept ``dict[Any, Any]`` which is why
this wasn't noticed. Revise fix for #7321 made in
I55656e867876677c5c55143449db371344be8600.
Fixes: #7321
Change-Id: Idc22e15d098543e07853f4532cfd1aaae4dd6404
from typing import Any
+from typing import Dict
from sqlalchemy.orm import declarative_base
from sqlalchemy.orm import declared_attr
return "name"
@declared_attr
- def __mapper_args__(cls) -> dict[Any, Any]:
+ def __mapper_args__(cls) -> Dict[Any, Any]:
return {}
@declared_attr
- def __table_args__(cls) -> dict[Any, Any]:
+ def __table_args__(cls) -> Dict[Any, Any]:
return {}
from typing import Any
+from typing import Dict
from typing import Type
from sqlalchemy.orm import declarative_base
return "name"
@declared_attr
- def __mapper_args__(cls: Type["Foo"]) -> dict[Any, Any]:
+ def __mapper_args__(cls: Type["Foo"]) -> Dict[Any, Any]:
return {}
# this was a workaround that works if there's no plugin present, make
# sure that doesn't crash anything
@classmethod
@declared_attr
- def __table_args__(cls: Type["Foo"]) -> dict[Any, Any]:
+ def __table_args__(cls: Type["Foo"]) -> Dict[Any, Any]:
return {}