Backport to 2.0 of the 3.15 support added for 2.1, as the issue is
milestoned to 2.0.x.
Add 3.15 to the noxfile Python matrix, and add both the 3.14 and the
3.15 trove classifiers; 3.14 has been in the noxfile matrix here for
some time but was never added to the classifier list.
Repair the auto-generated docstring for MappedAsDataclass subclasses
under 3.15. Python 3.15 changed dataclasses so that the class
docstring is no longer rendered when the dataclass is created, and is
instead produced by a descriptor the first time __doc__ is read. The
dataclass setup swaps a constructed __annotations__ onto the class for
the duration of the dataclass call and restores the original in a
finally block, so by the time that deferred render runs the
annotations are gone and the docstring omits them entirely. Read
__doc__ while the swapped annotations are still in place, so that the
same docstring is produced on every supported Python.
Also port the docstring assertion from the 2.1 test suite; there was
no equivalent coverage here, so this defect would otherwise go
unnoticed on this branch. As Python 3.8 and earlier still define
typing.Generic.__new__, and declarative classes are Generic subclasses,
the inspect.signature() call dataclasses uses to render this docstring
reports that __new__ rather than the generated __init__ on those
versions; assert the version-appropriate form in each case.