]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
8 years agoMerge "Handle BaseException in all _handle_dbapi_error"
mike bayer [Mon, 26 Sep 2016 18:16:32 +0000 (14:16 -0400)] 
Merge "Handle BaseException in all _handle_dbapi_error"

8 years ago- improve documentation for SessionTransaction re: parent
Mike Bayer [Sat, 24 Sep 2016 04:49:22 +0000 (00:49 -0400)] 
- improve documentation for SessionTransaction re: parent
and nested attributes and what these mean
- improve linking for after_transaction_create() / after_transaction_end()
events
- add public .parent attribute to detect top-level transaction within
these events

Change-Id: Ie7382bc8fe5de226160dcb6a5019e19fcc5af38e

8 years ago- clarify documentation on timezone flag, since Oracle has both
Mike Bayer [Thu, 22 Sep 2016 15:08:09 +0000 (11:08 -0400)] 
- clarify documentation on timezone flag, since Oracle has both
DATE / TIMESTAMP separately the timezone flag will not bump the
type to TIMESTAMP WITH TIMEZONE on that backend.

Change-Id: I185992093472e1620b8cf84872631a4d48f8edc3

8 years agoHandle BaseException in all _handle_dbapi_error
Mike Bayer [Wed, 21 Sep 2016 19:37:20 +0000 (15:37 -0400)] 
Handle BaseException in all _handle_dbapi_error

Tests illustrate that exceptions like GreenletExit and
even KeyboardInterrupt can corrupt the state of a DBAPI
connection like that of pymysql and mysqlclient.   Intercept
BaseException errors within the handle_error scheme and
invalidate just the connection alone in this case, but not
the whole pool.

The change is backwards-incompatible with a program that
currently intercepts ctrl-C within a database transaction
and wants to continue working on that transaction.  Ensure
the event hook can be used to reverse this behavior.

Change-Id: Ifaa013c13826d123eef34e32b7e79fff74f1b21b
Fixes: #3803
8 years agoEnsure mapper.polymorphic_on is polymorphic_prop.columns[0]
Mike Bayer [Wed, 21 Sep 2016 21:55:39 +0000 (17:55 -0400)] 
Ensure mapper.polymorphic_on is polymorphic_prop.columns[0]

Fixed bug where joined eager loading would fail for a polymorphically-
loaded mapper, where the polymorphic_on was set to an un-mapped
expression such as a CASE expression.

Change-Id: Iffe68196aaac592165c89684f09f4c06cd78ce54
Fixes: #3800
8 years agoMerge "Add exclude_tablespaces argument to Oracle"
mike bayer [Tue, 20 Sep 2016 23:36:00 +0000 (19:36 -0400)] 
Merge "Add exclude_tablespaces argument to Oracle"

8 years agoMerge "Add the "triggering mapper" to the configure_mappers error message."
mike bayer [Tue, 20 Sep 2016 17:58:55 +0000 (13:58 -0400)] 
Merge "Add the "triggering mapper" to the configure_mappers error message."

8 years agoAdd exclude_tablespaces argument to Oracle
David Fraser [Wed, 14 Sep 2016 19:10:42 +0000 (15:10 -0400)] 
Add exclude_tablespaces argument to Oracle

Allows the SYSTEM and SYSAUX tablespaces to be only
conditionally omitted when doing get_table_names()
and get_temp_table_names().

Change-Id: Ie6995873f05163f2ce473a6a9c2d958a30681b44
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/292

8 years ago- disable two phase testing for mysql entirely, build servers
Mike Bayer [Tue, 20 Sep 2016 17:56:17 +0000 (13:56 -0400)] 
- disable two phase testing for mysql entirely, build servers
have no time to deal with MySQL 5.7's issues

Change-Id: Ic5f4e5b0aff1b4b5210bc7b5da203f536561e585

8 years agoAdd the "triggering mapper" to the configure_mappers error message.
John Perkins [Fri, 5 Aug 2016 17:45:49 +0000 (13:45 -0400)] 
Add the "triggering mapper" to the configure_mappers error message.

There are cases where the originating mapper name is not
present in the exception message, such as relationship initialization
against an unmapped class.   Ensure the originating mapper is named
in the string output.

Pull-request: https://github.com/zzzeek/sqlalchemy/pull/298
Change-Id: I9f23bfa90b26dde9229ab7ec812eec9ceae48153

8 years agoMerge "Allow SQL expressions to be set on PK columns"
mike bayer [Tue, 20 Sep 2016 15:56:05 +0000 (11:56 -0400)] 
Merge "Allow SQL expressions to be set on PK columns"

