Mike Bayer [Sun, 24 Jun 2012 06:06:10 +0000 (02:06 -0400)]
- [moved] The InstrumentationManager interface
and the entire related system of alternate
class implementation is now moved out
to sqlalchemy.ext.instrumentation. This is
a seldom used system that adds significant
complexity and overhead to the mechanics of
class instrumentation. The new architecture
allows it to remain unused until
InstrumentationManager is actually imported,
at which point it is bootstrapped into
the core.
Mike Bayer [Sat, 23 Jun 2012 18:45:47 +0000 (14:45 -0400)]
- move all of orm to use absolute imports
- break out key mechanics of loading objects
into new "orm.loading" module, removing implementation
details from both mapper.py and query.py. is analogous
to persistence.py
- some other cleanup and old cruft removal
Mike Bayer [Fri, 22 Jun 2012 16:42:01 +0000 (12:42 -0400)]
- [bug] Fixed bug whereby if a database restart
affected multiple connections, each
connection would individually invoke a new
disposal of the pool, even though only
one disposal is needed. [ticket:2522]
Mike Bayer [Fri, 22 Jun 2012 16:24:08 +0000 (12:24 -0400)]
- [bug] Fixed bug whereby
a disconnect detect + dispose that occurs
when the QueuePool has threads waiting
for connections would leave those
threads waiting for the duration of
the timeout on the old pool. The fix
now notifies those waiters with a special
exception case and has them move onto
the new pool. This fix may or may
not be ported to 0.7. [ticket:2522]
Mike Bayer [Thu, 21 Jun 2012 20:49:29 +0000 (16:49 -0400)]
- [bug] quoting is applied to the column names
inside the WITH RECURSIVE clause of a
common table expression according to the
quoting rules for the originating Column.
[ticket:2512]
Mike Bayer [Thu, 21 Jun 2012 20:32:38 +0000 (16:32 -0400)]
- [feature] Added "MATCH" clause to ForeignKey,
ForeignKeyConstraint, courtesy Ryan Kelly.
[ticket:2502]
- [feature] Added support for DELETE and UPDATE from
an alias of a table, which would assumedly
be related to itself elsewhere in the query,
courtesy Ryan Kelly. [ticket:2507]
- [feature] Added support for the Postgresql ONLY
keyword, which can appear corresponding to a
table in a SELECT, UPDATE, or DELETE statement.
The phrase is established using with_hint().
Courtesy Ryan Kelly [ticket:2506]
Mike Bayer [Thu, 21 Jun 2012 18:55:04 +0000 (14:55 -0400)]
- [bug] Fixed regression introduced in 0.7.6
whereby the FROM list of a SELECT statement
could be incorrect in certain "clone+replace"
scenarios. [ticket:2518]
Mike Bayer [Wed, 20 Jun 2012 23:28:29 +0000 (19:28 -0400)]
- [feature] The of_type() construct on attributes
now accepts aliased() class constructs as well
as with_polymorphic constructs, and works with
query.join(), any(), has(), and also
eager loaders subqueryload(), joinedload(),
contains_eager()
[ticket:2438] [ticket:1106]
- a rewrite of the query path system to use an
object based approach for more succinct usage. the system
has been designed carefully to not add an excessive method overhead.
- [feature] select() features a correlate_except()
method, auto correlates all selectables except those
passed. Is needed here for the updated any()/has()
functionality.
- remove some old cruft from LoaderStrategy, init(),debug_callable()
- use a namedtuple for _extended_entity_info. This method should
become standard within the orm internals
- some tweaks to the memory profile tests, number of runs can
be customized to work around pysqlite's very annoying behavior
- try to simplify PropertyOption._get_paths(), rename to _process_paths(),
returns a single list now. overall works more completely as was needed
for of_type() functionality
Mike Bayer [Wed, 20 Jun 2012 22:55:13 +0000 (18:55 -0400)]
- [feature] Dramatic improvement in memory
usage of the event system; instance-level
collections are no longer created for a
particular type of event until
instance-level listeners are established
for that event. [ticket:2516] Also in 0.7.9.
Mike Bayer [Sat, 16 Jun 2012 23:02:48 +0000 (19:02 -0400)]
- [bug] Fixed bug whereby append_column()
wouldn't function correctly on a cloned
select() construct, courtesy
Gunnlaugur Por Briem. [ticket:2482]
Also in 0.7.8.
Mike Bayer [Sat, 16 Jun 2012 22:41:54 +0000 (18:41 -0400)]
- [bug] The ResultProxy methods inserted_primary_key,
last_updated_params(), last_inserted_params(),
postfetch_cols(), prefetch_cols() all
assert that the given statement is a compiled
construct, and is an insert() or update()
statement as is appropriate, else
raise InvalidRequestError. [ticket:2498]
- ResultProxy.last_inserted_ids is removed,
replaced by inserted_primary_key.
Mike Bayer [Wed, 13 Jun 2012 22:21:42 +0000 (18:21 -0400)]
- [bug] Repaired common table expression
rendering to function correctly when the
SELECT statement contains UNION or other
compound expressions, courtesy btbuilder.
[ticket:2490]
Mike Bayer [Tue, 12 Jun 2012 00:11:05 +0000 (20:11 -0400)]
- [bug] Fixed bug affecting Py3K whereby
string positional parameters passed to
engine/connection execute() would fail to be
interpreted correctly, due to __iter__
being present on Py3K string.
[ticket:2503]. Also in 0.7.8.
Mike Bayer [Fri, 8 Jun 2012 19:56:58 +0000 (15:56 -0400)]
Add some `Sphinx` related version informations paragraph-level markups,
such as ``.. versionaddedd::``, ``.. versionchanged::`` and ``.. deprecated::``.
Mike Bayer [Fri, 1 Jun 2012 20:22:44 +0000 (16:22 -0400)]
- [bug] Fixed memory leak in C version of
result proxy whereby DBAPIs which don't deliver
pure Python tuples for result rows would
fail to decrement refcounts correctly.
The most prominently affected DBAPI
is pyodbc. [ticket:2489]
Mike Bayer [Thu, 24 May 2012 22:49:23 +0000 (18:49 -0400)]
- [bug] Dialect no longer emits expensive server
collations query, as well as server casing,
on first connect. These functions are still
available as semi-private. [ticket:2404]
Mike Bayer [Thu, 24 May 2012 14:58:43 +0000 (10:58 -0400)]
- identify another condition, indirectly via #2491, where
remote/local detection was regressing vs. 0.7. use a more
liberal check for "tables overlap".
Mike Bayer [Thu, 24 May 2012 14:17:54 +0000 (10:17 -0400)]
- [bug] Fixed bug in declarative
whereby the precedence of columns
in a joined-table, composite
column (typically for id) would fail to
be correct if the columns contained
names distinct from their attribute
names. This would cause things like
primaryjoin conditions made against the
entity attributes to be incorrect. Related
to [ticket:1892] as this was supposed
to be part of that, this is [ticket:2491].
Also in 0.7.8.
Mike Bayer [Fri, 18 May 2012 14:55:28 +0000 (10:55 -0400)]
- reorganize the usage of __mapper_args__ so that it's only
called after the __prepare__() step, if any, so that everything to
do with the mapping occurs after the table is reflected.
Mike Bayer [Thu, 17 May 2012 19:48:39 +0000 (15:48 -0400)]
- [feature] Added utility feature
Session.enable_relationship_loading(),
supersedes relationship.load_on_pending.
Both features should be avoided, however.
[ticket:2372]
Mike Bayer [Thu, 17 May 2012 18:18:05 +0000 (14:18 -0400)]
- [bug] Fixed bug whereby subqueryload() from
a polymorphic mapping to a target would incur
a new invocation of the query for each
distinct class encountered in the polymorphic
result. [ticket:2480]. Also in 0.7.8.
Mike Bayer [Thu, 17 May 2012 15:45:05 +0000 (11:45 -0400)]
- [feature] The "deferred declarative
reflection" system has been moved into the
declarative extension itself, using the
new DeferredReflection class. This
class is now tested with both single
and joined table inheritance use cases.
[ticket:2485]
- [bug] The autoload_replace flag on Table,
when False, will cause any reflected foreign key
constraints which refer to already-declared
columns to be skipped, assuming that the
in-Python declared column will take over
the task of specifying in-Python ForeignKey
or ForeignKeyConstraint declarations.
Mike Bayer [Tue, 15 May 2012 15:57:30 +0000 (17:57 +0200)]
implement support for __prepare__ declarative method. this signals that
the mapping should not be constructed immediately; instead, the info for
the mapping is placed into an interm object _MapperThingy which serves
as the mapper for the purposes of figuring out inheritance, etc. Later,
the prepare_deferred_mapping() function can be called given a base which
will invoke __prepare__ for each mapped class.
Mike Bayer [Fri, 4 May 2012 23:27:57 +0000 (19:27 -0400)]
- [bug] Fixed issue in unit of work
whereby setting a non-None self-referential
many-to-one relationship to None
would fail to persist the change if the
former value was not already loaded.
[ticket:2477].
Mike Bayer [Fri, 4 May 2012 22:40:55 +0000 (18:40 -0400)]
- [bug] Quoting information is now passed along
from a Column with quote=True when generating
a same-named bound parameter to the bindparam()
object, as is the case in generated INSERT and UPDATE
statements, so that unknown reserved names can
be fully supported. [ticket:2437]
Mike Bayer [Fri, 4 May 2012 21:44:22 +0000 (17:44 -0400)]
- [feature] Added SQLite execution option
"sqlite_raw_colnames=True", will bypass
attempts to remove "." from column names
returned by SQLite cursor.description.
[ticket:2475]
Mike Bayer [Wed, 25 Apr 2012 14:38:24 +0000 (10:38 -0400)]
- [bug] Fixed bug in relationship comparisons
whereby calling unimplemented methods like
SomeClass.somerelationship.like() would
produce a recursion overflow, instead
of NotImplementedError.