summaryrefslogtreecommitdiff
path: root/test/ext/declarative
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed an extremely unlikely memory issue where when usingMike Bayer2014-01-031-2/+18
| | | | | | | | | | :class:`.DeferredReflection` to define classes pending for reflection, if some subset of those classes were discarded before the :meth:`.DeferredReflection.prepare` method were called to reflect and map the class, a strong reference to the class would remain held within the declarative internals. This internal collection of "classes to map" now uses weak references against the classes themselves.
* - A quasi-regression where apparently in 0.8 you can set a class-levelMike Bayer2014-01-021-1/+59
| | | | | | | | | | | attribute on declarative to simply refer directly to an :class:`.InstrumentedAttribute` on a superclass or on the class itself, and it acts more or less like a synonym; in 0.9, this fails to set up enough bookkeeping to keep up with the more liberalized backref logic from :ticket:`2789`. Even though this use case was never directly considered, it is now detected by declarative at the "setattr()" level as well as when setting up a subclass, and the mirrored/renamed attribute is now set up as a :func:`.synonym` instead. [ticket:2900]
* - Declarative does an extra check to detect if the sameMike Bayer2013-12-271-0/+33
| | | | | | | :class:`.Column` is mapped multiple times under different properties (which typically should be a :func:`.synonym` instead) or if two or more :class:`.Column` objects are given the same name, raising a warning if this condition is detected. [ticket:2828]
* - Error message when a string arg sent to :func:`.relationship` whichMike Bayer2013-12-121-0/+32
| | | | | | | doesn't resolve to a class or mapper has been corrected to work the same way as when a non-string arg is received, which indicates the name of the relationship which had the configurational error. [ticket:2888]
* - The :class:`.DeferredReflection` class has been enhanced to provideMike Bayer2013-12-031-29/+83
| | | | | | | | | | | | | | | | automatic reflection support for the "secondary" table referred to by a :func:`.relationship`. "secondary", when specified either as a string table name, or as a :class:`.Table` object with only a name and :class:`.MetaData` object will also be included in the reflection process when :meth:`.DeferredReflection.prepare` is called. [ticket:2865] - clsregistry._resolver() now uses a stateful _class_resolver() class in order to handle the work of mapping strings to objects. This is to provide for simpler extensibility, namely a ._resolvers collection of ad-hoc name resolution functions; the DeferredReflection class adds its own resolver here in order to handle relationship(secondary) names which generate new Table objects.
* Fixed bug where in Py2K a unicode literal would not be acceptedMike Bayer2013-11-291-1/+21
| | | | | as the string name of a class or other argument within declarative using :func:`.relationship`.
* - A rework to the way that "quoted" identifiers are handled, in thatMike Bayer2013-08-271-2/+4
| | | | | | | | | | | | | | | | instead of relying upon various ``quote=True`` flags being passed around, these flags are converted into rich string objects with quoting information included at the point at which they are passed to common schema constructs like :class:`.Table`, :class:`.Column`, etc. This solves the issue of various methods that don't correctly honor the "quote" flag such as :meth:`.Engine.has_table` and related methods. The :class:`.quoted_name` object is a string subclass that can also be used explicitly if needed; the object will hold onto the quoting preferences passed and will also bypass the "name normalization" performed by dialects that standardize on uppercase symbols, such as Oracle, Firebird and DB2. The upshot is that the "uppercase" backends can now work with force-quoted names, such as lowercase-quoted names and new reserved words. [ticket:2812]
* - apply an import refactoring to the ORM as wellMike Bayer2013-08-141-2/+2
| | | | | | | | | - rework the event system so that event modules load after their targets, dependencies are reversed - create an improved strategy lookup system for the ORM - rework the ORM to have very few import cycles - move out "importlater" to just util.dependency - other tricks to cross-populate modules in as clear a way as possible
* ORM descriptors such as hybrid properties can now be referencedMike Bayer2013-07-021-2/+37
| | | | | | by name in a string argument used with ``order_by``, ``primaryjoin``, or similar in :func:`.relationship`, in addition to column-bound attributes. [ticket:2761]
* extension testsMike Bayer2013-05-261-3/+3
|
* - the raw 2to3 runMike Bayer2013-04-274-21/+20
| | | | - went through examples/ and cleaned out excess list() calls
* formattingMike Bayer2013-04-241-47/+48
|
* Fixed indirect regression regarding :func:`.has_inherited_table`,Mike Bayer2013-04-091-1/+42
| | | | | | | | | | | where since it considers the current class' ``__table__``, was sensitive to when it was called. This is 0.7's behavior also, but in 0.7 things tended to "work out" within events like ``__mapper_args__()``. :func:`.has_inherited_table` now only considers superclasses, so should return the same answer regarding the current class no matter when it's called (obviously assuming the state of the superclass). [ticket:2656]
* Allow use of synonyms in primaryjoin / secondaryjoin conditionsRichard Mitchell2012-11-271-1/+40
|
* - store only MultipleClassMarkers inside of ModuleMarker, thenMike Bayer2012-10-281-7/+44
| | | | | | store ModuleMarkers for multiple roots, one for each token in a module path. this allows partial path resolution. - docs to this effect
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-275-22/+22
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* - [bug] Fixed a disconnect that slowly evolvedMike Bayer2012-09-141-6/+65
| | | | | | | | | | | between a @declared_attr Column and a directly-defined Column on a mixin. In both cases, the Column will be applied to the declared class' table, but not to that of a joined inheritance subclass. Previously, the directly-defined Column would be placed on both the base and the sub table, which isn't typically what's desired. [ticket:2565]
* - add req's for predictable gcMike Bayer2012-09-051-0/+2
|
* oops, one moreMike Bayer2012-08-291-0/+2
|
* - skip this on oracleMike Bayer2012-08-291-0/+2
|
* - [feature] declared_attr can now be used withMike Bayer2012-08-271-0/+56
| | | | | | attributes that are not Column or MapperProperty; including any user-defined value as well as association proxy objects. [ticket:2517]
* - [feature] Conflicts between columns onMike Bayer2012-08-273-20/+133
| | | | | | | single-inheritance declarative subclasses, with or without using a mixin, can be resolved using a new @declared_attr usage described in the documentation. [ticket:2472]
* remove duped testMike Bayer2012-08-151-36/+0
|
* - [bug] Declarative can now propagate a columnMike Bayer2012-08-151-0/+24
| | | | | | | | declared on a single-table inheritance subclass up to the parent class' table, when the parent class is itself mapped to a join() or select() statement, directly or via joined inheritane, and not just a Table. [ticket:2549]
* - adjustments for py3.3 unit tests, [ticket:2542]Mike Bayer2012-08-111-2/+2
|
* - reorganization of declarative such that file sizes are managable again.Mike Bayer2012-08-056-0/+4300
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.