<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git, branch pr/174</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>Fixed unpickle bug when val in ext.mutable.values has no _parents</title>
<updated>2015-05-25T10:36:49+00:00</updated>
<author>
<name>Hsiaoming Yang</name>
<email>me@lepture.com</email>
</author>
<published>2015-05-25T10:36:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=3bf0cf936767315a6f95d26d3b4857c885652b97'/>
<id>3bf0cf936767315a6f95d26d3b4857c885652b97</id>
<content type='text'>
It happens on these conditions:

1. ``expire_on_commit=False`` option on Session.
2. Using a custom type, such as JSONEncodedDict.
3. Column with a default value.

Here is an example::

    class Foo(Base):
        id = Column(Integer, primary_key=True)
        info = Column(JSONEncodedDict, default={})

Saving a Foo instance into memcache, and then get it out of memcache. It
would raise an exception::

    def unpickle(state, state_dict):
        if 'ext.mutable.values' in state_dict:
            for val in state_dict['ext.mutable.values']:
&gt;               val._parents[state.obj()] = key
E               AttributeError: 'dict' object has no attribute '_parents'

Because the saved value in pickle function is a pure dict. It has no
'_parents'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It happens on these conditions:

1. ``expire_on_commit=False`` option on Session.
2. Using a custom type, such as JSONEncodedDict.
3. Column with a default value.

Here is an example::

    class Foo(Base):
        id = Column(Integer, primary_key=True)
        info = Column(JSONEncodedDict, default={})

Saving a Foo instance into memcache, and then get it out of memcache. It
would raise an exception::

    def unpickle(state, state_dict):
        if 'ext.mutable.values' in state_dict:
            for val in state_dict['ext.mutable.values']:
&gt;               val._parents[state.obj()] = key
E               AttributeError: 'dict' object has no attribute '_parents'