8 years agoMerge "Exclude eq and ne from associative operators"
mike bayer [Tue, 20 Sep 2016 15:55:19 +0000 (11:55 -0400)] 
Merge "Exclude eq and ne from associative operators"

8 years agoMerge "Support bindparam() with callable for primaryjoin"
mike bayer [Tue, 20 Sep 2016 15:54:47 +0000 (11:54 -0400)] 
Merge "Support bindparam() with callable for primaryjoin"

8 years agoAllow SQL expressions to be set on PK columns
Mike Bayer [Tue, 20 Sep 2016 15:33:16 +0000 (11:33 -0400)] 
Allow SQL expressions to be set on PK columns

Removes an unnecessary transfer of modified PK column
value to the params dictionary, so that if the modified PK column
is already present in value_params, this remains in effect.  Also
propagate a new flag through to _emit_update_statements() that will
trip "return_defaults()" across the board if a PK col w/ SQL expression
change is present, and pull this PK value in _postfetch as well assuming
we're an UPDATE.

Change-Id: I9ae87f964df9ba8faea8e25e96b8327f968e5d1b
Fixes: #3801
8 years agoMerge "Fix ArgumentError access in Session._add_bind"
mike bayer [Mon, 19 Sep 2016 22:15:02 +0000 (18:15 -0400)] 
Merge "Fix ArgumentError access in Session._add_bind"

8 years agoExclude eq and ne from associative operators
John Passaro [Mon, 19 Sep 2016 19:43:46 +0000 (15:43 -0400)] 
Exclude eq and ne from associative operators

The "eq" and "ne" operators are no longer part of the list of
"associative" operators, while they remain considered to be
"commutative".  This allows an expression like ``(x == y) == z``
to be maintained at the SQL level with parenthesis.  Pull request
courtesy John Passaro.

Fixes: #3799
Change-Id: I3759d8987b35649d7418b6524316c9e70c857e68
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/308

8 years agoMerge "Additions to support HAAlchemy plugin"
mike bayer [Mon, 19 Sep 2016 20:25:51 +0000 (16:25 -0400)] 
Merge "Additions to support HAAlchemy plugin"

8 years agoSupport bindparam() with callable for primaryjoin
Mike Bayer [Mon, 19 Sep 2016 20:22:08 +0000 (16:22 -0400)] 
Support bindparam() with callable for primaryjoin

Fixes the comparison of bindparam() objects based on
the "callable" parameter being present which helps to correctly
detect use_get, and also checks for "callable" when detecting
parameters for value substitution and will not impact the
object if present.

Change-Id: I4c93ee5d404d2648dd9835beeae0c5fb67e37d19
Fixes: #3767
8 years agoFix ArgumentError access in Session._add_bind
Mike Bayer [Wed, 14 Sep 2016 19:11:13 +0000 (15:11 -0400)] 
Fix ArgumentError access in Session._add_bind

Fixes: #3798
Change-Id: Ib4e6344b599e871f9d46d36a5aeb7ba3104dc99b
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/293

8 years agoAdd "message 20017" (unexpected EOF from the server) to mssql.
Ken Robbins [Wed, 14 Sep 2016 19:13:30 +0000 (15:13 -0400)] 
Add "message 20017" (unexpected EOF from the server) to mssql.

Fixes: #3791
Change-Id: I0dade4fe0ecbb53b4a66881594f362986ba73ae8
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/89

8 years agoAdditions to support HAAlchemy plugin
Mike Bayer [Fri, 2 Sep 2016 19:10:32 +0000 (15:10 -0400)] 
Additions to support HAAlchemy plugin

- add a connect=True key to connection record to support
  pre-loading of _ConnectionRecord objects
- ensure _ConnectionRecord.close() leaves the record in a good
  state for reopening
- add _ConnectionRecord.record_info for persistent storage
- add "in_use" accessor based on fairy_ref being present or not
- allow for the exclusions system and SuiteRequirements to be
  usable without the full plugin_base setup.
- move some Python-env requirements to the importable
  requirements.py module.
- allow starttime to be queried
- add additional events for engine plugins
- have "dialect" be a first-class parameter to the pool,
  ensure the engine strategy supplies it up front

Change-Id: Ibf549f7a1766e49d335cd6f5e26bacfaef9a8229

8 years ago- latest mysql 5.7 also crashing on XA recovery, disable
Mike Bayer [Fri, 16 Sep 2016 16:55:33 +0000 (12:55 -0400)] 
- latest mysql 5.7 also crashing on XA recovery, disable
XA recovery for all MySQL

Change-Id: I4f77de521cd80c09fdf97e5bbe5dfd1c830dc3cb

8 years agoRepair foreign_keys population for Join._refresh_for_new_column
Mike Bayer [Thu, 15 Sep 2016 04:50:17 +0000 (00:50 -0400)] 
Repair foreign_keys population for Join._refresh_for_new_column

Fixed bug where setting up a single-table inh subclass of a joined-table
subclass which included an extra column would corrupt the foreign keys
collection of the mapped table, thereby interfering with the
initialization of relationships.

Change-Id: I04a0cf98fd456d12d5a5b9e77a46a01246969a63
Fixes: #3797
8 years ago- placeholder for 1.0.16 within 1.0 changelog
Mike Bayer [Thu, 15 Sep 2016 04:51:31 +0000 (00:51 -0400)] 
- placeholder for 1.0.16 within 1.0 changelog

Change-Id: I33405513dc216ad33c5ec4796bff73f75d5866c4
(cherry picked from commit 4017b2696498a1cb4804a3be32b522b542d5af90)

8 years agoMerge branch 'keeyipchan/fix-typo-in-comment-1473614966363' of https://bitbucket...
Mike Bayer [Tue, 13 Sep 2016 13:52:02 +0000 (09:52 -0400)] 
Merge branch 'keeyipchan/fix-typo-in-comment-1473614966363' of https://bitbucket.org/keeyipchan/sqlalchemy

8 years ago- also caveats for update() / delete() regarding single
Mike Bayer [Mon, 12 Sep 2016 22:36:01 +0000 (18:36 -0400)] 
- also caveats for update() / delete() regarding single
table inheritance

Change-Id: If1511812a22a53537409f902f73e2e52ae3e4a3d
(cherry picked from commit 992344334328dba385fe6aa7694cfe3c13adc9d6)

8 years ago- add caveat for bulk deletes that they are generally not feasible
Mike Bayer [Mon, 12 Sep 2016 22:17:18 +0000 (18:17 -0400)] 
- add caveat for bulk deletes that they are generally not feasible
for joined inheritance

Change-Id: I043a5842401d586aa3ff96d05e06b443ff03fa60

8 years agoFix typo in comment
keeyip chan [Sun, 11 Sep 2016 17:29:29 +0000 (17:29 +0000)] 
Fix typo in comment

8 years agoMerge "Allow stringify compiler to render unnamed column"
mike bayer [Fri, 2 Sep 2016 16:23:31 +0000 (12:23 -0400)] 
Merge "Allow stringify compiler to render unnamed column"

8 years agoRepair clauselist comparison to account for clause ordering
Mike Bayer [Fri, 2 Sep 2016 15:27:58 +0000 (11:27 -0400)] 
Repair clauselist comparison to account for clause ordering

Fixed bug where the "simple many-to-one" condition that allows  lazy
loading to use get() from identity map would fail to be  invoked if the
primaryjoin of the relationship had multiple clauses separated by AND
which were not in the same order as that of the primary key columns
being compared in each clause. This ordering
difference occurs for a composite foreign key where the table-bound
columns on the referencing side were not in the same order in the .c
collection as the primary key columns on the referenced side....which
in turn occurs a lot if one is using declarative mixins and/or
declared_attr to set up columns.

Change-Id: I66cce74f614c04ed693dc0d58ac8c952b2f8ae54
Fixes: #3788
8 years agoAllow stringify compiler to render unnamed column
Mike Bayer [Fri, 2 Sep 2016 15:48:15 +0000 (11:48 -0400)] 
Allow stringify compiler to render unnamed column

Stringify of expression with unnamed :class:`.Column` objects, as
occurs in lots of situations including ORM error reporting,
will now render the name in string context as "<name unknown>"
rather than raising a compile error.

Change-Id: I76f637c5eb4cfdb1b526964cb001565b97e296da
Fixes: #3789
8 years ago- add 1.0.15 release date
Mike Bayer [Thu, 1 Sep 2016 17:20:31 +0000 (13:20 -0400)] 
- add 1.0.15 release date

Change-Id: I5d3f74c002f9d4593940ab4d68a3b35f3f227597

8 years agoSupport all MySQL/Connector int/bool arguments
Mike Bayer [Thu, 1 Sep 2016 13:34:33 +0000 (09:34 -0400)] 
Support all MySQL/Connector int/bool arguments

Added support for parsing MySQL/Connector boolean and integer
arguments within the URL query string: connection_timeout,
connect_timeout, pool_size, get_warnings,
raise_on_warnings, raw, consume_results, ssl_verify_cert, force_ipv6,
pool_reset_session, compress, allow_local_infile, use_pure.

Change-Id: I2a1a17d13d47d56871bff32e94fdbed8bc003ad7
Fixes: #3787
8 years agoCheck for supports_execution at ClauseElement base
Mike Bayer [Wed, 31 Aug 2016 18:34:54 +0000 (14:34 -0400)] 
Check for supports_execution at ClauseElement base

Raise a more descriptive exception / message when ClauseElement
or non-SQLAlchemy objects that are not "executable" are erroneously
passed to ``.execute()``; a new exception ObjectNotExecutableError
is raised consistently in all cases.

Change-Id: I2dd393121e2c7e5b6b9e40286a2f25670876e8e4
Fixes: #3786
8 years agoCorrects typo
Edouard Berthe [Wed, 31 Aug 2016 06:52:48 +0000 (16:52 +1000)] 
Corrects typo

This example doesn't work with 'back_populates' because 'parent_associations' and 'child_associations' are not defined in Parent and Child classes respectively.
Alternatively, we could create 'parent_associations' and 'child_associations' into the classes.

8 years agoMerge remote-tracking branch 'origin/pr/304'
Mike Bayer [Sun, 28 Aug 2016 13:46:11 +0000 (09:46 -0400)] 
Merge remote-tracking branch 'origin/pr/304'

8 years agoMerge remote-tracking branch 'origin/pr/303'
Mike Bayer [Sun, 28 Aug 2016 13:45:54 +0000 (09:45 -0400)] 
Merge remote-tracking branch 'origin/pr/303'

8 years agoProvide more informative error when joining with no entities
Michael Williamson [Sun, 28 Aug 2016 11:38:04 +0000 (12:38 +0100)] 
Provide more informative error when joining with no entities

8 years agoFix table reference in PostgreSQL documentation
Michael Williamson [Sun, 28 Aug 2016 11:22:42 +0000 (12:22 +0100)] 
Fix table reference in PostgreSQL documentation

8 years agoFixed example of upsert in the HasCTE.cte docstring by
Vladimir Magamedov [Sat, 27 Aug 2016 11:17:49 +0000 (14:17 +0300)] 
Fixed example of upsert in the HasCTE.cte docstring by
replacing it with more concrete and working example.

8 years agoRaise when two validators conflict
Mike Bayer [Fri, 26 Aug 2016 16:56:01 +0000 (12:56 -0400)] 
Raise when two validators conflict

Two @validates decorators that make use of the same name
is not supported.  Raise an exception.

Change-Id: Ia3e89ffdc9ef345a0de258e2ac0ac5e0bd421c61
Fixes: #3776
8 years agoMerge "Add docstring to declarative_base"
mike bayer [Mon, 22 Aug 2016 14:49:48 +0000 (10:49 -0400)] 
Merge "Add docstring to declarative_base"

8 years ago- fix wrong var name, credit to @RazerM
Mike Bayer [Wed, 17 Aug 2016 22:26:34 +0000 (18:26 -0400)] 
- fix wrong var name, credit to @RazerM

Change-Id: I36fbbfd1223ef5298c679f46db24e1bf3013cef0

8 years agoMerge remote-tracking branch 'origin/pr/299'
Mike Bayer [Tue, 16 Aug 2016 16:04:41 +0000 (12:04 -0400)] 
Merge remote-tracking branch 'origin/pr/299'

8 years agoMerge remote-tracking branch 'origin/pr/300'
Mike Bayer [Tue, 16 Aug 2016 16:03:24 +0000 (12:03 -0400)] 
Merge remote-tracking branch 'origin/pr/300'

8 years agoRework _apply_joins(), _prep_for_joins() totally
Mike Bayer [Mon, 15 Aug 2016 20:39:12 +0000 (16:39 -0400)] 
Rework _apply_joins(), _prep_for_joins() totally

The approach here is still error prone
and hard to follow.  Reorganize the whole
thing to take a pretty blunt approach to
the structure of to_join().  Also fix some never-called
code (!) in _prep_for_joins() and ensure we re-use
an aliased object.

Fixes: #3774
Change-Id: Ie6319415ae7213b4a33eac2ab70803ad2880d340

8 years agoMerge "Ensure final link in subqueryload join is correct"
mike bayer [Sat, 13 Aug 2016 14:39:52 +0000 (10:39 -0400)] 
Merge "Ensure final link in subqueryload join is correct"

8 years ago- fill in forwards-ports for 1.1 in 1.0 changelog
Mike Bayer [Sat, 13 Aug 2016 03:39:49 +0000 (23:39 -0400)] 
- fill in forwards-ports for 1.1 in 1.0 changelog

Change-Id: I8d44b90bb9d05275de19d3ce2d9124050add5f01

8 years agoEnsure final link in subqueryload join is correct
Mike Bayer [Sat, 13 Aug 2016 03:35:40 +0000 (23:35 -0400)] 
Ensure final link in subqueryload join is correct

Fixed bug in subquery eager loading where a subqueryload
of an "of_type()" object linked to a second subqueryload of a plain
mapped class would fail to link the joins correctly.

Change-Id: I4be89e6f5e492438464a2ded01eb9c84d7ff7d4e
Fixes: #3773
8 years ago- fix this test which did not allow for the A/ ASub to be loaded
Mike Bayer [Sat, 13 Aug 2016 02:58:34 +0000 (22:58 -0400)] 
- fix this test which did not allow for the A/ ASub to be loaded
polymorphically

Change-Id: Id82435fa16b0456f32bce49715c6606e3a1534c8

8 years ago- add another example for chained polymorphic eager loading
Mike Bayer [Thu, 11 Aug 2016 16:03:38 +0000 (12:03 -0400)] 
- add another example for chained polymorphic eager loading

Change-Id: I87918ab4cd294d4b4a87a377c7b6b21105f4fd55
(cherry picked from commit 68b6984912760bfe4d9270750d8f39b9036b65b5)

8 years ago- small updates to polymorphic eager loading, cross-link from
Mike Bayer [Thu, 11 Aug 2016 15:45:03 +0000 (11:45 -0400)] 
- small updates to polymorphic eager loading, cross-link from
loading documentation

Change-Id: I3ce7e2cc521c4dd155195819a919017d4cc63b3c

8 years agoFix documentation basic example (missing imports)
Romuald Brunet [Thu, 11 Aug 2016 15:24:05 +0000 (17:24 +0200)] 
Fix documentation basic example (missing imports)

8 years agoSpelling fixes
Ville Skyttä [Mon, 8 Aug 2016 13:39:15 +0000 (16:39 +0300)] 
Spelling fixes

8 years agoAdd docstring to declarative_base
Frazer McLean [Mon, 25 Jul 2016 22:02:03 +0000 (00:02 +0200)] 
Add docstring to declarative_base

Change-Id: I5ad44362515908592f1e8b1e6254a5270d43234a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/295

8 years agoBuild string/int processors for JSONIndexType, JSONPathType
Mike Bayer [Thu, 4 Aug 2016 15:56:31 +0000 (11:56 -0400)] 
Build string/int processors for JSONIndexType, JSONPathType

Fixed regression in JSON datatypes where the "literal processor" for
a JSON index value, that needs to take effect for example within DDL,
would not be invoked for the value.  The native String and Integer
datatypes are now called upon from within the JSONIndexType
and JSONPathType.  This is applied to the generic, Postgresql, and
MySQL JSON types.

Change-Id: Ifa5f2acfeee57a79d01d7fc85d265a37bd27c716
Fixes: #3765
8 years agoPropagate kwargs to all MySQL CAST paths
Mike Bayer [Thu, 4 Aug 2016 16:34:55 +0000 (12:34 -0400)] 
Propagate kwargs to all MySQL CAST paths

Change-Id: I23a6abb26bbbe3d118887d043ce761fc4572d8d2
Fixes: #3766
8 years agoWarn that bulk save groups inserts/updates by type
brln [Tue, 2 Aug 2016 22:37:35 +0000 (18:37 -0400)] 
Warn that bulk save groups inserts/updates by type

Users who pass many different object types to bulk_save_objects
may be surprised that the INSERT/UPDATE batches must necessarily
be broken up by type.  Add this to the list of caveats.

Co-authored-by: Mike Bayer
Change-Id: I8390c1c971ced50c41268b479a9dcd09c695b135
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/294

8 years agoMerge remote-tracking branch 'origin/pr/296'
Mike Bayer [Tue, 2 Aug 2016 22:34:05 +0000 (18:34 -0400)] 
Merge remote-tracking branch 'origin/pr/296'

8 years agoMerge branch 'declarative-constructor-reference' of https://bitbucket.org/michaelwill...
Mike Bayer [Tue, 2 Aug 2016 22:29:11 +0000 (18:29 -0400)] 
Merge branch 'declarative-constructor-reference' of https://bitbucket.org/michaelwilliamson/sqlalchemy

8 years agoEnsure post-__clause_element__() expression are used in Index
Mike Bayer [Sun, 31 Jul 2016 04:10:04 +0000 (00:10 -0400)] 
Ensure post-__clause_element__() expression are used in Index

The change in Index for 1.1 combined with the fix for
ref #3763 still fails to deliver the correct object
resolved by __clause_element__() to the list of expressions
for compilation.   Make sure we use the expression that's
been unwrapped from __clause_element__().

Change-Id: Ie1df8db5090de665048331786f0024d52851923f
Fixes: #3763
8 years agoMerge "Index should extract __clause_element__() early"
mike bayer [Sat, 30 Jul 2016 16:54:10 +0000 (12:54 -0400)] 
Merge "Index should extract __clause_element__() early"

8 years agoMerge "Clarify order_by(False)"
mike bayer [Sat, 30 Jul 2016 16:53:26 +0000 (12:53 -0400)] 
Merge "Clarify order_by(False)"

8 years agoIndex should extract __clause_element__() early
Mike Bayer [Fri, 29 Jul 2016 22:17:43 +0000 (18:17 -0400)] 
Index should extract __clause_element__() early

Fixed bug where :class:`.Index` would fail to extract columns from
compound SQL expressions if those SQL expressions were wrapped inside
of an ORM-style ``__clause_element__()`` construct.  This bug
exists in 1.0.x as well, however in 1.1 is more noticeable as
hybrid_property @expression now returns a wrapped element.

Fixes: #3763
Change-Id: I992536386503a1fb3f2305790abe008d72c44c4a

8 years ago- Consoliate test/sql/test_constraint ConstraintAPITest
Mike Bayer [Sat, 30 Jul 2016 14:06:53 +0000 (10:06 -0400)] 
- Consoliate test/sql/test_constraint ConstraintAPITest
and test/sql/test_metadata IndexTest into
test/sql/test_metadata ConstraintTest

Change-Id: I7aeee9a1edbbd889200afc393695f73d5fbac3f3

8 years agoMerge "Allow None to cancel Query.group_by()"
mike bayer [Fri, 29 Jul 2016 23:03:38 +0000 (19:03 -0400)] 
Merge "Allow None to cancel Query.group_by()"

8 years agoClarify order_by(False)
Mike Bayer [Fri, 29 Jul 2016 22:50:18 +0000 (18:50 -0400)] 
Clarify order_by(False)

It wasn't clear how this differs from order_by(None);
add more tests and document that this has to do with whether or
not mapper.order_by will be re-enabled as well.

Change-Id: I332e8ac60c999b38c5a243f1cb72de3cf77891b6

8 years agoAllow None to cancel Query.group_by()
Iuri Diniz [Fri, 29 Jul 2016 16:54:22 +0000 (12:54 -0400)] 
Allow None to cancel Query.group_by()

This replicates the same behavior as order_by().

order_by() will also be updated to deprecate passing
of False as this is no longer functionally different
than passing None.

Change-Id: I2fc05d0317d28b6c83373769a48f7eea32d56290
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/297

8 years agoMerge "Enable JSON testing for pymysql"
mike bayer [Fri, 29 Jul 2016 22:22:49 +0000 (18:22 -0400)] 
Merge "Enable JSON testing for pymysql"

8 years ago- next release is 1.1.0
Mike Bayer [Fri, 29 Jul 2016 22:18:10 +0000 (18:18 -0400)] 
- next release is 1.1.0

Change-Id: I1d8ac48e6457e80e93b925152f434c13139b3d94

8 years agoEnable JSON testing for pymysql
Mike Bayer [Fri, 29 Jul 2016 15:05:28 +0000 (11:05 -0400)] 
Enable JSON testing for pymysql

PyMySQL upstream has released 0.7.6 which should resolve
JSON encoding issues.

Change-Id: Icf543d48dace1419a0aac78bdb15ec666f0edafe
Fixes: #3754
9 years ago- Document how SQL Server does MAX with VARCHAR, NVARCHAR
Mike Bayer [Wed, 27 Jul 2016 14:04:52 +0000 (10:04 -0400)] 
- Document how SQL Server does MAX with VARCHAR, NVARCHAR
Fixes #3760

Change-Id: I0613eb66bfdc9d7118688c74e29c8da322c3b4db

9 years ago- 1.1.0b3 rel_1_1_0b3
Mike Bayer [Tue, 26 Jul 2016 15:25:52 +0000 (11:25 -0400)] 
- 1.1.0b3

9 years agoFix typo
Jeff Widman [Tue, 26 Jul 2016 02:07:19 +0000 (19:07 -0700)] 
Fix typo

9 years agoFix reference to _declarative_constructor in docstring
Michael Williamson [Mon, 25 Jul 2016 13:08:43 +0000 (13:08 +0000)] 
Fix reference to _declarative_constructor in docstring

9 years agoAllow Table._reset_exported to silently pass
Mike Bayer [Sun, 24 Jul 2016 21:37:25 +0000 (17:37 -0400)] 
Allow Table._reset_exported to silently pass

Fixed bug in :class:`.Table` where the internal method
``_reset_exported()`` would corrupt the state of the object.  This
method is intended for selectable objects and is called by the ORM
in some cases; an erroneous mapper configuration would could lead the
ORM to call this on on a :class:`.Table` object.

Change-Id: I63fa34ee0cdf16358bb125c556390df79758bcbc
Fixes: #3755
9 years ago- MySQL's JSON shared implementation completely w/ sqltypes.JSON;
Mike Bayer [Mon, 25 Jul 2016 03:14:47 +0000 (23:14 -0400)] 
- MySQL's JSON shared implementation completely w/ sqltypes.JSON;
this must have been an oversight.   Leave mysql.JSON in place still
as we might need to add things to it.
- CAST(json, String) still confusing MySQL drivers even mysqlclient.
Since here we're checking for the raw form of the JSON and not a typical
round trip, add a force for unicode

Change-Id: I727f4526a01a0875037cf0dede45cd074da5205a

9 years ago- don't use pymysql at all for JSON, there's Py2K failures also
Mike Bayer [Sun, 24 Jul 2016 22:29:25 +0000 (18:29 -0400)] 
- don't use pymysql at all for JSON, there's Py2K failures also

Change-Id: I39a574ea72f5c7af0084dee3169679c5f534cb8b

9 years ago- Workaround in tests for https://github.com/PyMySQL/PyMySQL/issues/488
Mike Bayer [Sun, 24 Jul 2016 21:48:33 +0000 (17:48 -0400)] 
- Workaround in tests for https://github.com/PyMySQL/PyMySQL/issues/488

Change-Id: I4f935cce878eb1678b432f4cb4ba6ee122f8e9d4

9 years ago- a variety of test adjustments to accomodate for MySQL 5.7
Mike Bayer [Sun, 24 Jul 2016 20:36:27 +0000 (16:36 -0400)] 
- a variety of test adjustments to accomodate for MySQL 5.7

Change-Id: Ied4245433d0d7b469dae6e7394c4931d8405f387

9 years agoRemove same-named relationship warning
Mike Bayer [Tue, 19 Jul 2016 16:36:21 +0000 (12:36 -0400)] 
Remove same-named relationship warning

Removed a warning that dates back to 0.4 which emits when a same-named
relationship is placed on two mappers that inherits via joined or
single table inheritance.   The warning does not apply to the
current unit of work implementation.

Change-Id: If528ec3a2f4dc60712d9044fd1ec6c4dfbf0eadb
Fixes: #3749
9 years ago- fix formatting
Mike Bayer [Mon, 18 Jul 2016 20:43:42 +0000 (16:43 -0400)] 
- fix formatting

Change-Id: Ieba940a998a6aa287864e9748c2995ee4ae5bf54

9 years agoMerge "Add `default` parameter for `index_property`"
mike bayer [Wed, 13 Jul 2016 18:10:00 +0000 (14:10 -0400)] 
Merge "Add `default` parameter for `index_property`"

9 years agoEnsure DML provides named_with_column for CTE(Alias)
Mike Bayer [Tue, 12 Jul 2016 20:53:37 +0000 (16:53 -0400)] 
Ensure DML provides named_with_column for CTE(Alias)

Fixed bug in new CTE feature for update/insert/delete whereby
an anoymous (e.g. no name passed) :class:`.CTE` construct around
the statement would fail.  The Alias base class of CTE checks
for the "named_with_column" attribute in order to detect if
the underlying selectable has a name; UpdateBase now provides
this as False.

Change-Id: I4b0309db21379a4c0cb93085298c86da3cf840e4
Fixes: #3744
9 years agoMerge "Work w/ prefetch even for selects, if present"
mike bayer [Wed, 13 Jul 2016 15:48:41 +0000 (11:48 -0400)] 
Merge "Work w/ prefetch even for selects, if present"

9 years agoWork w/ prefetch even for selects, if present
Mike Bayer [Tue, 12 Jul 2016 20:38:22 +0000 (16:38 -0400)] 
Work w/ prefetch even for selects, if present

Fixed bug in new CTE feature for update/insert/delete stated
as a CTE inside of an enclosing statement (typically SELECT) whereby
oninsert and onupdate values weren't called upon for the embedded
statement.

This is accomplished by consulting prefetch
for all statements.  The collection is also broken into
separate insert/update collections so that we don't need to
consult toplevel self.isinsert to determine if the prefetch
is for an insert or an update.  What we don't yet test for
are CTE combinations that have both insert/update in one
statement, though these should now work in theory provided
the underlying database supports such a statement.

Change-Id: I3b6a860e22c86743c91c56a7ec751ff706f66f64
Fixes: #3745
9 years agoFix issue with unbaking subqueries
Mark Hahnenberg [Tue, 12 Jul 2016 18:07:52 +0000 (14:07 -0400)] 
Fix issue with unbaking subqueries

Fix improper capture of a loop variable inside a lambda during unbaking
of subquery eager loaders, which would cause the incorrect query
to be invoked.

