Sqlalchemy

Latest version: v2.0.30

Safety actively analyzes 629564 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 42 of 50

0.5.0rc3

Not secure
:released: Fri Nov 07 2008

.. change::
:tags: orm
:tickets:

Added two new hooks to SessionExtension: after_bulk_delete()
and after_bulk_update(). after_bulk_delete() is called after
a bulk delete() operation on a query. after_bulk_update() is
called after a bulk update() operation on a query.

.. change::
:tags: sql
:tickets:

SQL compiler optimizations and complexity reduction. The call
count for compiling a typical select() construct is 20% less
versus 0.5.0rc2.

.. change::
:tags: sql
:tickets: 1211

Dialects can now generate label names of adjustable
length. Pass in the argument "label_length=<value>" to
create_engine() to adjust how many characters max will be
present in dynamically generated column labels, i.e.
"somecolumn AS somelabel". Any value less than 6 will result
in a label of minimal size, consisting of an underscore and a
numeric counter. The compiler uses the value of
dialect.max_identifier_length as a default.

.. change::
:tags: ext
:tickets:

Added a new extension sqlalchemy.ext.serializer. Provides
Serializer/Deserializer "classes" which mirror
Pickle/Unpickle, as well as dumps() and loads(). This
serializer implements an "external object" pickler which keeps
key context-sensitive objects, including engines, sessions,
metadata, Tables/Columns, and mappers, outside of the pickle
stream, and can later restore the pickle using any
engine/metadata/session provider. This is used not for
pickling regular object instances, which are pickleable
without any special logic, but for pickling expression objects
and full Query objects, such that all mapper/engine/session
dependencies can be restored at unpickle time.

.. change::
:tags: oracle
:tickets:

Wrote a docstring for Oracle dialect. Apparently that Ohloh
"few source code comments" label is starting to string :).

.. change::
:tags: oracle
:tickets: 536

Removed FIRST_ROWS() optimize flag when using LIMIT/OFFSET,
can be re-enabled with optimize_limits=True create_engine()
flag.

.. change::
:tags: oracle
:tickets:

bugfixes and behavioral changes

.. change::
:tags: orm
:tickets:

"not equals" comparisons of simple many-to-one relation to an
instance will not drop into an EXISTS clause and will compare
foreign key columns instead.

.. change::
:tags: orm
:tickets:

Removed not-really-working use cases of comparing a collection
to an iterable. Use contains() to test for collection
membership.

.. change::
:tags: orm
:tickets: 1171

Improved the behavior of aliased() objects such that they more
accurately adapt the expressions generated, which helps
particularly with self-referential comparisons.

.. change::
:tags: orm
:tickets:

Fixed bug involving primaryjoin/secondaryjoin conditions
constructed from class-bound attributes (as often occurs when
using declarative), which later would be inappropriately
aliased by Query, particularly with the various EXISTS based
comparators.

.. change::
:tags: orm
:tickets:

Fixed bug when using multiple query.join() with an
aliased-bound descriptor which would lose the left alias.

.. change::
:tags: orm
:tickets:

Improved weakref identity map memory management to no longer
require mutexing, resurrects garbage collected instance on a
lazy basis for an InstanceState with pending changes.

.. change::
:tags: orm
:tickets:

InstanceState object now removes circular references to itself
upon disposal to keep it outside of cyclic garbage collection.

.. change::
:tags: orm
:tickets:

relation() won't hide unrelated ForeignKey errors inside of
the "please specify primaryjoin" message when determining join
condition.

.. change::
:tags: orm
:tickets: 1218

Fixed bug in Query involving order_by() in conjunction with
multiple aliases of the same class (will add tests in)

.. change::
:tags: orm
:tickets:

When using Query.join() with an explicit clause for the ON
clause, the clause will be aliased in terms of the left side
of the join, allowing scenarios like query(Source).
from_self().join((Dest, Source.id==Dest.source_id)) to work
properly.

.. change::
:tags: orm
:tickets:

polymorphic_union() function respects the "key" of each Column
if they differ from the column's name.

.. change::
:tags: orm
:tickets: 1183

Repaired support for "passive-deletes" on a many-to-one
relation() with "delete" cascade.

.. change::
:tags: orm
:tickets: 1213

Fixed bug in composite types which prevented a primary-key
composite type from being mutated.

.. change::
:tags: orm
:tickets: 1202

Added more granularity to internal attribute access, such that
cascade and flush operations will not initialize unloaded
attributes and collections, leaving them intact for a
lazy-load later on. Backref events still initialize attributes
and collections for pending instances.

.. change::
:tags: sql
:tickets: 1212

Simplified the check for ResultProxy "autoclose without
results" to be based solely on presence of
cursor.description. All the regexp-based guessing about
statements returning rows has been removed.

.. change::
:tags: sql
:tickets: 1194

Direct execution of a union() construct will properly set up
result-row processing.

.. change::
:tags: sql
:tickets:

The internal notion of an "OID" or "ROWID" column has been
removed. It's basically not used by any dialect, and the
possibility of its usage with psycopg2's cursor.lastrowid is
basically gone now that INSERT..RETURNING is available.

.. change::
:tags: sql
:tickets:

Removed "default_order_by()" method on all FromClause objects.

.. change::
:tags: sql
:tickets:

Repaired the table.tometadata() method so that a passed-in
schema argument is propagated to ForeignKey constructs.

.. change::
:tags: sql
:tickets:

Slightly changed behavior of IN operator for comparing to
empty collections. Now results in inequality comparison
against self. More portable, but breaks with stored procedures
that aren't pure functions.

.. change::
:tags: oracle
:tickets:

Setting the auto_convert_lobs to False on create_engine() will
also instruct the OracleBinary type to return the cx_oracle
LOB object unchanged.

.. change::
:tags: mysql
:tickets:

Fixed foreign key reflection in the edge case where a Table's
explicit schema= is the same as the schema (database) the
connection is attached to.

.. change::
:tags: mysql
:tickets:

No longer expects include_columns in table reflection to be
lower case.

.. change::
:tags: ext
:tickets: 1174

Fixed bug preventing declarative-bound "column" objects from
being used in column_mapped_collection().

.. change::
:tags: misc
:tickets: 1077

util.flatten_iterator() func doesn't interpret strings with
__iter__() methods as iterators, such as in pypy.

.. changelog::

0.5.0rc2

Not secure
:released: Sun Oct 12 2008

.. change::
:tags: orm
:tickets:

Fixed bug involving read/write relation()s that contain
literal or other non-column expressions within their
primaryjoin condition equated to a foreign key column.

.. change::
:tags: orm
:tickets:

"non-batch" mode in mapper(), a feature which allows mapper
extension methods to be called as each instance is
updated/inserted, now honors the insert order of the objects
given.

.. change::
:tags: orm
:tickets:

Fixed RLock-related bug in mapper which could deadlock upon
reentrant mapper compile() calls, something that occurs when
using declarative constructs inside of ForeignKey objects.

.. change::
:tags: orm
:tickets:

ScopedSession.query_property now accepts a query_cls factory,
overriding the session's configured query_cls.

.. change::
:tags: orm
:tickets:

Fixed shared state bug interfering with ScopedSession.mapper's
ability to apply default __init__ implementations on object
subclasses.

.. change::
:tags: orm
:tickets: 1177

Fixed up slices on Query (i.e. query[x:y]) to work properly
for zero length slices, slices with None on either end.

.. change::
:tags: orm
:tickets:

Added an example illustrating Celko's "nested sets" as a
SQLA mapping.

.. change::
:tags: orm
:tickets:

contains_eager() with an alias argument works even when
the alias is embedded in a SELECT, as when sent to the
Query via query.select_from().

.. change::
:tags: orm
:tickets: 1180

contains_eager() usage is now compatible with a Query that
also contains a regular eager load and limit/offset, in that
the columns are added to the Query-generated subquery.

.. change::
:tags: orm
:tickets:

session.execute() will execute a Sequence object passed to
it (regression from 0.4).

.. change::
:tags: orm
:tickets:

Removed the "raiseerror" keyword argument from object_mapper()
and class_mapper(). These functions raise in all cases
if the given class/instance is not mapped.

.. change::
:tags: orm
:tickets:

Fixed session.transaction.commit() on a autocommit=False
session not starting a new transaction.

.. change::
:tags: orm
:tickets:

Some adjustments to Session.identity_map's weak referencing
behavior to reduce asynchronous GC side effects.

.. change::
:tags: orm
:tickets: 1182

