modernize annotationlib approach
This reverts commit
4ff1d604f9bec061fb1936b80d3ed09979d930e8 which reverted this change originally,
so it restores the change.
Change continues here where we now use py314's built in
annotationlib for get_annotations; issue [1] was fixed long
ago before 3.14.0 was released.
change for now:
A change in the mechanics of how Python dataclasses are applied to classes
that use :class:`.MappedAsDataclass` or
:meth:`.registry.mapped_as_dataclass` to apply ``__annotations__`` that are
as identical as is possible to the original ``__annotations__`` given,
while also adding attributes that SQLAlchemy considers to be part of
dataclass ``__annotations__``, then restoring the previous annotations in
exactly the same format as they were, using patterns that work with
:pep:`649` as closely as possible.
[1] https://github.com/python/cpython/issues/133684
Change-Id: I9073f99bc81b466888000da7d51d98cebf272b81