From: Federico Caselli Date: Sun, 8 Jan 2023 09:55:22 +0000 (+0100) Subject: Use field_specifiers instead of deprecated field_descriptors X-Git-Tag: rel_2_0_0rc2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90b979a73bc6aa70ef5aba1394c644bce1b1d6d4;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Use field_specifiers instead of deprecated field_descriptors The Data Class Transforms argument ``field_descriptors`` was renamed to ``field_specifiers`` in the accepted version of PEP 681. Fixes: #9067 Change-Id: Ic13ea93c157325c3b60e65f328a364da68ea1c46 --- diff --git a/doc/build/changelog/unreleased_20/9067.rst b/doc/build/changelog/unreleased_20/9067.rst new file mode 100644 index 0000000000..3126766b32 --- /dev/null +++ b/doc/build/changelog/unreleased_20/9067.rst @@ -0,0 +1,6 @@ +.. change:: + :tags: bug, typing + :tickets: 9067 + + The Data Class Transforms argument ``field_descriptors`` was renamed + to ``field_specifiers`` in the accepted version of PEP 681. diff --git a/lib/sqlalchemy/orm/decl_api.py b/lib/sqlalchemy/orm/decl_api.py index f965b2616a..b65f556187 100644 --- a/lib/sqlalchemy/orm/decl_api.py +++ b/lib/sqlalchemy/orm/decl_api.py @@ -144,7 +144,7 @@ class DeclarativeAttributeIntercept( @compat_typing.dataclass_transform( - field_descriptors=( + field_specifiers=( MappedColumn[Any], RelationshipProperty[Any], Composite[Any], @@ -1328,7 +1328,7 @@ class registry: return metaclass(name, bases, class_dict) @compat_typing.dataclass_transform( - field_descriptors=( + field_specifiers=( MappedColumn[Any], RelationshipProperty[Any], Composite[Any],