SQLAlchemy 0.6beta2 is now available.This beta may be the last before the
0.6.0 final release. We've hopefully gotten every largish change into the
release as possible so that people can test. 0.6 is already running on a
number of production servers and is already widely tested on mainstream
platforms.
Big new things in this release include:
- dialects for Sybase, as well as MS-SQL against mxODBC and pymssql. The
Sybase and mxODBC dialects are still under construction but are largely
functional.
- optional C extensions which implement ResultProxy internals natively
- seamless Python 3 installation
- a ton of other stuff, summarized in the changelog below
A full summary of all backends and an assessment of their stability can be
viewed on the site at:
http://www.sqlalchemy.org/docs/dbengine.html#supported-databases
Download SQLAlchemy 0.6beta2 at:
http://www.sqlalchemy.org/download.html
0.6beta2
- py3k
- Improved the installation/test setup regarding Python 3,
now that Distribute runs on Py3k. distribute_setup.py
is now included. See README.py3k for Python 3 installation/
testing instructions.
- orm
- The official name for the relation() function is now
relationship(), to eliminate confusion over the relational
algebra term. relation() however will remain available
in equal capacity for the foreseeable future. [ticket:1740]
- Added version_id_generator argument to Mapper, this is a
callable that, given the current value of the version_id_col,
returns the next version number. Can be used for alternate
versioning schemes such as uuid, timestamps. [ticket:1692]
- added lockmode kw argument to Session.refresh(), will
pass through the string value to Query the same as
in with_lockmode(), will also do version check for a
version_id_col-enabled mapping.
- Fixed bug whereby calling query(A).join(A.bs).add_entity(B)
in a joined inheritance scenario would double-add B as a
target and produce an invalid query. [ticket:1188]
- Fixed bug in session.rollback() which involved not removing
formerly pending objects from the session before
re-integrating deleted objects, typically occured with
natural primary keys. If there was a primary key conflict
between them, the attach of the deleted would fail
internally. The formerly pending objects are now expunged
first. [ticket:1674]
- Removed a lot of logging that nobody really cares about,
logging that remains will respond to live changes in the
log level. No significant overhead is added. [ticket:1719]
- Fixed bug in session.merge() which prevented dict-like
collections from merging.
- session.merge() works with relations that specifically
don't include merge in their cascade options - the target
is ignored completely.
- session.merge() will not expire existing scalar attributes
on an existing target if the target has a value for that
attribute, even if the incoming merged doesn't have
a value for the attribute. This prevents unnecessary loads
on existing items. Will still mark the attr as expired
if the destination doesn't have the attr, though, which
fulfills some contracts of deferred cols. [ticket:1681]
- The allow_null_pks flag is now called allow_partial_pks,
defaults to True, acts like it did in 0.5 again. Except,
it also is implemented within merge() such that a SELECT
won't be issued for an incoming instance with partially
NULL primary key if the flag is False. [ticket:1680]
- Fixed bug in 0.6-reworked many-to-one optimizations
such that a many-to-one that is against a non-primary key
column on the remote table (i.e. foreign key against a
UNIQUE column) will pull the old value in from the
database during a change, since if it's in the session
we will need it for proper history/backref accounting,
and we can't pull from the local identity map on a
non-primary key column. [ticket:1737]
- fixed internal error which would occur if calling has()
or similar complex expression on a single-table inheritance
relation(). [ticket:1731]
- query.one() no longer applies LIMIT to the query, this to
ensure that it fully counts all object identities present
in the result, even in the case where joins may conceal
multiple identities for two or more rows. As a bonus,
one() can now also be called with a query that issued
from_statement() to start with since it no longer modifies
the query. [ticket:1688]
- query.get() now returns None if queried for an identifier
that is present in the identity map with a different class
than the one requested, i.e. when using polymorphic loading.
[ticket:1727]
- A major fix in query.join(), when the on clause is an
attribute of an aliased() construct, but there is already
an existing join made out to a