Adjustment to Session's post-flush accounting of newly
"clean" objects to better protect against operating on
objects as they're asynchronously gc'ed.

.. change::
:tags: sql
:tickets: 1074

column.in_(someselect) can now be used as a columns-clause
expression without the subquery bleeding into the FROM clause

.. change::
:tags: sqlite
:tickets: 968

Overhauled SQLite date/time bind/result processing to use
regular expressions and format strings, rather than
strptime/strftime, to generically support pre-1900 dates,
dates with microseconds.

.. change::
:tags: sqlite
:tickets:

String's (and Unicode's, UnicodeText's, etc.) convert_unicode
logic disabled in the sqlite dialect, to adjust for pysqlite
2.5.0's new requirement that only Python unicode objects are
accepted;
https://itsystementwicklung.de/pipermail/list-pysqlite/2008-March/000018.html

.. change::
:tags: mysql
:tickets:

Temporary tables are now reflectable.

.. change::
:tags: oracle
:tickets: 1187

Oracle will detect string-based statements which contain
comments at the front before a SELECT as SELECT statements.

.. changelog::

0.5.0rc1

Not secure
:released: Thu Sep 11 2008

.. change::
:tags: orm
:tickets:

Query now has delete() and update(values) methods. This allows
to perform bulk deletes/updates with the Query object.

.. change::
:tags: orm
:tickets:

The RowTuple object returned by Query(\*cols) now features
keynames which prefer mapped attribute names over column keys,
column keys over column names, i.e. Query(Class.foo,
Class.bar) will have names "foo" and "bar" even if those are
not the names of the underlying Column objects. Direct Column
objects such as Query(table.c.col) will return the "key"
attribute of the Column.

.. change::
:tags: orm
:tickets:

Added scalar() and value() methods to Query, each return a
single scalar value. scalar() takes no arguments and is
roughly equivalent to first()[0], value()
takes a single column expression and is roughly equivalent to
values(expr).next()[0].

.. change::
:tags: orm
:tickets:

Improved the determination of the FROM clause when placing SQL
expressions in the query() list of entities. In particular
scalar subqueries should not "leak" their inner FROM objects
out into the enclosing query.

.. change::
:tags: orm
:tickets:

Joins along a relation() from a mapped class to a mapped
subclass, where the mapped subclass is configured with single
table inheritance, will include an IN clause which limits the
subtypes of the joined class to those requested, within the ON
clause of the join. This takes effect for eager load joins as
well as query.join(). Note that in some scenarios the IN
clause will appear in the WHERE clause of the query as well
since this discrimination has multiple trigger points.

.. change::
:tags: orm
:tickets:

AttributeExtension has been refined such that the event
is fired before the mutation actually occurs. Additionally,
the append() and set() methods must now return the given value,
which is used as the value to be used in the mutation operation.
This allows creation of validating AttributeListeners which
raise before the action actually occurs, and which can change
the given value into something else before its used.

.. change::
:tags: orm
:tickets:

column_property(), composite_property(), and relation() now
accept a single or list of AttributeExtensions using the
"extension" keyword argument.

.. change::
:tags: orm
:tickets:

query.order_by().get() silently drops the "ORDER BY" from
the query issued by GET but does not raise an exception.

.. change::
:tags: orm
:tickets:

Added a Validator AttributeExtension, as well as a
validates decorator which is used in a similar fashion
as reconstructor, and marks a method as validating
one or more mapped attributes.

.. change::
:tags: orm
:tickets: 1140

class.someprop.in_() raises NotImplementedError pending the
implementation of "in\_" for relation

.. change::
:tags: orm
:tickets: 1127

Fixed primary key update for many-to-many collections where
the collection had not been loaded yet

.. change::
:tags: orm
:tickets:

Fixed bug whereby deferred() columns with a group in conjunction
with an otherwise unrelated synonym() would produce
an AttributeError during deferred load.

.. change::
:tags: orm
:tickets: 1128

The before_flush() hook on SessionExtension takes place before
the list of new/dirty/deleted is calculated for the final
time, allowing routines within before_flush() to further
change the state of the Session before the flush proceeds.

.. change::
:tags: orm
:tickets:

The "extension" argument to Session and others can now
optionally be a list, supporting events sent to multiple
SessionExtension instances. Session places SessionExtensions
in Session.extensions.

.. change::
:tags: orm
:tickets:

Reentrant calls to flush() raise an error. This also serves
as a rudimentary, but not foolproof, check against concurrent
calls to Session.flush().

.. change::
:tags: orm
:tickets:

Improved the behavior of query.join() when joining to
joined-table inheritance subclasses, using explicit join
criteria (i.e. not on a relation).

.. change::
:tags: orm
:tickets:

orm.attributes.reconstitute and
MapperExtension.reconstitute have been renamed to
orm.reconstructor and MapperExtension.reconstruct_instance

.. change::
:tags: orm
:tickets: 1129

Fixed reconstructor hook for subclasses which inherit from a
base class.

.. change::
:tags: orm
:tickets: 1132

The composite() property type now supports a
__set_composite_values__() method on the composite class which
is required if the class represents state using attribute
names other than the column's keynames; default-generated
values now get populated properly upon flush. Also,
composites with attributes set to None compare correctly.

.. change::
:tags: orm
:tickets:

The 3-tuple of iterables returned by attributes.get_history()
may now be a mix of lists and tuples. (Previously members
were always lists.)

.. change::
:tags: orm
:tickets: 1151

Fixed bug whereby changing a primary key attribute on an
entity where the attribute's previous value had been expired
would produce an error upon flush().

.. change::
:tags: orm
:tickets:

Fixed custom instrumentation bug whereby get_instance_dict()
was not called for newly constructed instances not loaded
by the ORM.

.. change::
:tags: orm
:tickets: 1150

Session.delete() adds the given object to the session if
not already present. This was a regression bug from 0.4.

.. change::
:tags: orm
:tickets:

The `echo_uow` flag on `Session` is deprecated, and unit-of-work
logging is now application-level only, not per-session level.

.. change::
:tags: orm
:tickets: 1153

Removed conflicting `contains()` operator from
`InstrumentedAttribute` which didn't accept `escape` kwaarg.

.. change::
:tags: declarative
:tickets: 1161

Fixed bug whereby mapper couldn't initialize if a composite
primary key referenced another table that was not defined
yet.

.. change::
:tags: declarative
:tickets:

Fixed exception throw which would occur when string-based
primaryjoin condition was used in conjunction with backref.

.. change::
:tags: schema
:tickets: 1033

Added "sorted_tables" accessor to MetaData, which returns
Table objects sorted in order of dependency as a list.
This deprecates the MetaData.table_iterator() method.
The "reverse=False" keyword argument has also been
removed from util.sort_tables(); use the Python
'reversed' function to reverse the results.

.. change::
:tags: schema
:tickets:

The 'length' argument to all Numeric types has been renamed
to 'scale'. 'length' is deprecated and is still accepted
with a warning.

.. change::
:tags: schema
:tickets:

Dropped 0.3-compatibility for user defined types
(convert_result_value, convert_bind_param).

.. change::
:tags: sql
:tickets: 1068

Temporarily rolled back the "ORDER BY" enhancement from. This feature is on hold pending further
development.

.. change::
:tags: sql
:tickets:

The exists() construct won't "export" its contained list
of elements as FROM clauses, allowing them to be used more
effectively in the columns clause of a SELECT.

.. change::
:tags: sql
:tickets: 798

and_() and or_() now generate a ColumnElement, allowing
boolean expressions as result columns, i.e.
select([and_(1, 0)]).

.. change::
:tags: sql
:tickets:

Bind params now subclass ColumnElement which allows them to be
selectable by orm.query (they already had most ColumnElement
semantics).

.. change::
:tags: sql
:tickets:

Added select_from() method to exists() construct, which becomes
more and more compatible with a regular select().

.. change::
:tags: sql
:tickets: 1160

Added func.min(), func.max(), func.sum() as "generic functions",
which basically allows for their return type to be determined
automatically. Helps with dates on SQLite, decimal types,
others.

.. change::
:tags: sql
:tickets:

added decimal.Decimal as an "auto-detect" type; bind parameters
and generic functions will set their type to Numeric when a
Decimal is used.

.. change::
:tags: mysql
:tickets:

The 'length' argument to MSInteger, MSBigInteger, MSTinyInteger,
MSSmallInteger and MSYear has been renamed to 'display_width'.

.. change::
:tags: mysql
:tickets: 1146

Added MSMediumInteger type.

.. change::
:tags: mysql
:tickets:

the function func.utc_timestamp() compiles to UTC_TIMESTAMP, without
the parenthesis, which seem to get in the way when using in
conjunction with executemany().

.. change::
:tags: oracle
:tickets: 536

limit/offset no longer uses ROW NUMBER OVER to limit rows,
and instead uses subqueries in conjunction with a special
Oracle optimization comment. Allows LIMIT/OFFSET to work
in conjunction with DISTINCT.

.. change::
:tags: oracle
:tickets: 1155

has_sequence() now takes the current "schema" argument into
account

.. change::
:tags: oracle
:tickets: 1121

added BFILE to reflected type names

.. changelog::

0.5.0beta3

:released: Mon Aug 04 2008

.. change::
:tags: orm
:tickets:

The "entity_name" feature of SQLAlchemy mappers has been
removed. For rationale, see https://tinyurl.com/6nm2ne

.. change::
:tags: orm
:tickets:

the "autoexpire" flag on Session, sessionmaker(), and
scoped_session() has been renamed to "expire_on_commit". It
does not affect the expiration behavior of rollback().

.. change::
:tags: orm
:tickets:

fixed endless loop bug which could occur within a mapper's
deferred load of inherited attributes.

.. change::
:tags: orm
:tickets:

a legacy-support flag "_enable_transaction_accounting" flag
added to Session which when False, disables all
transaction-level object accounting, including expire on
rollback, expire on commit, new/deleted list maintenance, and
autoflush on begin.

.. change::
:tags: orm
:tickets:

The 'cascade' parameter to relation() accepts None as a value,
which is equivalent to no cascades.

.. change::
:tags: orm
:tickets:

A critical fix to dynamic relations allows the "modified"
history to be properly cleared after a flush().

.. change::
:tags: orm
:tickets:

user-defined properties on a class are detected and left in
place during mapper initialization. This means that a
table-bound column of the same name will not be mapped at all
if a property is in the way (and the column is not remapped
to a different name), nor will an instrumented attribute from
an inherited class be applied. The same rules apply for names
excluded using the include_properties/exclude_properties
collections.

.. change::
:tags: orm
:tickets:

Added a new SessionExtension hook called after_attach(). This
is called at the point of attachment for objects via add(),
add_all(), delete(), and merge().

.. change::
:tags: orm
:tickets: 1111

A mapper which inherits from another, when inheriting the
columns of its inherited mapper, will use any reassigned
property names specified in that inheriting mapper.
Previously, if "Base" had reassigned "base_id" to the name
"id", "SubBase(Base)" would still get an attribute called
"base_id". This could be worked around by explicitly stating
the column in each submapper as well but this is fairly
unworkable and also impossible when using declarative.

.. change::
:tags: orm
:tickets:

Fixed a series of potential race conditions in Session whereby
asynchronous GC could remove unmodified, no longer referenced
items from the session as they were present in a list of items
to be processed, typically during session.expunge_all() and
dependent methods.

.. change::
:tags: orm
:tickets:

Some improvements to the _CompileOnAttr mechanism which should
reduce the probability of "Attribute x was not replaced during
compile" warnings. (this generally applies to SQLA hackers,
like Elixir devs).

.. change::
:tags: orm
:tickets:

Fixed bug whereby the "unsaved, pending instance" FlushError
raised for a pending orphan would not take superclass mappers
into account when generating the list of relations responsible
for the error.

.. change::
:tags: sql
:tickets:

func.count() with no arguments renders as COUNT(*), equivalent
to func.count(text('*')).

.. change::
:tags: sql
:tickets: 1068

simple label names in ORDER BY expressions render as
themselves, and not as a re-statement of their corresponding
expression. This feature is currently enabled only for
SQLite, MySQL, and PostgreSQL. It can be enabled on other
dialects as each is shown to support this
behavior.

.. change::
:tags: ext
:tickets:

Class-bound attributes sent as arguments to relation()'s
remote_side and foreign_keys parameters are now accepted,
allowing them to be used with declarative. Additionally fixed
bugs involving order_by being specified as a class-bound
attribute in conjunction with eager loading.

.. change::
:tags: ext
:tickets:

declarative initialization of Columns adjusted so that
non-renamed columns initialize in the same way as a non
declarative mapper. This allows an inheriting mapper to set
up its same-named "id" columns in particular such that the
parent "id" column is favored over the child column, reducing
database round trips when this value is requested.

.. change::
:tags: mysql
:tickets: 1110

Quoting of MSEnum values for use in CREATE TABLE is now
optional & will be quoted on demand as required. (Quoting was
always optional for use with existing tables.)

.. changelog::

0.5.0beta2

:released: Mon Jul 14 2008

.. change::
:tags: orm
:tickets: 870

In addition to expired attributes, deferred attributes also
load if their data is present in the result set.

.. change::
:tags: orm
:tickets:

session.refresh() raises an informative error message if the
list of attributes does not include any column-based
attributes.

.. change::
:tags: orm
:tickets:

query() raises an informative error message if no columns or
mappers are specified.

.. change::
:tags: orm
:tickets:

lazy loaders now trigger autoflush before proceeding. This
allows expire() of a collection or scalar relation to function
properly in the context of autoflush.

.. change::
:tags: orm
:tickets: 887

column_property() attributes which represent SQL expressions
or columns that are not present in the mapped tables (such as
those from views) are automatically expired after an INSERT or
UPDATE, assuming they have not been locally modified, so that
they are refreshed with the most recent data upon access.

.. change::
:tags: orm
:tickets: 1082

Fixed explicit, self-referential joins between two
joined-table inheritance mappers when using query.join(cls,
aliased=True).

.. change::
:tags: orm
:tickets:

Fixed query.join() when used in conjunction with a
columns-only clause and a SQL-expression ON clause in the
join.

.. change::
:tags: orm
:tickets:

The "allow_column_override" flag from mapper() has been
removed. This flag is virtually always misunderstood. Its
specific functionality is available via the
include_properties/exclude_properties mapper arguments.

.. change::
:tags: orm
:tickets: 1066

Repaired `__str__()` method on Query.

.. change::
:tags: orm
:tickets:

Session.bind gets used as a default even when table/mapper
specific binds are defined.

.. change::
:tags: schema
:tickets: 1075

Added prefixes option to `Table` that accepts a list of
strings to insert after CREATE in the CREATE TABLE statement.

.. change::
:tags: schema
:tickets:

Unicode, UnicodeText types now set "assert_unicode" and
"convert_unicode" by default, but accept overriding
\**kwargs for these values.

.. change::
:tags: sql
:tickets:

Added new match() operator that performs a full-text search.
Supported on PostgreSQL, SQLite, MySQL, MS-SQL, and Oracle
backends.

.. change::
:tags: sqlite
:tickets: 1090

Modified SQLite's representation of "microseconds" to match
the output of str(somedatetime), i.e. in that the microseconds
are represented as fractional seconds in string format. This
makes SQLA's SQLite date type compatible with datetimes that
were saved directly using Pysqlite (which just calls str()).
Note that this is incompatible with the existing microseconds
values in a SQLA 0.4 generated SQLite database file.

To get the old behavior globally:

from sqlalchemy.databases.sqlite import DateTimeMixin
DateTimeMixin.__legacy_microseconds__ = True

To get the behavior on individual DateTime types:

t = sqlite.SLDateTime()
t.__legacy_microseconds__ = True

Then use "t" as the type on the Column.

.. change::
:tags: sqlite
:tickets:

SQLite Date, DateTime, and Time types only accept Python
datetime objects now, not strings. If you'd like to format
dates as strings yourself with SQLite, use a String type. If
you'd like them to return datetime objects anyway despite
their accepting strings as input, make a TypeDecorator around
String - SQLA doesn't encourage this pattern.

.. change::
:tags: extensions
:tickets: 1096

Declarative supports a __table_args__ class variable, which is
either a dictionary, or tuple of the form (arg1, arg2, ...,
{kwarg1:value, ...}) which contains positional + kw arguments
to be passed to the Table constructor.

.. changelog::

0.5.0beta1

:released: Thu Jun 12 2008

.. change::
:tags:
:tickets:

The "__init__" trigger/decorator added by mapper now attempts
to exactly mirror the argument signature of the original
__init__. The pass-through for '_sa_session' is no longer
implicit- you must allow for this keyword argument in your
constructor.

.. change::
:tags:
:tickets:

ClassState is renamed to ClassManager.

.. change::
:tags:
:tickets:

Classes may supply their own InstrumentationManager by
providing a __sa_instrumentation_manager__ property.

.. change::
:tags:
:tickets:

Custom instrumentation may use any mechanism to associate a
ClassManager with a class and an InstanceState with an
instance. Attributes on those objects are still the default
association mechanism used by SQLAlchemy's native
instrumentation.

.. change::
:tags:
:tickets:

Moved entity_name, _sa_session_id, and _instance_key from the
instance object to the instance state. These values are still
available in the old way, which is now deprecated, using
descriptors attached to the class. A deprecation warning will
be issued when accessed.

.. change::
:tags:
:tickets:

The _prepare_instrumentation alias for prepare_instrumentation
has been removed.

.. change::
:tags:
:tickets:

sqlalchemy.exceptions has been renamed to sqlalchemy.exc. The
module may be imported under either name.

.. change::
:tags:
:tickets:

ORM-related exceptions are now defined in sqlalchemy.orm.exc.
ConcurrentModificationError, FlushError, and
UnmappedColumnError compatibility aliases are installed in
sqlalchemy.exc during the import of sqlalchemy.orm.

.. change::
:tags:
:tickets:

sqlalchemy.logging has been renamed to sqlalchemy.log.

.. change::
:tags:
:tickets:

The transitional sqlalchemy.log.SADeprecationWarning alias for
the warning's definition in sqlalchemy.exc has been removed.

.. change::
:tags:
:tickets:

exc.AssertionError has been removed and usage replaced with
Python's built-in AssertionError.

.. change::
:tags:
:tickets:

The behavior of MapperExtensions attached to multiple,
entity_name= primary mappers for a single class has been
altered. The first mapper() defined for a class is the only
mapper eligible for the MapperExtension 'instrument_class',
'init_instance' and 'init_failed' events. This is backwards
incompatible; previously the extensions of last mapper defined
would receive these events.

.. change::
:tags: firebird
:tickets:

Added support for returning values from inserts (2.0+ only),
updates and deletes (2.1+ only).

.. change::
:tags: general
:tickets:

global "propigate"->"propagate" change.

.. change::
:tags: orm
:tickets:

polymorphic_union() function respects the "key" of each
Column if they differ from the column's name.

.. change::
:tags: orm
:tickets: 1199

Fixed 0.4-only bug preventing composite columns
from working properly with inheriting mappers

.. change::
:tags: orm
:tickets:

Fixed RLock-related bug in mapper which could deadlock upon
reentrant mapper compile() calls, something that occurs when
using declarative constructs inside of ForeignKey objects.
Ported from 0.5.

.. change::
:tags: orm
:tickets: 1213

Fixed bug in composite types which prevented a primary-key
composite type from being mutated.

.. change::
:tags: orm
:tickets: 976

Added ScopedSession.is_active accessor.

.. change::
:tags: orm
:tickets: 939

Class-bound accessor can be used as the argument to
relation() order_by.

.. change::
:tags: orm
:tickets: 1072

Fixed shard_id argument on ShardedSession.execute().

.. change::
:tags: sql
:tickets: 1246

Connection.invalidate() checks for closed status
to avoid attribute errors.

.. change::
:tags: sql
:tickets: 1094

NullPool supports reconnect on failure behavior.

.. change::
:tags: sql
:tickets: 1299

The per-dialect cache used by TypeEngine to cache
dialect-specific types is now a WeakKeyDictionary.
This to prevent dialect objects from
being referenced forever for an application that
creates an arbitrarily large number of engines
or dialects. There is a small performance penalty
which will be resolved in 0.6.

.. change::
:tags: sql
:tickets:

Fixed SQLite reflection methods so that non-present
cursor.description, which triggers an auto-cursor
close, will be detected so that no results doesn't
fail on recent versions of pysqlite which raise
an error when fetchone() called with no rows present.

.. change::
:tags: postgres
:tickets: 714

Added Index reflection support to Postgres, using a
great patch we long neglected, submitted by
Ken Kuhlman.

.. change::
:tags: mysql
:tickets: 1241

Fixed bug in exception raise when FK columns not present
during reflection.

.. change::
:tags: oracle
:tickets: 1265

Fixed bug which was preventing out params of certain types
from being received; thanks a ton to huddlej at wwu.edu !


=============
0.6 Changelog
=============


.. changelog::

Page 42 of 50

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.