]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- reorganization of declarative such that file sizes are managable again.
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 5 Aug 2012 19:14:51 +0000 (15:14 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 5 Aug 2012 19:14:51 +0000 (15:14 -0400)
commit6bd46945ccd585c494eb7550a0dfea22f17727c0
tree4412d12bb42af58a1c30f7f961f77acb2fa35386
parenta4f2db890322a225e6c9754b711f5c16d04f377c
- reorganization of declarative such that file sizes are managable again.
the vast majority of file lines are spent on documentation, which moves
into package __init__.  The core declarative idea lives in base and
is back down to its originally low size of under 500 lines.  The various
helpers and such move into api.py, and the full span of string lookup
moves into a new module clsregistry.  the rest of declarative only
refers to two functions in clsregistry in three places inside of base.
- [feature] Declarative now maintains a registry
of classes by string name as well as by full
module-qualified name.   Multiple classes with the
same name can now be looked up based on a module-qualified
string within relationship().   Simple class name
lookups where more than one class shares the same
name now raises an informative error message.
[ticket:2338]
- lots of tests to ensure the new weak referencing memory management
is maintained by the new class registry system.   this ticket was
served very well by waiting to do #2526 first, else this would
have needed to be rewritten anyway.
CHANGES
lib/sqlalchemy/ext/declarative/__init__.py [moved from lib/sqlalchemy/ext/declarative.py with 50% similarity, mode: 0644]
lib/sqlalchemy/ext/declarative/api.py [new file with mode: 0644]
lib/sqlalchemy/ext/declarative/base.py [new file with mode: 0644]
lib/sqlalchemy/ext/declarative/clsregistry.py [new file with mode: 0644]
test/ext/declarative/__init__.py [new file with mode: 0644]
test/ext/declarative/test_basic.py [moved from test/ext/test_declarative.py with 97% similarity]
test/ext/declarative/test_clsregistry.py [new file with mode: 0644]
test/ext/declarative/test_inheritance.py [moved from test/ext/test_declarative_inheritance.py with 99% similarity]
test/ext/declarative/test_mixin.py [moved from test/ext/test_declarative_mixin.py with 100% similarity]
test/ext/declarative/test_reflection.py [moved from test/ext/test_declarative_reflection.py with 99% similarity]