Because the saved value in pickle function is a pure dict. It has no
'_parents'.
</pre>
</div>
</content>
</entry>
<entry>
<title>- Added a new dialect flag to the MSSQL dialect</title>
<updated>2015-05-25T01:02:29+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-05-25T01:02:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=9157911013532e081f9ec6e29e7a4c271438f8ab'/>
<id>9157911013532e081f9ec6e29e7a4c271438f8ab</id>
<content type='text'>
``legacy_schema_aliasing`` which when set to False will disable a
very old and obsolete behavior, that of the compiler's
attempt to turn all schema-qualified table names into alias names,
to work around old and no longer locatable issues where SQL
server could not parse a multi-part identifier name in all
circumstances.   The behavior prevented more
sophisticated statements from working correctly, including those which
use hints, as well as CRUD statements that embed correlated SELECT
statements.  Rather than continue to repair the feature to work
with more complex statements, it's better to just disable it
as it should no longer be needed for any modern SQL server
version.  The flag defaults to True for the 1.0.x series, leaving
current behavior unchanged for this version series.  In the 1.1
series, it will default to False.  For the 1.0 series,
when not set to either value explicitly, a warning is emitted
when a schema-qualified table is first used in a statement, which
suggests that the flag be set to False for all modern SQL Server
versions.
fixes #3424
fixes #3430
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
``legacy_schema_aliasing`` which when set to False will disable a
very old and obsolete behavior, that of the compiler's
attempt to turn all schema-qualified table names into alias names,
to work around old and no longer locatable issues where SQL
server could not parse a multi-part identifier name in all
circumstances.   The behavior prevented more
sophisticated statements from working correctly, including those which
use hints, as well as CRUD statements that embed correlated SELECT
statements.  Rather than continue to repair the feature to work
with more complex statements, it's better to just disable it
as it should no longer be needed for any modern SQL server
version.  The flag defaults to True for the 1.0.x series, leaving
current behavior unchanged for this version series.  In the 1.1
series, it will default to False.  For the 1.0 series,
when not set to either value explicitly, a warning is emitted
when a schema-qualified table is first used in a statement, which
suggests that the flag be set to False for all modern SQL Server
versions.
fixes #3424
fixes #3430
</pre>
</div>
</content>
</entry>
<entry>
<title>- break out binary insert against None, disable for freetds for now</title>
<updated>2015-05-24T21:08:02+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-05-24T21:08:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=0198d9aa5fee96c7523cc3e827baaba442c0ba02'/>
<id>0198d9aa5fee96c7523cc3e827baaba442c0ba02</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- autopep8</title>
<updated>2015-05-24T21:07:54+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-05-24T21:07:54+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=96f49085b8dd05062b97c4f9c892c071042dad66'/>
<id>96f49085b8dd05062b97c4f9c892c071042dad66</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- liberalize list.remove() regexp as recent Pypy versions</title>
<updated>2015-05-24T13:49:14+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-05-24T13:49:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=1bb9c99ea9f3e36e5d4a9f1d4f21f1d0a252db4a'/>
<id>1bb9c99ea9f3e36e5d4a9f1d4f21f1d0a252db4a</id>
<content type='text'>
format this message differently than cpython
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
format this message differently than cpython
</pre>
</div>
</content>
</entry>
<entry>
<title>- fix some tests related to the URL change and try to make</title>
<updated>2015-05-23T13:07:36+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-05-23T13:07:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=e9921ad356fee4edb56007ae39793fb2211f13cf'/>
<id>e9921ad356fee4edb56007ae39793fb2211f13cf</id>
<content type='text'>
the URL design a little simpler
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the URL design a little simpler
</pre>
</div>
</content>
</entry>
<entry>
<title>- Adjustments to the engine plugin hook, such that the</title>
<updated>2015-05-22T17:51:00+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-05-22T17:51:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=04c625467e65ec4189d4fd73e0e10c727f04dce6'/>
<id>04c625467e65ec4189d4fd73e0e10c727f04dce6</id>
<content type='text'>
:meth:`.URL.get_dialect` method will continue to return the
ultimate :class:`.Dialect` object when a dialect plugin is used,
without the need for the caller to be aware of the
:meth:`.Dialect.get_dialect_cls` method.
reference #3379
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
:meth:`.URL.get_dialect` method will continue to return the
ultimate :class:`.Dialect` object when a dialect plugin is used,
without the need for the caller to be aware of the
:meth:`.Dialect.get_dialect_cls` method.
reference #3379
</pre>
</div>
</content>
</entry>
<entry>
<title>- document fully how to use autoincrement w/ SQLite including</title>
<updated>2015-05-22T17:27:09+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-05-22T17:27:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=c581b907b3f1bcee3ab347e9a93c2c2b37bfe7ef'/>
<id>c581b907b3f1bcee3ab347e9a93c2c2b37bfe7ef</id>
<content type='text'>
non-Integer column types, fixes #2075
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
non-Integer column types, fixes #2075
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed regression in the :mod:`sqlalchemy.ext.mutable` extension</title>
<updated>2015-05-21T18:21:01+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-05-21T18:21:01+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=525cc6fe0247a76201c173e535d8309333461afc'/>
<id>525cc6fe0247a76201c173e535d8309333461afc</id>
<content type='text'>
as a result of the bugfix for :ticket:`3167`,
where attribute and validation events are no longer
called within the flush process.  The mutable
extension was relying upon this behavior in the case where a column
level Python-side default were responsible for generating the new value
on INSERT or UPDATE, or when a value were fetched from the RETURNING
clause for "eager defaults" mode.  The new value would not be subject
to any event when populated and the mutable extension could not
establish proper coercion or history listening.  A new event
:meth:`.InstanceEvents.refresh_flush` is added which the mutable
extension now makes use of for this use case.
fixes #3427
- Added new event :meth:`.InstanceEvents.refresh_flush`, invoked
when an INSERT or UPDATE level default value fetched via RETURNING
or Python-side default is invoked within the flush process.  This
is to provide a hook that is no longer present as a result of
:ticket:`3167`, where attribute and validation events are no longer
called within the flush process.
- Added a new semi-public method to :class:`.MutableBase`
:meth:`.MutableBase._get_listen_keys`.  Overriding this method
is needed in the case where a :class:`.MutableBase` subclass needs
events to propagate for attribute keys other than the key to which
the mutable type is associated with, when intercepting the
:meth:`.InstanceEvents.refresh` or
:meth:`.InstanceEvents.refresh_flush` events.  The current example of
this is composites using :class:`.MutableComposite`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
as a result of the bugfix for :ticket:`3167`,
where attribute and validation events are no longer
called within the flush process.  The mutable
extension was relying upon this behavior in the case where a column
level Python-side default were responsible for generating the new value
on INSERT or UPDATE, or when a value were fetched from the RETURNING
clause for "eager defaults" mode.  The new value would not be subject
to any event when populated and the mutable extension could not
establish proper coercion or history listening.  A new event
:meth:`.InstanceEvents.refresh_flush` is added which the mutable
extension now makes use of for this use case.
fixes #3427
- Added new event :meth:`.InstanceEvents.refresh_flush`, invoked
when an INSERT or UPDATE level default value fetched via RETURNING
or Python-side default is invoked within the flush process.  This
is to provide a hook that is no longer present as a result of
:ticket:`3167`, where attribute and validation events are no longer
called within the flush process.
- Added a new semi-public method to :class:`.MutableBase`
:meth:`.MutableBase._get_listen_keys`.  Overriding this method
is needed in the case where a :class:`.MutableBase` subclass needs
events to propagate for attribute keys other than the key to which
the mutable type is associated with, when intercepting the
:meth:`.InstanceEvents.refresh` or
:meth:`.InstanceEvents.refresh_flush` events.  The current example of
this is composites using :class:`.MutableComposite`.
</pre>
</div>
</content>
</entry>
<entry>
<title>flake8 some tests</title>
<updated>2015-05-21T17:43:37+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-05-21T17:43:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=164f2ad2f433b3d297df709d617a1fc421495921'/>
<id>164f2ad2f433b3d297df709d617a1fc421495921</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
