Commit Graph

9059 Commits

Author SHA1 Message Date
Mike Bayer feda84e5b2 add missing release date 2014-06-25 14:31:18 -04:00
Mike Bayer ca58fa5d93 - Fixed bug when the declarative `__abstract__` flag was not being
distinguished for when it was actually the value ``False``.
The ``__abstract__`` flag needs to acutally evaluate to a True
value at the level being tested.
fixes #3097
2014-06-25 14:30:25 -04:00
Mike Bayer 89a6e34803 - add a test to confirm #3096, we definitely get a timedelta 2014-06-25 14:23:27 -04:00
Mike Bayer 725ed1b29f Merged in uralbash/sqlalchemy/uralbash/fix-pullreq-link-in-changelog_09rst-edit-1403586718274 (pull request #23)
fix pullreq link in changelog_09.rst edited online with Bitbucket
2014-06-24 12:27:01 -04:00
Mike Bayer 02b0af4f7c - write some really complete docs on MSSQL autoincrement, fixes #3094 2014-06-24 12:25:28 -04:00
uralbash 3be189e5d1 fix pullreq link in changelog_09.rst edited online with Bitbucket 2014-06-24 05:12:14 +00:00
Mike Bayer f10eb28d90 - reverse course in #3061 so that we instead no longer set None in the attribute
when we do a get; we return the None as always but we leave the dict blank
and the loader callable still in place.  The case for this implicit get on a pending object is not
super common and there really should be no change in state at all when this
operation proceeds.   This change is more dramatic as it reverses
a behavior SQLA has had since the first release.
fixes #3061
2014-06-23 19:50:23 -04:00
Mike Bayer 7e7447db1f - Reverted the change for 🎫3060 - this is a unit of work
fix that is updated more comprehensively in 1.0 via 🎫`3061`.
The fix in 🎫`3060` unfortunately produces a new issue whereby
an eager load of a many-to-one attribute can produce an event
that is interpreted into an attribute change.
2014-06-23 18:42:54 -04:00
Mike Bayer ea54b635d6 0.9.5 released date 2014-06-23 11:30:36 -04:00
Mike Bayer 179a3551bd fix changelog 2014-06-23 11:12:47 -04:00
Mike Bayer 20e64ad6b8 - use new Or() directive to test for both SQL variants here, which can vary
based on hash ordering of the ClassManager
2014-06-21 20:27:19 -04:00
Mike Bayer 650403ee64 - fix test failures 2014-06-21 18:11:04 -04:00
Mike Bayer a1bbf3a005 - Additional checks have been added for the case where an inheriting
mapper is implicitly combining one of its column-based attributes
with that of the parent, where those columns normally don't necessarily
share the same value.  This is an extension of an existing check that
was added via 🎫`1892`; however this new check emits only a
warning, instead of an exception, to allow for applications that may
be relying upon the existing behavior.
fixes #3042
2014-06-20 18:47:28 -04:00
Mike Bayer d7f467fcd5 additional version notes 2014-06-20 18:06:15 -04:00
Mike Bayer 018ac859dc add missing version markers 2014-06-20 18:04:26 -04:00
Mike Bayer bd56485f4c - The :paramref:.Column.nullable flag is implicitly set to `False`
when that :class:`.Column` is referred to in an explicit
:class:`.PrimaryKeyConstraint` for that table.  This behavior now
matches that of when the :class:`.Column` itself has the
:paramref:`.Column.primary_key` flag set to ``True``, which is
intended to be an exactly equivalent case.
fixes #3023
2014-06-20 18:03:28 -04:00
Mike Bayer 42bbb7163a - Added a new type :class:.postgresql.OID to the Postgresql dialect.
While "oid" is generally a private type within PG that is not exposed
in modern versions, there are some PG use cases such as large object
support where these types might be exposed, as well as within some
user-reported schema reflection use cases.
fixes #3002
2014-06-20 17:58:06 -04:00
Mike Bayer a46932422b - Fixed bug where column names added to `mysql_length` parameter
on an index needed to have the same quoting for quoted names in
order to be recognized.  The fix makes the quotes optional but
also provides the old behavior for backwards compatibility with those
using the workaround.
fixes #3085
2014-06-18 10:56:23 -04:00
Mike Bayer 33cb84945f - Modified the behavior of :func:.orm.load_only such that primary key
columns are always added to the list of columns to be "undeferred";
otherwise, the ORM can't load the row's identity.   Apparently,
one can defer the mapped primary keys and the ORM will fail, that
hasn't been changed.  But as load_only is essentially saying
"defer all but X", it's more critical that PK cols not be part of this
deferral. fixes #3080
2014-06-12 11:47:50 -04:00
Mike Bayer bd9c325852 - changelog 2014-06-08 18:03:07 -04:00
Mike Bayer cbd2103087 Merged in univerio/sqlalchemy/materialized_paths (pull request #21)
Materialized paths example
2014-06-08 18:01:46 -04:00
BY-jk 8b105cd5e4 Update compiler.py
Moved initialization into else block
Conflicts:
	lib/sqlalchemy/sql/compiler.py
2014-06-08 17:57:18 -04:00
Mike Bayer 15bfeb48cb changelog 2014-06-08 17:54:48 -04:00
Mike Bayer 46abb87ef4 Merge branch 'master' of https://github.com/BY-jk/sqlalchemy 2014-06-08 17:52:51 -04:00
Jack Zhou 7242e48efe Materialized paths example. 2014-06-07 18:39:18 -07:00
Justin Wood (Callek) 8952724cdd once kwarg in event funcs is new in 0.9.4
event.listen and event.listen_for have a kwarg once added in 0.9.4 (not 0.9.3) CHANGELOG agrees with this as well. (as does my manual testing)
2014-06-05 10:40:34 -04:00
Mike Bayer 9c96d96d0f - fix this test for MySQL, needs InnoDB 2014-05-30 18:09:11 -04:00
Mike Bayer 809a7890a1 - remove drizzle dialect
- restore mysqldb fully within dialects/mysql/, it's no longer a connector.
fixes #2984
2014-05-30 18:06:09 -04:00
Mike Bayer 814637e291 - vastly improve the "safe close cursor" tests in test_reconnect
- Fixed bug which would occur if a DBAPI exception
occurs when the engine first connects and does its initial checks,
and the exception is not a disconnect exception, yet the cursor
raises an error when we try to close it.  In this case the real
exception would be quashed as we tried to log the cursor close
exception via the connection pool and failed, as we were trying
to access the pool's logger in a way that is inappropriate
in this very specific scenario. fixes #3063
2014-05-30 16:24:38 -04:00
Mike Bayer 8daa6ccfb0 - The `__mapper_args__` dictionary is copied from a declarative
mixin or abstract class when accessed, so that modifications made
to this dictionary by declarative itself won't conflict with that
of other mappings.  The dictionary is modified regarding the
``version_id_col`` and ``polymorphic_on`` arguments, replacing the
column within with the one that is officially mapped to the local
class/table. fixes #3062
2014-05-30 15:36:13 -04:00
Mike Bayer 2da30fde12 fix typo 2014-05-30 13:21:12 -04:00
Mike Bayer 56fa40e7f3 Merged in chrisw/sqlalchemy/more_range_docs (pull request #20)
more docs for using psycopg2 range types, specifically instantiating models with them

fixes #3046
2014-05-30 13:02:05 -04:00
Mike Bayer 2e4d3e65e3 - changelog + docs for pg8000 transaction isolation level 2014-05-30 12:27:42 -04:00
Mike Bayer f000161f24 Merge branch 'master' of https://github.com/tlocke/sqlalchemy into tlocke-master 2014-05-30 12:08:26 -04:00
Mike Bayer 49c667e27d update comments 2014-05-30 12:00:05 -04:00
Mike Bayer 860b413ade - The psycopg2 `.closed` accessor is now consulted when determining
if an exception is a "disconnect" error; ideally, this should remove
the need for any other inspection of the exception message to detect
disconnect, however we will leave those existing messages in place
as a fallback.   This should be able to handle newer cases like
"SSL EOF" conditions.  Pull request courtesy Dirk Mueller.
fixes #3021
2014-05-30 11:56:19 -04:00
Mike Bayer 4eb855657a Merge branch 'psycopg_disconnect' of https://github.com/dirkmueller/sqlalchemy 2014-05-30 11:53:46 -04:00
BY-jk 39bea64bc3 Wrong type usage
Wrong Type (TEXT) being used in StringTest
2014-05-30 15:18:02 +02:00
Mike Bayer f26669ae1b Merge branch 'master' into rel_1_0 2014-05-30 01:38:45 -04:00
Mike Bayer 28fbecaaa0 revert this, not sure why that changed 2014-05-30 01:38:12 -04:00
Mike Bayer 013455139b Merge branch 'master' into rel_1_0 2014-05-30 01:34:15 -04:00
Mike Bayer 69dbcdd0eb - Related to 🎫3060, an adjustment has been made to the unit
of work such that loading for related many-to-one objects is slightly
more aggressive, in the case of a graph of self-referential objects
that are to be deleted; the load of related objects is to help
determine the correct order for deletion if passive_deletes is
not set.
- revert the changes to test_delete_unloaded_m2o, these deletes do in fact
need to occur in the order of the two child objects first.
2014-05-30 01:32:53 -04:00
Mike Bayer c447ff7422 Merge branch 'master' into rel_1_0 2014-05-30 00:22:04 -04:00
Mike Bayer 2c8689fd14 - add a new assertsql construct "Or", so that we can test for a UOW flush
that might take one of multiple directions; apply this to test_delete_unloaded_m2o
which is now illustrating multiple paths due to #3060/#3061, though still doing the
right thing.
2014-05-30 00:21:11 -04:00
Mike Bayer d1404f627e Merge branch 'master' into rel_1_0 2014-05-29 19:57:07 -04:00
Mike Bayer 1bd578998b add ticket 2014-05-29 19:57:03 -04:00
Mike Bayer f9b80daf96 Merge branch 'master' into rel_1_0 2014-05-29 19:55:11 -04:00
Mike Bayer 752f2e0fc8 - Adjustment to attribute mechanics concerning when a value is
implicitly initialized to None via first access; this action,
which has always resulted in a population of the attribute,
now emits an attribute event just like any other attribute set
operation and generates the same kind of history as one.  Additionally,
many mapper internal operations will no longer implicitly generate
these "None" values when various never-set attributes are checked.
These are subtle behavioral fixes to attribute mechanics which provide
a better solution to the problem of 🎫`3060`, which also
involves recognition of attributes explicitly set to ``None``
vs. attributes that were never set.
fixes #3061
2014-05-29 19:54:51 -04:00
Mike Bayer c030adee8b Merge branch 'master' into rel_1_0 2014-05-29 18:52:21 -04:00
Mike Bayer a04f0c1e37 relative here 2014-05-29 18:52:15 -04:00