Skip to content

[pull] main from sqlalchemy:main#64

Merged
pull[bot] merged 6 commits intomakesoftwaresafe:mainfrom
sqlalchemy:main
Oct 20, 2022
Merged

[pull] main from sqlalchemy:main#64
pull[bot] merged 6 commits intomakesoftwaresafe:mainfrom
sqlalchemy:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Oct 20, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

Improved the :class:`.DeclarativeBase` class so that when combined with
other mixins like :class:`.MappedAsDataclass`, the order of the classes may
be in either order.

Added support for mapped classes that are also ``Generic`` subclasses,
to be specified as a ``GenericAlias`` object (e.g. ``MyClass[str]``)
within statements and calls to :func:`_sa.inspect`.

Fixes: #8665
Change-Id: I03063a28b0438a44b9e028fd9d45e8ce08bd18c4
Fixed bug in new ORM typed declarative mappings where we did not include
the ability to use ``Optional[]`` in the type annotation for a many-to-one
relationship, even though this is common.

Fixes: #8668
Change-Id: Idaf0846e49cc12095394b99ad6fe678735cf9242
the names "parent" / "child" are confusing for new users
in that they are used for table names as well as
"back_populates='parent'", use a disambiguated name.

In this change, there's now overlap between the
variable named "association_table" and the table name
"association_table".  not sure of a better naming system.

Change-Id: Ic036c8072caf6e9e5fbd1178986353c00b91f43d
References: #8675 (reply in thread)
since we are typing centric, note this configuration
as we have just supported in #8668.

Note also I am just taking "backref" out of the basic
version of the docs here totally, this doc is already
a lot to read / take in without making it even more
confusing; backref still has an entirely dedicated
docs page which can have all the additional behaviors
of backref() described.

Additionally, get other "optional" forms to work including
``cls | None`` and ``Union[cls, None]``.

Fixes: #8668
Change-Id: I2b026f496a1710ddebfb4aa6cf8459b4892cbc54
@pull pull bot added the ⤵️ pull label Oct 20, 2022
@pull pull bot merged commit 05d5f90 into makesoftwaresafe:main Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant