Make `Mapped` covariant
Made the contained type for :class:`.Mapped` covariant; this is to allow
greater flexibility for end-user typing scenarios, such as the use of
protocols to represent particular mapped class structures that are passed
to other functions. As part of this change, the contained type was also
made covariant for dependent and related types such as
:class:`_orm.base.SQLORMOperations`, :class:`_orm.WriteOnlyMapped`, and
:class:`_sql.SQLColumnExpression`. Pull request courtesy Roméo Després.
within the change, there is a bit of adjustment to ``__radd__()`` to
match the typing of ``__add__()``, which previously was slightly
different for some reason and not passing on mypy with this change.
Fixes: #10288
Closes: #10289
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10289
Pull-request-sha:
50eee7021cd29d59f52d8ff10c69d2970e1c1534
Change-Id: Ic55723a78b0b3b47dfff927d9ee0b94301272a6a