]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add new infrastructure to support greater use of __slots__
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 18 Jan 2022 22:00:16 +0000 (17:00 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 21 Jan 2022 16:46:51 +0000 (11:46 -0500)
commitd46a4c0326bd2e697794514b920e6727d5153324
treeb3368bc6d402148d46317b4532db6b92352bd666
parent7d9b811555a88dd2f1cb1520027546b87383e159
Add new infrastructure to support greater use of __slots__

* Changed AliasedInsp to use __slots__
* Migrated all of strategy_options to use __slots__ for objects.
  Adds new infrastructure to traversals to support shallow
  copy, to dict and from dict based on internal traversal
  attributes.  Load / _LoadElement then leverage this to
  provide clone / generative / getstate without the need
  for __dict__ or explicit attribute lists.

Doing this change revealed that there are lots of things that
trigger off of whether or not a class has a __visit_name__ attribute.
so to suit that we've gone back to having Visitable, which is
a better name than Traversible at this point  (I think
Traversible is mis-spelled too).

Change-Id: I13d04e494339fac9dbda0b8e78153418abebaf72
References: #7527
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/strategy_options.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/sql/base.py
lib/sqlalchemy/sql/cache_key.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/traversals.py
lib/sqlalchemy/sql/visitors.py
lib/sqlalchemy/util/langhelpers.py
test/orm/test_options.py
test/orm/test_pickled.py