]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
reorganize mapper compile/teardown under registry
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 30 Jan 2021 16:55:22 +0000 (11:55 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 1 Feb 2021 21:35:35 +0000 (16:35 -0500)
commit5ec5b0a6c7b618bba7926e21f77be9557973860f
tree2d680370e2c8551d92b04ad2155eff5fd95ecb7a
parent532026f97f402d6673cd9746f1a7daee99327a68
reorganize mapper compile/teardown under registry

Mapper "configuration", which occurs within the
:func:`_orm.configure_mappers` function, is now organized to be on a
per-registry basis. This allows for example the mappers within a certain
declarative base to be configured, but not those of another base that is
also present in memory. The goal is to provide a means of reducing
application startup time by only running the "configure" process for sets
of mappers that are needed. This also adds the
:meth:`_orm.registry.configure` method that will run configure for the
mappers local in a particular registry only.

Fixes: #5897
Change-Id: I14bd96982d6d46e241bd6baa2cf97471d21e7caa
13 files changed:
doc/build/changelog/unreleased_14/5897.rst [new file with mode: 0644]
lib/sqlalchemy/orm/__init__.py
lib/sqlalchemy/orm/base.py
lib/sqlalchemy/orm/decl_api.py
lib/sqlalchemy/orm/instrumentation.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/relationships.py
test/aaa_profiling/test_memusage.py
test/ext/declarative/test_inheritance.py
test/orm/declarative/test_basic.py
test/orm/test_events.py
test/orm/test_mapper.py