Fixes: #3743
Change-Id: I995110deb8ee2dae8540486729e1ae64578d28fc
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/290

9 years ago- 1.0.15 for dev
Mike Bayer [Tue, 12 Jul 2016 18:04:40 +0000 (14:04 -0400)] 
- 1.0.15 for dev

Change-Id: I2d75b6d9ca533e662bc8160cf5fc52355e5e549e

9 years agoUpdate index.rst
Shige Takeda [Mon, 11 Jul 2016 22:58:43 +0000 (15:58 -0700)] 
Update index.rst

9 years agoUpdate index.rst
Shige Takeda [Mon, 11 Jul 2016 22:56:12 +0000 (15:56 -0700)] 
Update index.rst

9 years agoAdd `default` parameter for `index_property`
Jeong YunWon [Sun, 3 Jul 2016 13:23:45 +0000 (22:23 +0900)] 
Add `default` parameter for `index_property`

And force to use keyword arguments for trivial parameters in index_property

Change-Id: I12a178128182f77a2d06b52d7e36f59a36b45a33

9 years ago- fix typo
Mike Bayer [Thu, 7 Jul 2016 20:07:08 +0000 (16:07 -0400)] 
- fix typo

Change-Id: Ie66d419a5188529a64fcb2e2463c15c26863889f

9 years agoAdd additional documentation re: JSONEncodedDict
Mike Bayer [Thu, 7 Jul 2016 20:00:18 +0000 (16:00 -0400)] 
Add additional documentation re: JSONEncodedDict

Add an example of how to use coerce_compared_value()
specific to JSONEncodedDict, as this example class
is frequently dropped into applications.

Change-Id: I61639ac03dc5a37673ee8201b99a3c36ab944f00
Fixes: #3742
9 years ago- 1.0.14 changelog update
Mike Bayer [Wed, 6 Jul 2016 21:10:19 +0000 (17:10 -0400)] 
- 1.0.14 changelog update

(cherry picked from commit e9a1d7bc6a0ae4ec09b6431d23d201654013c6a7)

Change-Id: I5bab3fd6f2ec4986fd6b1049844f3851958d0c66

9 years agoMerge "Adapt "FOR UPDATE OF" with Oracle limit/offset"
mike bayer [Wed, 6 Jul 2016 14:13:56 +0000 (10:13 -0400)] 
Merge "Adapt "FOR UPDATE OF" with Oracle limit/offset"

9 years agoAdapt "FOR UPDATE OF" with Oracle limit/offset
Mike Bayer [Tue, 5 Jul 2016 16:48:41 +0000 (12:48 -0400)] 
Adapt "FOR UPDATE OF" with Oracle limit/offset

This modifies the Oracle ROWNUM limit/offset approach
to accommodate for the "OF" clause in a "FOR UPDATE"
phrase.  The column expressions must be added to the selected
subquery if necessary and adapted on the outside.

Change-Id: Ia71b5fc4df6d326e73863f8ae9f96e8f1a5acfc1
Fixes: #3741
9 years ago`index_property` catches IndexError as well as KeyError
Jeong YunWon [Sun, 3 Jul 2016 12:45:15 +0000 (21:45 +0900)] 
`index_property` catches IndexError as well as KeyError

It was raising AttributeError for key accessing in dict,
but raising IndexError for index accessing in array.

Change-Id: I58a2252a9e8d7f78cabcefcbe7223a4f3a729115

9 years ago- version bump
Mike Bayer [Tue, 5 Jul 2016 17:05:07 +0000 (13:05 -0400)] 
- version bump

Change-Id: I5ace1a90f36678c006d704b452fbbe8a3eb1cd0a

9 years agoRepair PG BIGSERIAL w/ TypeDecorator, Variant
Mike Bayer [Mon, 4 Jul 2016 20:37:26 +0000 (16:37 -0400)] 
Repair PG BIGSERIAL w/ TypeDecorator, Variant

Some of the dialect impl memoization for TypeDecorator
necessarily keeps the top-level TypeDecorator type
around, since a user-defined type will have bind and result
set processing behavior.  For both TypeDecorator and Variant,
PG dialect needs to ensure it's looking at the SQLAlchemy
type to check for SmallInteger / BigInteger.

Fixes: 3739
Change-Id: I2d45fb997f17c6272d6bb826a77d2dba665adae7
(cherry picked from commit 421fa6b8bf9f0c3c5041579c89ec405ce0f5e0b0)

9 years agoMerge remote-tracking branch 'origin/pr/288'
Mike Bayer [Mon, 4 Jul 2016 19:37:58 +0000 (15:37 -0400)] 
Merge remote-tracking branch 'origin/pr/288'