summaryrefslogtreecommitdiff
path: root/test/ext/declarative
Commit message (Collapse)AuthorAgeFilesLines
* Limit init_subclass test above python 3.6Mike Bayer2020-07-081-1/+1
| | | | | | | | The commit for I1654befe9eb1c8b8e7fc0784bdbe64284614f0ea #5357 runs the test on all Python 3 versions, however we need to limit at least python 3.6 for this. Change-Id: Ie86b78bbfd8c7bd013ff9aa7f8905328d792c1b3
* Add **kw support to DeclarativeMeta.__init__EwenGillies2020-07-061-0/+28
| | | | | | | | | | | | | Added a ``**kw`` argument to the :meth:`.DeclarativeMeta.__init__` method. This allows a class to support the :pep:`487` metaclass hook ``__init_subclass__``. Pull request courtesy Ewen Gillies. Fixes: #5357 Closes: #5363 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5363 Pull-request-sha: 0ad05a768316cba03a4d312ab39d3e8fbca7ac54 Change-Id: I1654befe9eb1c8b8e7fc0784bdbe64284614f0ea
* Pass connection to TablesTest.insert_data()Mike Bayer2020-04-151-4/+5
| | | | | | | | | | towards the goal of reducing verbosity and repetition in test fixtures as well as that we are moving to connection only for execution, move the insert_data() classmethod to accept a connection and adjust all fixtures to use it. Change-Id: I3bf534acca0d5f4cda1d4da8ae91f1155b829b09
* Use dot-separated name resolution for relationship targetMike Bayer2020-04-071-16/+91
| | | | | | | | | | | | | | | The string argument accepted as the first positional argument by the :func:`.relationship` function when using the Declarative API is no longer interpreted using the Python ``eval()`` function; instead, the name is dot separated and the names are looked up directly in the name resolution dictionary without treating the value as a Python expression. However, passing a string argument to the other :func:`.relationship` parameters that necessarily must accept Python expressions will still use ``eval()``; the documentation has been clarified to ensure that there is no ambiguity that this is in use. Fixes: #5238 Change-Id: Id802f403190adfab0ca034afe2214ba10fd9cfbb
* Remove support for python 3.4Federico Caselli2020-03-301-1/+1
| | | | | | Also remove no longer used compat code Change-Id: Ifda239fd84b425e43f4028cb55a5b3b8efa4dfc6
* Simplified module pre-loading strategy and made it linter friendlyFederico Caselli2020-03-071-5/+9
| | | | | | | | | | | | | | | | | Introduced a modules registry to register modules that should be lazily loaded in the package init. This ensures that they are in the system module cache, avoiding potential thread safety issues as when importing them directly in the function that uses them. The module registry is used to obtain these modules directly, ensuring that the all the lazily loaded modules are resolved at the proper time This replaces dependency_for decorator and the dependencies decorator logic, removing the need to pass the resolved modules as arguments of the decodated functions and removes possible errors caused by linters. Fixes: #4689 Fixes: #4656 Change-Id: I2e291eba4297867fc0ddb5d875b9f7af34751d01
* Open up check for relationships that write to the same columnMike Bayer2020-02-271-1/+1
| | | | | | | | | | | | | | | Enhanced logic that tracks if relationships will be conflicting with each other when they write to the same column to include simple cases of two relationships that should have a "backref" between them. This means that if two relationships are not viewonly, are not linked with back_populates and are not otherwise in an inheriting sibling/overriding arrangement, and will populate the same foreign key column, a warning is emitted at mapper configuration time warning that a conflict may arise. A new parameter :paramref:`.relationship.overlaps` is added to suit those very rare cases where such an overlapping persistence arrangement may be unavoidable. Fixes: #5171 Change-Id: Ifae5998fc1c7e49ce059aec8a67c80cabee768ad
* Use expanding IN for all literal value IN expressionsMike Bayer2019-12-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The "expanding IN" feature, which generates IN expressions at query execution time which are based on the particular parameters associated with the statement execution, is now used for all IN expressions made against lists of literal values. This allows IN expressions to be fully cacheable independently of the list of values being passed, and also includes support for empty lists. For any scenario where the IN expression contains non-literal SQL expressions, the old behavior of pre-rendering for each position in the IN is maintained. The change also completes support for expanding IN with tuples, where previously type-specific bind processors weren't taking effect. As part of this change, a more explicit separation between "literal execute" and "post compile" bound parameters is being made; as the "ansi bind rules" feature is rendering bound parameters inline, as we now support "postcompile" generically, these should be used here, however we have to render literal values at execution time even for "expanding" parameters. new test fixtures etc. are added to assert everything goes to the right place. Fixes: #4645 Change-Id: Iaa2b7bfbfaaf5b80799ee17c9b8507293cba6ed1
* Enable F841Mike Bayer2019-06-201-1/+1
| | | | | | | | | | | This is a very useful assertion which prevents unused variables from being set up allows code to be more readable and sometimes even more efficient. test suites seem to be where the most problems are and there do not seem to be documentation examples that are using this, or at least the linter is not taking effect within rst blocks. Change-Id: I2b3341d8dd14da34879d8425838e66a4b9f8e27d
* Consult is_attrbute flag to determine descriptor; enable for assoc proxyMike Bayer2019-06-141-0/+9
| | | | | | | | | | | | Fixed bug where the :attr:`.Mapper.all_orm_descriptors` accessor would return an entry for the :class:`.Mapper` itself under the declarative ``__mapper___`` key, when this is not a descriptor. The ``.is_attribute`` flag that's present on all :class:`.InspectionAttr` objects is now consulted, which has also been modified to be ``True`` for an association proxy, as it was erroneously set to False for this object. Fixes: #4729 Change-Id: Ia02388cc25d004e32d337140b62a587f3e5a0b7b
* Adjust test_concurrency failure modesMike Bayer2019-05-271-5/+17
| | | | | | | | | The test added for #4686 can raise for "B" missing which is normal and should not fail the test. Also ensure mappers are cleared to prevent subsequent tests elsewhere from being affected. Change-Id: I4c5791223e7fd21e04dcd095daa7d868e77dbd97
* Implement new ClauseElement role and coercion systemMike Bayer2019-05-182-8/+8
| | | | | | | | | | | | | | | | | | | | A major refactoring of all the functions handle all detection of Core argument types as well as perform coercions into a new class hierarchy based on "roles", each of which identify a syntactical location within a SQL statement. In contrast to the ClauseElement hierarchy that identifies "what" each object is syntactically, the SQLRole hierarchy identifies the "where does it go" of each object syntactically. From this we define a consistent type checking and coercion system that establishes well defined behviors. This is a breakout of the patch that is reorganizing select() constructs to no longer be in the FromClause hierarchy. Also includes a rename of as_scalar() into scalar_subquery(); deprecates automatic coercion to scalar_subquery(). Partially-fixes: #4617 Change-Id: I26f1e78898693c6b99ef7ea2f4e7dfd0e8e1a1bd
* Mutex the declarative scan/map process against configure_mappers()Mike Bayer2019-05-161-0/+78
| | | | | | | | | | | | | Applied the mapper "configure mutex" against the declarative class mapping process, to guard against the race which can occur if mappers are used while dynamic module import schemes are still in the process of configuring mappers for related classes. This does not guard against all possible race conditions, such as if the concurrent import has not yet encountered the dependent classes as of yet, however it guards against as much as possible within the SQLAlchemy declarative process. Fixes: #4686 Change-Id: I0349036b8078bd42265ab40862cfbfe5bf9d5b44
* Add informative failure modes to _DeferredMapperConfigMike Bayer2019-01-303-2/+116
| | | | | | | | | | | Added some helper exceptions that invoke when a mapping based on :class:`.AbstractConcreteBase`, :class:`.DeferredReflection`, or :class:`.AutoMap` is used before the mapping is ready to be used, which contain descriptive information on the class, rather than falling through into other failure modes that are less informative. Fixes: #4470 Change-Id: I9bc51697f63cedaa7809a0adb17b2398c209e289
* Improve error messages in the area of loader optionsMike Bayer2019-01-251-1/+1
| | | | | | | | | Improved error messages emitted by the ORM in the area of loader option traversal. This includes early detection of mis-matched loader strategies along with a clearer explanation why these strategies don't match. Fixes: #4433 Change-Id: I3351b64241f7f62ca141a0be95085e6ef8ca6d32
* Add deprecation warnings to all deprecated APIsMike Bayer2019-01-231-38/+0
| | | | | | | | | | | | | | | A large change throughout the library has ensured that all objects, parameters, and behaviors which have been noted as deprecated or legacy now emit ``DeprecationWarning`` warnings when invoked. As the Python 3 interpreter now defaults to displaying deprecation warnings, as well as that modern test suites based on tools like tox and pytest tend to display deprecation warnings, this change should make it easier to note what API features are obsolete. See the notes added to the changelog and migration notes for further details. Fixes: #4393 Change-Id: If0ea11a1fc24f9a8029352eeadfc49a7a54c0a1b
* Add standalone orm.close_all method and deprecate SessionMaker.close_allAugustin Trancart2019-01-123-3/+6
| | | | | | | | | | | | | | | Added a new function :func:`.close_all_sessions` which takes over the task of the :meth:`.Session.close_all` method, which is now deprecated as this is confusing as a classmethod. Pull request courtesy Augustin Trancart. Fixes: #4412 Closes: #4438 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4438 Pull-request-sha: 7833d12a9898c82d50716427144bf3276c22ab3f Change-Id: Ib35eaa520ae886f3f8f550f9712fc3b139e00b60
* Post black reformattingMike Bayer2019-01-065-116/+130
| | | | | | | | | | | | | Applied on top of a pure run of black -l 79 in I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes resolves all remaining flake8 conditions for those codes we have enabled in setup.cfg. Included are resolutions for all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
* Run black -l 79 against all source filesMike Bayer2019-01-065-2207/+2629
| | | | | | | | | | | | | | This is a straight reformat run using black as is, with no edits applied at all. The black run will format code consistently, however in some cases that are prevalent in SQLAlchemy code it produces too-long lines. The too-long lines will be resolved in the following commit that will resolve all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
* Assorted pre-Black fixesMike Bayer2019-01-051-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes to the test suite, a few errant imports, and setup.py: - mysql and postgresql have unused 'json' imports; remove - postgresql is exporting the 'json' symbol, remove - make sure setup.py can find __version__ using " or ' - retry logic in provision create database for postgresql fixed - refactor test_magazine to use cls.tables rather than globals - remove unused class in test_scoping - add a comment to test_deprecations that this test suite itself is deprecated - don't use mapper() and orm_mapper() in test_unitofwork, just use mapper() - remove dupe test_scalar_set_None test in test_attributes - Python 2.7 and above includes unittest.SkipTest, remove pre-2.7 fallback - use imported SkipTest in profiling - declarative test_reflection tests with "reflectable_autoincrement" already don't run on oracle or firebird; remove conditional logic for these, which also removes an "id" symbol - clean up test in test_functions, remove print statement - remove dupe test_literal_processor_coercion_native_int_out_of_range in test/sql/test_types.py - fix psycopg2_hstore ref Change-Id: I7b3444f8546aac82be81cd1e7b6d8b2ad6834fe6
* "left" -> "accidentally placed at"Mike Bayer2018-12-021-11/+5
| | | | | | | | | | | since "left" is kind of ambiguous, use more explicit terminology here. Also update the test to use a positive assertion that the warning is emitted; quote the attribute name. Change-Id: Ic2284c200a26b32b2da063cfaf6d59547309d587 References: https://github.com/zzzeek/sqlalchemy/pull/488
* Merge "Add __clause_element__ to ColumnProperty"mike bayer2018-11-301-2/+49
|\
| * Add __clause_element__ to ColumnPropertyMike Bayer2018-11-271-2/+49
| | | | | | | | | | | | | | | | | | | | | | | | Added a ``__clause_element__()`` method to :class:`.ColumnProperty` which can allow the usage of a not-fully-declared column or deferred attribute in a declarative mapped class slightly more friendly when it's used in a constraint or other column-oriented scenario within the class declaration, though this still can't work in open-ended expressions; prefer to call the :attr:`.ColumnProperty.expression` attribute if receiving ``TypeError``. Fixes: #4372 Change-Id: I5d3d1adb9c77de0566298bc2c46e9001d314b0c7
* | Warn for lower-case column attribute on declarativeMike Bayer2018-11-261-0/+57
|/ | | | | | | | | A warning is emitted in the case that a :func:`.column` object is applied to a declarative class, as it seems likely this intended to be a :class:`.Column` object. Fixes: #4374 Change-Id: I2e617ef65547162e3ba6587c168548ad0cf6203d
* Move pk on single-inh subclass check below conflict resolution checkTom Manderson2018-10-301-0/+69
| | | | | | | | | | | | The column conflict resolution technique discussed at :ref:`declarative_column_conflicts` is now functional for a :class:`.Column` that is also a primary key column. Previously, a check for primary key columns declared on a single-inheritance subclass would occur before the column copy were allowed to pass. Fixes: #4352 Change-Id: Id4c025da53c28e58db6b549fe398f25f8a90d355 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/483
* Check more specifically for hybrid attr and not mapped propertyMike Bayer2018-10-191-2/+51
| | | | | | | | | | Fixed regression caused by :ticket:`4326` in version 1.2.12 where using :class:`.declared_attr` with a mixin in conjunction with :func:`.orm.synonym` would fail to map the synonym properly to an inherited subclass. Fixes: #4350 Change-Id: Ib2a9b6a125a2ac7c7ff80201746b7f10e5596226
* Unwrap Proxy objects when scanning declared_attrMike Bayer2018-08-231-0/+46
| | | | | | | | | | | | Fixed bug where the declarative scan for attributes would receive the expression proxy delivered by a hybrid attribute at the class level, and not the hybrid attribute itself, when receiving the descriptor via the ``@declared_attr`` callable on a subclass of an already-mapped class. This would lead to an attribute that did not report itself as a hybrid when viewed within :attr:`.Mapper.all_orm_descriptors`. Fixes: #4326 Change-Id: I582d03f05c3768b3344f93e3791240e9e69b9d1e
* Accommodate for classically mapped base classes in declarativeMike Bayer2018-08-171-2/+91
| | | | | | | | | | | | | | | Fixed issue in previously untested use case, allowing a declarative mapped class to inherit from a classically-mapped class outside of the declarative base, including that it accommodates for unmapped intermediate classes. An unmapped intermediate class may specify ``__abstract__``, which is now interpreted correctly, or the intermediate class can remain unmarked, and the classically mapped base class will be detected within the hierarchy regardless. In order to anticipate existing scenarios which may be mixing in classical mappings into existing declarative hierarchies, an error is now raised if multiple mapped bases are detected for a given class. Fixes: #4321 Change-Id: I8604ecfd170d2589d9d1b1c87ba303762071fc30
* Expire memoizations on setattr/delattr, check in delattrMike Bayer2018-07-091-1/+64
| | | | | | | | | | | | | Fixed bug where declarative would not update the state of the :class:`.Mapper` as far as what attributes were present, when additional attributes were added or removed after the mapper attribute collections had already been called and memoized. Addtionally, a ``NotImplementedError`` is now raised if a fully mapped attribute (e.g. column, relationship, etc.) is deleted from a class that is currently mapped, since the mapper will not function correctly if the attribute has been removed. Change-Id: Idaca8e0237b31aa1d6564d94c3a179d7dc6b5df9 Fixes: #4133
* Don't warn for mixin-based __table_args__, __mapper_args__ declared_attrMike Bayer2018-03-211-0/+13
| | | | | | | | | | | | Removed a warning that would be emitted when calling upon ``__table_args__``, ``__mapper_args__`` as named with a ``@declared_attr`` method, when called from a non-mapped declarative mixin. Calling these directly is documented as the approach to use when one is overidding one of these methods on a mapped class. The warning still emits for regular attribute names. Change-Id: Iae7ed0bd625a2c163c910aa777cef4779128580a Fixes: #4221
* Filter attributes we don't map during a load_scalar_attributesMike Bayer2017-10-281-0/+53
| | | | | | | | | | | | | | Fixed bug where a descriptor that is elsewhere a mapped column or relationship within a hierarchy based on :class:`.AbstractConcreteBase` would be referred towards during a refresh operation, causing an error as the attribute is not mapped as a mapper property. A similar issue can arise for other attributes like the "type" column added by :class:`.AbstractConcreteBase` if the class fails to include "concrete=True" in its mapper, however the check here should also prevent that scenario from causing a problem. Change-Id: I407b07a3a3e2c374da19fc86ed44b987d595dcfa Fixes: #4124
* Remove unused .cascading from unit test for __table_cls__ featureMike Bayer2017-09-281-1/+1
| | | | | | | | | | Two independent gerrits for 04bbad660bcbb7b920f3e75110a7b1187d9ddc38 and ec1700ba29f7f15859ee6576855a4d6675265640 produce a failure when merged due to new warning. will merge into rel_1_1 as well for completeness even though warning is not there. Change-Id: I1bd494d205107d8b2a30d475a22c61a59b70985b
* Merge "Document and test __table_cls__"mike bayer2017-09-271-1/+40
|\
| * Document and test __table_cls__ticket_4082Mike Bayer2017-09-261-1/+40
| | | | | | | | | | | | | | | | | | | | A use case has been identified for __table_cls__, which was added in 1.0 just for the purpose of test fixtures. Add this to public API and ensure the target use case (conditional table generation) stays supported. Change-Id: I87be5bcb72205cab89871fa586663bf147450995 Fixes: #4082
* | Warnings for @declared_attr.cascadingticket_4091Mike Bayer2017-09-261-1/+40
|/ | | | | | | | | | | | | | | | | | | | | A warning is emitted if a subclass attempts to override an attribute that was declared on a superclass using ``@declared_attr.cascading`` that the overridden attribute will be ignored. This use case cannot be fully supported down to further subclasses without more complex development efforts, so for consistency the "cascading" is honored all the way down regardless of overriding attributes. A warning is emitted if the ``@declared_attr.cascading`` attribute is used with a special declarative name such as ``__tablename__``, as this has no effect. Ensure that documenation refers to the current inconsistency that __tablename__ can be overridden by subclasses however @declared_attr.cascading cannot. Fixes: #4091 Fixes: #4092 Change-Id: I3aecdb2f99d408e404a1223f5ad86ae3c7fdf036
* Warn when declared_attr.cascading detected on mapped classMike Bayer2017-06-062-2/+39
| | | | | | | | | | | | | | A warning is emitted if the :attr:`.declared_attr.cascading` modifier is used with a declarative attribute that is itself declared on a class that is to be mapped, as opposed to a declarative mixin class or ``__abstract__`` class. The :attr:`.declared_attr.cascading` modifier currently only applies to mixin/abstract classes. Also add a test for @declared_attr.cascading when used on an attribute on __abstract__. Change-Id: Ib1b9dbe373e8be1cf24eadfed224a8988b3cd95d Fixes: #3847
* Don't hard-evaluate non-ORM @declared_attr for AbstractConcreteBaseMike Bayer2017-05-261-0/+63
| | | | | | | | | | | | | | | | Fixed bug where using :class:`.declared_attr` on an :class:`.AbstractConcreteBase` where a particular return value were some non-mapped symbol, including ``None``, would cause the attribute to hard-evaluate just once and store the value to the object dictionary, not allowing it to invoke for subclasses. This behavior is normal when :class:`.declared_attr` is on a mapped class, and does not occur on a mixin or abstract class. Since :class:`.AbstractConcreteBase` is both "abstract" and actually "mapped", a special exception case is made here so that the "abstract" behavior takes precedence for :class:`.declared_attr`. Change-Id: I6160ebb3a52c441d6a4b663c8c9bbac6d37fa417 Fixes: #3848
* Make all tests to be PEP8 compliantKhairi Hafsham2017-02-073-3/+3
| | | | | | | | tested using pycodestyle version 2.2.0 Fixes: #3885 Change-Id: I5df43adc3aefe318f9eeab72a078247a548ec566 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/343
* Union the exclude_properties of the inheriting mapper in declarativeMike Bayer2017-01-301-1/+38
| | | | | | | | | | Fixed bug where the "automatic exclude" feature of declarative that ensures a column local to a single table inheritance subclass does not appear as an attribute on other derivations of the base would not take effect for multiple levels of subclassing from the base. Change-Id: Ibf67b631b4870dd1bd159f7d6085549d299fffe0 Fixes: #3895
* Support python3.6Mike Bayer2017-01-131-2/+2
| | | | | | | | | | | Corrects some warnings and adds tox config. Adds DeprecationWarning to the error category. Large sweep for string literals w/ backslashes as this is common in docstrings Co-authored-by: Andrii Soldatenko Fixes: #3886 Change-Id: Ia7c838dfbbe70b262622ed0803d581edc736e085 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/337
* Add the "triggering mapper" to the configure_mappers error message.John Perkins2016-09-201-3/+4
| | | | | | | | | | There are cases where the originating mapper name is not present in the exception message, such as relationship initialization against an unmapped class. Ensure the originating mapper is named in the string output. Pull-request: https://github.com/zzzeek/sqlalchemy/pull/298 Change-Id: I9f23bfa90b26dde9229ab7ec812eec9ceae48153
* Repair foreign_keys population for Join._refresh_for_new_columnMike Bayer2016-09-151-1/+51
| | | | | | | | | | Fixed bug where setting up a single-table inh subclass of a joined-table subclass which included an extra column would corrupt the foreign keys collection of the mapped table, thereby interfering with the initialization of relationships. Change-Id: I04a0cf98fd456d12d5a5b9e77a46a01246969a63 Fixes: #3797
* Add docstring to declarative_baseFrazer McLean2016-08-061-0/+9
| | | | | Change-Id: I5ad44362515908592f1e8b1e6254a5270d43234a Pull-request: https://github.com/zzzeek/sqlalchemy/pull/295
* Deprecate Mapper.order_byMike Bayer2016-04-191-2/+2
| | | | | | | | | | | This is an old parameter no longer relevant to how SQLAlchemy works, once the Query object was introduced. By deprecating it we establish that we aren't supporting non-working use cases and that we encourage applications to move off of the use of this parameter. Fixes: #3394 Change-Id: I25b9a38142a1537bbcb27d3e8b66a8b265140072
* py2k: accept unicode literals on :func:`backref`, toopr/212Nils Philippsen2015-11-251-0/+23
| | | | | | | | Fixed bug where in Py2K a unicode literal would not be accepted as the string name of a class or other argument within declarative using :func:`.backref` on :func:`.relationship`. amends commit e6f67f48054d906856f879bc1803ea639aa4b670
* - exclude this from unpredictable gcMike Bayer2015-10-111-1/+1
|
* - The system by which a :class:`.Column` considers itself to be anMike Bayer2015-10-071-2/+1
| | | | | | | | | | | | | | | | | "auto increment" column has been changed, such that autoincrement is no longer implicitly enabled for a :class:`.Table` that has a composite primary key. In order to accommodate being able to enable autoincrement for a composite PK member column while at the same time maintaining SQLAlchemy's long standing behavior of enabling implicit autoincrement for a single integer primary key, a third state has been added to the :paramref:`.Column.autoincrement` parameter ``"auto"``, which is now the default. fixes #3216 - The MySQL dialect no longer generates an extra "KEY" directive when generating CREATE TABLE DDL for a table using InnoDB with a composite primary key with AUTO_INCREMENT on a column that isn't the first column; to overcome InnoDB's limitation here, the PRIMARY KEY constraint is now generated with the AUTO_INCREMENT column placed first in the list of columns.
* - Fixed bug in :class:`.AbstractConcreteBase` extension whereMike Bayer2015-07-131-0/+30
| | | | | | | | | a column setup on the ABC base which had a different attribute name vs. column name would not be correctly mapped on the final base class. The failure on 0.9 would be silent whereas on 1.0 it raised an ArgumentError, so may not have been noticed prior to 1.0. fixes #3480
* - Fixed a regression regarding the :meth:`.MapperEvents.instrument_class`Mike Bayer2015-04-261-1/+30
| | | | | | | | | | | | | | | | | event where its invocation was moved to be after the class manager's instrumentation of the class, which is the opposite of what the documentation for the event explicitly states. The rationale for the switch was due to Declarative taking the step of setting up the full "instrumentation manager" for a class before it was mapped for the purpose of the new ``@declared_attr`` features described in :ref:`feature_3150`, but the change was also made against the classical use of :func:`.mapper` for consistency. However, SQLSoup relies upon the instrumentation event happening before any instrumentation under classical mapping. The behavior is reverted in the case of classical and declarative mapping, the latter implemented by using a simple memoization without using class manager. fixes #3388
* - Fixed regression regarding the declarative ``__declare_first__``Mike Bayer2015-04-242-2/+88
| | | | | | and ``__declare_last__`` accessors where these would no longer be called on the superclass of the declarative base. fixes #3383