]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
7 years agoMerge "Normalize check constraints even more radically"
mike bayer [Wed, 17 Jan 2018 23:09:00 +0000 (18:09 -0500)] 
Merge "Normalize check constraints even more radically"

7 years agoNormalize check constraints even more radically
Florian Apolloner [Wed, 17 Jan 2018 21:38:50 +0000 (16:38 -0500)] 
Normalize check constraints even more radically

This is the only way I could get this test pass on informix, basically I strip every whitespace.
The sql text as recorded in informix is:
```
((a > 1 ) AND (a < 5 ) )
((a = 1 ) OR ((a > 2 ) AND (a <5 ) ) )
```
Yes, this is absolutely bonkers, but that is what I get :(

Change-Id: I936e860f2b75b521e5560c05c452dbe72f0d3812
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/413

7 years agoMerge "Use NCHAR + setinputsizes() for all NVARCHAR2"
mike bayer [Wed, 17 Jan 2018 21:36:36 +0000 (16:36 -0500)] 
Merge "Use NCHAR + setinputsizes() for all NVARCHAR2"

7 years agoUse NCHAR + setinputsizes() for all NVARCHAR2
Mike Bayer [Tue, 16 Jan 2018 17:41:29 +0000 (12:41 -0500)] 
Use NCHAR + setinputsizes() for all NVARCHAR2

The cx_Oracle dialect now calls setinputsizes() with cx_Oracle.NCHAR
unconditionally when the NVARCHAR2 datatype, in SQLAlchemy corresponding
to sqltypes.Unicode(), is in use.  Per cx_Oracle's author this allows
the correct conversions to occur within the Oracle client regardless
of the setting for NLS_NCHAR_CHARACTERSET.

Change-Id: I3989b7aaf2178c263015a7433939196b76baf1e4
Fixes: #4163
7 years agoAdd 10054 to ODBC / SQL Server disconnect codes
Mike Bayer [Tue, 16 Jan 2018 18:02:17 +0000 (13:02 -0500)] 
Add 10054 to ODBC / SQL Server disconnect codes

Change-Id: I6e2518232608f47515b96984b4b7a41b8385975a
Fixes: #4164
7 years agoVersion 1.2.2 placeholder
Mike Bayer [Mon, 15 Jan 2018 14:50:19 +0000 (09:50 -0500)] 
Version 1.2.2 placeholder

Change-Id: I216bad829f83062988b0a624ae4bef6716979ef3

7 years ago- 1.2.1 rel_1_2_1
Mike Bayer [Mon, 15 Jan 2018 14:24:24 +0000 (09:24 -0500)] 
- 1.2.1

7 years ago- add missing 2018 update to conf.py
Mike Bayer [Mon, 15 Jan 2018 14:20:52 +0000 (09:20 -0500)] 
- add missing 2018 update to conf.py

Change-Id: Ie2d4ff9486375867ed6958b82cd2595bae43746d

7 years agoMerge "Make column-level collation quoting dialect-specific"
mike bayer [Fri, 12 Jan 2018 20:50:28 +0000 (15:50 -0500)] 
Merge "Make column-level collation quoting dialect-specific"

7 years agohappy new year
Mike Bayer [Fri, 12 Jan 2018 19:23:53 +0000 (14:23 -0500)] 
happy new year

Change-Id: I3ef36bfd0cb0ba62b3123c8cf92370a43156cf8f

7 years agoMerge "Limit select in loading for correct types"
mike bayer [Fri, 12 Jan 2018 18:47:35 +0000 (13:47 -0500)] 
Merge "Limit select in loading for correct types"

7 years agoMerge "Turn on testing for JSON under Mariadb 10.2.7 and greater"
mike bayer [Fri, 12 Jan 2018 18:45:20 +0000 (13:45 -0500)] 
Merge "Turn on testing for JSON under Mariadb 10.2.7 and greater"

7 years agoMerge "`ValuesBase.values` inconsistency fix"
mike bayer [Fri, 12 Jan 2018 18:43:46 +0000 (13:43 -0500)] 
Merge "`ValuesBase.values` inconsistency fix"

7 years agoMake column-level collation quoting dialect-specific
Mike Bayer [Wed, 10 Jan 2018 03:17:59 +0000 (22:17 -0500)] 
Make column-level collation quoting dialect-specific

Fixed regression in 1.2 where newly repaired quoting
of collation names in :ticket:`3785` breaks SQL Server,
which explicitly does not understand a quoted collation
name.   Whether or not mixed-case collation names are
quoted or not is now deferred down to a dialect-level
decision so that each dialect can prepare these identifiers
directly.

Change-Id: Iaf0a8123d9bf4711219e320896bb28c5d2649304
Fixes: #4154
7 years agoMerge "Set up of_type variable for legacy loader option deserialize"
mike bayer [Fri, 12 Jan 2018 18:00:49 +0000 (13:00 -0500)] 
Merge "Set up of_type variable for legacy loader option deserialize"

7 years agoLimit select in loading for correct types
Mike Bayer [Wed, 10 Jan 2018 04:03:40 +0000 (23:03 -0500)] 
Limit select in loading for correct types

Fixed bug in new "selectin" relationship loader where the loader could try
to load a non-existent relationship when loading a collection of
polymorphic objects, where only some of the mappers include that
relationship, typically when :meth:`.PropComparator.of_type` is being used.

This generalizes the mapper limiting that was present
in _load_subclass_via_in() to be part of the PostLoad object
itself, and is used by both polymorphic selectin loading and
relationship selectin loading.

Change-Id: I31416550e27bc8374b673860f57d9dcf96abe87d
Fixes: #4156
7 years agoMerge "Re-enable setinputsizes for Oracle TIMESTAMP"
mike bayer [Fri, 12 Jan 2018 16:31:02 +0000 (11:31 -0500)] 
Merge "Re-enable setinputsizes for Oracle TIMESTAMP"

7 years ago`ValuesBase.values` inconsistency fix
Aubrey Stark-Toller [Fri, 5 Jan 2018 20:06:23 +0000 (15:06 -0500)] 
`ValuesBase.values` inconsistency fix

Fixed bug in :meth:`.Insert.values` where using the "multi-values"
format in combination with :class:`.Column` objects as keys rather
than strings would fail.   Pull request courtesy Aubrey Stark-Toller.

Change-Id: I9d3b40b5950df8f5bfdc8b1d22f9c3afb277f17f
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/412
Fixes: #4162
7 years agoTurn on testing for JSON under Mariadb 10.2.7 and greater
Mike Bayer [Fri, 5 Jan 2018 20:42:34 +0000 (15:42 -0500)] 
Turn on testing for JSON under Mariadb 10.2.7 and greater

MariaDB adds a JSON alias for the LONGTEXT datatype and
all the same json functions work against it in any case.
What doesn't work is reflection, since it's just an alias,
and also the CAST we were using in one of our tests doesn't seem
to work for JSON which is probably also because it's not
a real datatype.

Change-Id: I44e5503db29ca2f04de8e521527978f34675a5e0

7 years agoSet up of_type variable for legacy loader option deserialize
Mike Bayer [Wed, 10 Jan 2018 20:27:33 +0000 (15:27 -0500)] 
Set up of_type variable for legacy loader option deserialize

Fixed regression where pickle format of a Load / _UnboundLoad object (e.g.
loader options) changed and ``__setstate__()`` was raising an
UnboundLocalError for an object received from the legacy format, even
though an attempt was made to do so.  tests are now added to ensure this
works.

Change-Id: Idccf643e010776817dd32512facdefa263188814
Fixes: #4159
7 years agoDisable the singletonthreadpool test cleanup no gc
Mike Bayer [Wed, 10 Jan 2018 04:35:23 +0000 (23:35 -0500)] 
Disable the singletonthreadpool test cleanup no gc

This test often fails on CI under load and reveals a small
race condition within SingleonThreadPool's "cleanup" system.
As this pool's "cleanup" system is pretty much never used in
any case since this pool is no longer used for SQLite file
databases, this race should have little impact, especially
since the occasional non-closed connection will get closed
out when it's GC'ed in any case.

Change-Id: I68aefc0f9bbfc708c95af0497844e65366fc8429

7 years agoRe-enable setinputsizes for Oracle TIMESTAMP
Mike Bayer [Mon, 8 Jan 2018 21:05:23 +0000 (16:05 -0500)] 
Re-enable setinputsizes for Oracle TIMESTAMP

Fixed regression where the removal of most setinputsizes
rules from cx_Oracle dialect impacted the TIMESTAMP
datatype's ability to retrieve fractional seconds.

Fixes: #4157
Change-Id: Ic53109fd199aea8b9c4da14355e125849b8b198f

7 years agoturn off pytest's latest plugin we didn't ask for, logging
Mike Bayer [Fri, 5 Jan 2018 20:31:10 +0000 (15:31 -0500)] 
turn off pytest's latest plugin we didn't ask for, logging

Change-Id: I24d57894c519366febbce268b04474182dfbb0a1

7 years agoDon't try to iterate chopped path if it's None
Mike Bayer [Thu, 4 Jan 2018 21:58:55 +0000 (16:58 -0500)] 
Don't try to iterate chopped path if it's None

Fixed regression caused by new lazyload caching scheme in :ticket:`3954`
where a query that makes use of loader options with of_type would cause
lazy loads of unrelated paths to fail with a TypeError.

Change-Id: I705ea0ac012bcc3856ca04109454952cb07a2a8b
Fixes: #4153
7 years agoMerge "Check for object was expunged before restoring after pk switch + rollback"
mike bayer [Thu, 4 Jan 2018 21:31:10 +0000 (16:31 -0500)] 
Merge "Check for object was expunged before restoring after pk switch + rollback"

7 years agoMerge "Add rule to prevent "GROUP BY <expr>" in tests"
mike bayer [Thu, 4 Jan 2018 21:29:52 +0000 (16:29 -0500)] 
Merge "Add rule to prevent "GROUP BY <expr>" in tests"

7 years agoMerge "Remove cx_oracle test rule from requirements"
mike bayer [Thu, 4 Jan 2018 21:29:27 +0000 (16:29 -0500)] 
Merge "Remove cx_oracle test rule from requirements"

7 years agoCheck for object was expunged before restoring after pk switch + rollback
Mike Bayer [Thu, 4 Jan 2018 19:09:32 +0000 (14:09 -0500)] 
Check for object was expunged before restoring after pk switch + rollback

Fixed bug where an object that is expunged during a rollback of
a nested or subtransaction which also had its primary key mutated
would not be correctly removed from the session, causing subsequent
issues in using the session.

Change-Id: I57e2888902015d67ee11857e44382818f1d2f8bc
Fixes: #4151
7 years agoAdd rule to prevent "GROUP BY <expr>" in tests
Mike Bayer [Thu, 4 Jan 2018 15:44:53 +0000 (10:44 -0500)] 
Add rule to prevent "GROUP BY <expr>" in tests

Added a new exclusion rule group_by_complex_expression
which disables tests that use "GROUP BY <expr>", which seems
to be not viable for at least two third party dialects.

Change-Id: I47284513382ae93f5a3d12c734b3a44643147c99

7 years agoRemove cx_oracle test rule from requirements
Mike Bayer [Thu, 4 Jan 2018 15:40:36 +0000 (10:40 -0500)] 
Remove cx_oracle test rule from requirements

Removed an oracle-specific requirements rule from the public
test suite that was interfering with third party dialect
suites.

Change-Id: Iebae510edcb8ef908dcd9be9222888e12caed97d

7 years agoMerge "added missing , (comma) in dialects/oracle/__init__"
mike bayer [Wed, 3 Jan 2018 15:41:02 +0000 (10:41 -0500)] 
Merge "added missing , (comma) in dialects/oracle/__init__"

7 years agoCheck for the endmost target when chaining contains()
Mike Bayer [Tue, 2 Jan 2018 22:56:45 +0000 (17:56 -0500)] 
Check for the endmost target when chaining contains()

Fixed regression in association proxy due to :ticket:`3769`
(allow for chained any() / has()) where contains() against
an association proxy chained in the form
(o2m relationship, associationproxy(m2o relationship, m2o relationship))
would raise an error regarding the re-application of contains()
on the final link of the chain.

Change-Id: Iea51ce84c2c5a332416fff10b1ba0e676cf0bad7
Fixes: #4150
7 years agoadded missing , (comma) in dialects/oracle/__init__
Miroslav Shubernetskiy [Tue, 2 Jan 2018 21:34:09 +0000 (16:34 -0500)] 
added missing , (comma) in dialects/oracle/__init__

Fixed regression in Oracle imports where a missing comma caused
an undefined symbol to be present.  Pull request courtesy
Miroslav Shubernetskiy.

Change-Id: I91e79c810522dedd4f2a4f3bc60d484bc06f24c2
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/411

7 years ago- Add notfound page
Mike Bayer [Fri, 29 Dec 2017 17:06:50 +0000 (12:06 -0500)] 
- Add notfound page

Change-Id: Ie62014ff70c2a517e11ac76f8022f87f706020df

7 years agoVersion 1.2.1 placeholder
Mike Bayer [Wed, 27 Dec 2017 20:10:45 +0000 (15:10 -0500)] 
Version 1.2.1 placeholder

Change-Id: I86523071ec947e368464411de3666cffb11fab6b

7 years ago- 1.2.0 rel_1_2_0
Mike Bayer [Wed, 27 Dec 2017 16:13:24 +0000 (11:13 -0500)] 
- 1.2.0

7 years agoMerge "Implement an error lookup"
mike bayer [Wed, 27 Dec 2017 16:12:41 +0000 (11:12 -0500)] 
Merge "Implement an error lookup"

7 years agoImplement an error lookup
Mike Bayer [Fri, 8 Dec 2017 23:08:40 +0000 (18:08 -0500)] 
Implement an error lookup

Add codes to commonly raised error messages and classes
that link back to fixed documentation sections
giving background on these messages.

Change-Id: I78d0660add7026bb662e20305a59283b20616954

7 years ago- call this 1.2.0
Mike Bayer [Tue, 26 Dec 2017 19:18:27 +0000 (14:18 -0500)] 
- call this 1.2.0

Change-Id: If8d60e5d44f387eba97fd9bb1dfa85947ce7f42f

7 years ago- move this migration note to the correct section
Mike Bayer [Tue, 26 Dec 2017 18:27:39 +0000 (13:27 -0500)] 
- move this migration note to the correct section

Change-Id: I321a29b4a7705221e905b2e5ca88bae8d04b7e99

7 years ago- formatting fix
Mike Bayer [Tue, 26 Dec 2017 18:23:04 +0000 (13:23 -0500)] 
- formatting fix

Change-Id: Ie03b9649c7fc1a41bd3072da2506917a1297702a

7 years agoMerge "Add an identity_token to the identity key"
mike bayer [Tue, 26 Dec 2017 18:04:52 +0000 (13:04 -0500)] 
Merge "Add an identity_token to the identity key"

7 years ago- put error messages into the TOC so they get a sidebar
Mike Bayer [Tue, 26 Dec 2017 17:32:30 +0000 (12:32 -0500)] 
- put error messages into the TOC so they get a sidebar
toc entry

Change-Id: I5cd98e0bf396afd10a431af8a16a7c654f7a5ca7

7 years agoAdd new errors section
Mike Bayer [Fri, 22 Dec 2017 17:35:30 +0000 (12:35 -0500)] 
Add new errors section

Adding this to master so that it can be published, in
advance of the exception-level site integration feature.

Change-Id: Ia2a61df8e5198b81ef8f5fbac91143767b70c26b

7 years agoAdd an identity_token to the identity key
Mike Bayer [Thu, 14 Dec 2017 15:20:50 +0000 (10:20 -0500)] 
Add an identity_token to the identity key

For the purposes of assisting with sharded setups, add a new
member to the identity key that can be customized.  this allows
sharding across databases where the primary key space is shared.

Change-Id: Iae3909f5d4c501b62c10d0371fbceb01abda51db
Fixes: #4137
7 years agoMerge "Add TRUNCATE to postgres autocommit regexp"
mike bayer [Mon, 18 Dec 2017 17:57:18 +0000 (12:57 -0500)] 
Merge "Add TRUNCATE to postgres autocommit regexp"

7 years agoAdd TRUNCATE to postgres autocommit regexp
Jacob Hayes [Fri, 15 Dec 2017 14:56:59 +0000 (09:56 -0500)] 
Add TRUNCATE to postgres autocommit regexp

Extends AUTOCOMMIT_REGEXP for the postgres dialect to include `TRUNCATE`.

Change-Id: I315e03674b89bb89aae669b8655481e4d890491e
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/407

7 years agoOpen up all cx_Oracle numeric tests, finish infinity support
Mike Bayer [Fri, 15 Dec 2017 15:56:18 +0000 (10:56 -0500)] 
Open up all cx_Oracle numeric tests, finish infinity support

Added some additional rules to fully handle ``Decimal('Infinity')``,
``Decimal('-Infinity')`` values with cx_Oracle numerics when using
``asdecimal=True``.

Allow remaining cx_Oracle numeric tests that were waiting
for the refactor to be finished and forgot to get enabled.

Change-Id: I1e2365176e34559c0230c84f800a7cfe0a034ed5
Fixes: #4064
7 years agoMerge remote-tracking branch 'origin/pr/403'
Mike Bayer [Fri, 15 Dec 2017 14:52:23 +0000 (09:52 -0500)] 
Merge remote-tracking branch 'origin/pr/403'

7 years agoMerge remote-tracking branch 'origin/pr/399'
Mike Bayer [Fri, 15 Dec 2017 14:49:43 +0000 (09:49 -0500)] 
Merge remote-tracking branch 'origin/pr/399'

7 years agoFully copy index expressions
Mike Bayer [Thu, 14 Dec 2017 18:58:58 +0000 (13:58 -0500)] 
Fully copy index expressions

Fixed bug where the :meth:`.Table.tometadata` method would not properly
accommodate :class:`.Index` objects that didn't consist of simple
column expressions, such as indexes against a :func:`.text` construct,
indexes that used SQL expressions or :attr:`.func`, etc.   The routine
now copies expressions fully to a new :class:`.Index` object while
substituting all table-bound :class:`.Column` objects for those
of the target table.

Also refined the means by which tometadata() checks if an Index
or UniqueConstraint is generated by a column-level flag, by propagating
an attribute "_column_flag=True" to such indexes/constraints.

Change-Id: I7ef1b8ea42f9933357ae35f241a5ba9838bac35b
Fixes: #4147
7 years agoMerge "Change visit name for ColumnElement"
mike bayer [Thu, 7 Dec 2017 15:21:37 +0000 (10:21 -0500)] 
Merge "Change visit name for ColumnElement"

7 years agoMerge "Disable eager loads for exists()"
mike bayer [Thu, 7 Dec 2017 15:21:00 +0000 (10:21 -0500)] 
Merge "Disable eager loads for exists()"

7 years agoDisable eager loads for exists()
Mike Bayer [Wed, 6 Dec 2017 21:22:31 +0000 (16:22 -0500)] 
Disable eager loads for exists()

The :meth:`.Query.exists` method will now disable eager loaders for when
the query is rendered.  Previously, joined-eager load joins would be rendered
unnecessarily as well as subquery eager load queries would be needlessly
generated.   The new behavior matches that of the :meth:`.Query.subquery`
method.

Fixes: #4032
Change-Id: Iacafc76aa9ae0b71928037fa9637e85ad434ee3a

7 years agoChange visit name for ColumnElement
Mike Bayer [Wed, 6 Dec 2017 19:12:42 +0000 (14:12 -0500)] 
Change visit name for ColumnElement

No SQLA built-in subclasses ColumnElement without specifying
an alternate visit_name, and user defined ColumnElement
subclasses should avoid being treated like ColumnClause,
e.g. where a Table is present.

Fixes: #4142
Change-Id: I15ed09ba8bdebae4cb0c7e5e5df3f59351477577

7 years agoMerge "Allow delete where clause to refer multiple tables."
mike bayer [Wed, 6 Dec 2017 06:01:07 +0000 (01:01 -0500)] 
Merge "Allow delete where clause to refer multiple tables."

7 years agoMerge "Propagate attachment events for ARRAY"
mike bayer [Tue, 5 Dec 2017 19:50:17 +0000 (14:50 -0500)] 
Merge "Propagate attachment events for ARRAY"

7 years agoAllow delete where clause to refer multiple tables.
inytar [Mon, 30 Oct 2017 16:01:49 +0000 (12:01 -0400)] 
Allow delete where clause to refer multiple tables.

Implemented "DELETE..FROM" syntax for Postgresql, MySQL, MS SQL Server
(as well as within the unsupported Sybase dialect) in a manner similar
to how "UPDATE..FROM" works.  A DELETE statement that refers to more than
one table will switch into "multi-table" mode and render the appropriate
"USING" or multi-table "FROM" clause as understood by the database.
Pull request courtesy Pieter Mulder.

For SQL syntaxes see:

Postgresql: https://www.postgresql.org/docs/current/static/sql-delete.html
MySQL: https://dev.mysql.com/doc/refman/5.7/en/delete.html#multiple-table_syntax
MSSQL: https://docs.microsoft.com/en-us/sql/t-sql/statements/delete-transact-sql
Sybase: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00801.1510/html/iqrefso/X315721.htm

Co-authored by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I6dfd57b49e44a095d076dc493cd2360bb5d920d3
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/392
Fixes: #959
7 years agoAdd missing changelog note for #4109
Mike Bayer [Mon, 4 Dec 2017 22:51:21 +0000 (17:51 -0500)] 
Add missing changelog note for #4109

No changelog note was written at all for #4109 despite
this feature being released as of 1.2.0b3 (based on merge
date of 10/10/2017 and 1.2.0b3 release date of 10/13/2017

Change-Id: Ic4bcdaad9450cb86ba0e7cd6a18dee48c21ab592
Fixes: #4109
7 years agoMerge "Intercept contains_eager() with of_type, set aliased / polymorphic"
mike bayer [Mon, 4 Dec 2017 22:37:51 +0000 (17:37 -0500)] 
Merge "Intercept contains_eager() with of_type, set aliased / polymorphic"

7 years agoIntercept contains_eager() with of_type, set aliased / polymorphic
Mike Bayer [Fri, 3 Nov 2017 15:11:48 +0000 (11:11 -0400)] 
Intercept contains_eager() with of_type, set aliased / polymorphic

Fixed bug in :func:`.contains_eager` query option where making use of a
path that used :meth:`.PropComparator.of_type` to refer to a subclass
across more than one level of joins would also require that the "alias"
argument were provided with the same subtype in order to avoid adding
unwanted FROM clauses to the query; additionally,  using
:func:`.contains_eager` across subclasses that use :func:`.aliased` objects
of subclasses as the :meth:`.PropComparator.of_type` argument will also
render correctly.

Change-Id: Ie1c10924faa45251aab1a076a3ba7ef9fb1bdeee
Fixes: #4130
7 years agoPropagate attachment events for ARRAY
Mike Bayer [Mon, 4 Dec 2017 21:40:20 +0000 (16:40 -0500)] 
Propagate attachment events for ARRAY

Fixed regression in :class:`.ARRAY` datatype caused by
:ticket:`3964`, which is essentially the same
issue as that of :ticket:`3832`, where column attachment events
for :class:`.ARRAY` would not be invoked.   This breaks the use case
of using declarative mixins that declare a :class:`.Column` which
makes use of :meth:`.MutableList.as_mutable`.

Change-Id: If8c57615860883837f6cf72661e46180a77778c1
Fixes: #4141
7 years agoAllow url.password to be an object
Mike Bayer [Mon, 4 Dec 2017 16:56:14 +0000 (11:56 -0500)] 
Allow url.password to be an object

The "password" attribute of the :class:`.url.URL` object can now be
any user-defined or user-subclassed string object that responds to the
Python ``str()`` builtin.   The object passed will be maintained as the
datamember :attr:`.url.URL.password_original` and will be consulted
when the :attr:`.url.URL.password` attribute is read to produce the
string value.

Change-Id: I91d101c3b10e135ae7e4de60a5104b51776db84f
Fixes: #4089
7 years agoFix regexp for expanding IN
Mike Bayer [Fri, 1 Dec 2017 18:22:23 +0000 (13:22 -0500)] 
Fix regexp for expanding IN

Fixed bug in new "expanding bind parameter" feature whereby if multiple
params were used in one statement, the regular expression would not
match the parameter name correctly.

Change-Id: Ifaf7d627aac4ead2a13c8dddccb5c515253d88e6
Fixes: #4140
7 years agoMerge remote-tracking branch 'origin/pr/401'
Mike Bayer [Fri, 1 Dec 2017 17:51:26 +0000 (12:51 -0500)] 
Merge remote-tracking branch 'origin/pr/401'

7 years agoAllow for the database to produce a UUID instance
Martijn Pieters [Wed, 22 Nov 2017 10:05:44 +0000 (10:05 +0000)] 
Allow for the database to produce a UUID instance

Some database adapters (specifically, pg8000) already produce a uuid.UUID()
instance for UUID columns. Account for this.

7 years agoMerge "add nullsfirst() / nullslast() to top-level imports"
mike bayer [Fri, 17 Nov 2017 15:32:29 +0000 (10:32 -0500)] 
Merge "add nullsfirst() / nullslast() to top-level imports"

7 years agoMerge "Add postgresql.MONEY"
mike bayer [Thu, 16 Nov 2017 15:27:59 +0000 (10:27 -0500)] 
Merge "Add postgresql.MONEY"

7 years agoadd nullsfirst() / nullslast() to top-level imports
Lele Gaifax [Wed, 15 Nov 2017 23:11:05 +0000 (18:11 -0500)] 
add nullsfirst() / nullslast() to top-level imports

Change-Id: Ieefcc4c30c1c17f43f2908d961e00815bae862bb
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/378

7 years agoAdd postgresql.MONEY
Cleber J Santos [Wed, 15 Nov 2017 23:09:23 +0000 (18:09 -0500)] 
Add postgresql.MONEY

Change-Id: I2b40faf583a84bc5b416e1ad3aa812896ea67a8c
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/395

7 years agoAdd license to Wheel metadata
Jeff Widman [Wed, 15 Nov 2017 23:10:25 +0000 (18:10 -0500)] 
Add license to Wheel metadata

https://wheel.readthedocs.io/en/stable/index.html#including-the-license-in-the-generated-wheel-file

Change-Id: Icf91b96ba534c8f835ad287e7840ac2a9d2ac502
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/397

7 years agoFix a typo in basic_relationships.rst.
Randy Barlow [Wed, 15 Nov 2017 17:53:12 +0000 (12:53 -0500)] 
Fix a typo in basic_relationships.rst.

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
7 years agoMerge "Add baked.Result.with_post_criteria method"
mike bayer [Mon, 13 Nov 2017 19:46:43 +0000 (14:46 -0500)] 
Merge "Add baked.Result.with_post_criteria method"

7 years agoPropagate kwargs for mysql concat, match
Mike Bayer [Mon, 13 Nov 2017 14:21:48 +0000 (09:21 -0500)] 
Propagate kwargs for mysql concat, match

Fixed bug where the MySQL "concat" and "match" operators failed to
propagate kwargs to the left and right expressions, causing compiler
options such as "literal_binds" to fail.

Also adds non-interpreted **kw for visit_create_index, visit_typeclause

Change-Id: Iaf54ac18949cc6a54f50678125f010b4f12c5673
Fixes: #4136
7 years agoAdd baked.Result.with_post_criteria method
Mike Bayer [Sun, 12 Nov 2017 23:44:41 +0000 (18:44 -0500)] 
Add baked.Result.with_post_criteria method

Added new method :meth:`.baked.Result.with_post_criteria` to baked
query system, allowing non-SQL-modifying transformations to take place
after the query has been pulled from the cache.  Among other things,
this method can be used with :class:`.horizontal_shard.ShardedQuery`
to set the shard identifier.   :class:`.horizontal_shard.ShardedQuery`
has also been modified such that its :meth:`.ShardedQuery.get` method
interacts correctly with that of :class:`.baked.Result`.

Change-Id: I04630c683240abbb4b99f0510a1a3dcb564815b4
Fixes: #4135
7 years ago- fix loop logic that was leaving out 10K items from
Mike Bayer [Thu, 9 Nov 2017 16:38:22 +0000 (11:38 -0500)] 
- fix loop logic that was leaving out 10K items from
example suites, fixes #4132

Change-Id: Icf07f33fc99a880d6165d300579ef5d2c366f6f5

7 years agoFix import in Inspector.reflecttable doc
Jacob Hayes [Thu, 9 Nov 2017 04:14:37 +0000 (22:14 -0600)] 
Fix import in Inspector.reflecttable doc

7 years ago- add new FAQ section re: MySQL failure modes
Mike Bayer [Fri, 3 Nov 2017 21:50:54 +0000 (17:50 -0400)] 
- add new FAQ section re: MySQL failure modes

Change-Id: I458dcf6290464c8bf140a376e9a8d2ee10937c08

7 years agoVersion 1.1.16 placeholder
Mike Bayer [Fri, 3 Nov 2017 21:07:06 +0000 (17:07 -0400)] 
Version 1.1.16 placeholder

Change-Id: Ia563c801f5f467084c49fc367f31b2385e0777bb
(cherry picked from commit 0274d80f8378b1bfb0c0857fec35fff380be53f9)

7 years ago- 1.1.15
Mike Bayer [Fri, 3 Nov 2017 21:06:59 +0000 (17:06 -0400)] 
- 1.1.15

(cherry picked from commit 0b33a8c48f184b6b530cfc4ee9af743c761845b2)

Change-Id: I1093dbb02844f6bea50639c0dd60d71de5c2d86f

7 years agoFix as many RST parse warnings as possible.
Mike Bayer [Fri, 3 Nov 2017 18:45:18 +0000 (14:45 -0400)] 
Fix as many RST parse warnings as possible.

Still a few I can't get.   Also 0.9 is EOL so hide the
unreleased notes.

Change-Id: If0e44d4a0b3e78e211f32d5c33b51b1a007c9c69

7 years agoAdd doc note for contains_eager() w/ subclasses.
Mike Bayer [Thu, 2 Nov 2017 17:53:34 +0000 (13:53 -0400)] 
Add doc note for contains_eager() w/ subclasses.

Change-Id: I9634136e1855a081c25b04bb6ae8248f0f94be1c
Fixes: #4130
7 years ago- cross-link of_type() correctly
Mike Bayer [Thu, 2 Nov 2017 17:40:43 +0000 (13:40 -0400)] 
- cross-link of_type() correctly

Change-Id: Iaacab5d2fe45b0b87fea922ec914e258dba9e30d

7 years agoAccommodate tuples for ColumnDefault.__repr__
Nicolas CANIART [Tue, 31 Oct 2017 15:34:10 +0000 (11:34 -0400)] 
Accommodate tuples for ColumnDefault.__repr__

Fixed bug where ``__repr__`` of :class:`.ColumnDefault` would fail
if the argument were a tuple.  Pull request courtesy Nicolas Caniart.

Change-Id: I08aa2448ef91054c43d6068ac54cedbdf7a83d64
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/1
Fixes: #4126
7 years ago- add notes that @comparator and @expression don't go together.
Mike Bayer [Tue, 31 Oct 2017 00:02:21 +0000 (20:02 -0400)] 
- add notes that @comparator and @expression don't go together.

Change-Id: I3fb366f8b49454453e4b6dada565c24c5ccb975e

7 years agoFilter attributes we don't map during a load_scalar_attributes
Mike Bayer [Sat, 28 Oct 2017 17:28:58 +0000 (13:28 -0400)] 
Filter attributes we don't map during a load_scalar_attributes

Fixed bug where a descriptor that is elsewhere a mapped column
or relationship within a hierarchy based on :class:`.AbstractConcreteBase`
would be referred towards during a refresh operation, causing an error
as the attribute is not mapped as a mapper property.
A similar issue can arise for other attributes like the "type" column
added by :class:`.AbstractConcreteBase` if the class fails to include
"concrete=True" in its mapper, however the check here should also
prevent that scenario from causing a problem.

Change-Id: I407b07a3a3e2c374da19fc86ed44b987d595dcfa
Fixes: #4124
7 years agoMerge "Rework autoescape to be a simple boolean; escape the escape character"
mike bayer [Thu, 26 Oct 2017 20:25:25 +0000 (16:25 -0400)] 
Merge "Rework autoescape to be a simple boolean; escape the escape character"

7 years ago- fix formatting
Mike Bayer [Thu, 26 Oct 2017 20:24:57 +0000 (16:24 -0400)] 
- fix formatting

Change-Id: I4085424656d8e7078dc46378129de6506c4141b2

7 years agoMerge "Test for EXCLUDE constraint duplicated index"
mike bayer [Thu, 26 Oct 2017 00:05:34 +0000 (20:05 -0400)] 
Merge "Test for EXCLUDE constraint duplicated index"

7 years agoTest for EXCLUDE constraint duplicated index
Mike Bayer [Wed, 25 Oct 2017 19:01:55 +0000 (15:01 -0400)] 
Test for EXCLUDE constraint duplicated index

An EXCLUDE constraint makes an index just like a UNIQUE does;
get_indexes() will receive this.  Test that this works out the
same way as it does for a UNIQUE.

Change-Id: I02ac7cbbb1ca0d1fcdcdbe9a8b8bd1ffee3e496c
Fixes: #4122
7 years agoFix / consolidate for SQL Server BINARY, VARBINARY
Ben Shen [Fri, 20 Oct 2017 15:31:59 +0000 (11:31 -0400)] 
Fix / consolidate for SQL Server BINARY, VARBINARY

Fixed bug where sqltypes.BINARY and sqltypes.VARBINARY datatypes
would not include correct bound-value handlers for pyodbc,
which allows the pyodbc.NullParam value to be passed that
helps with FreeTDS.

Co-authored by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I6e3c16a69465b4fbc7b17a1927fb5e66acee93cb
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/386
Fixes: #4121
7 years agoRework autoescape to be a simple boolean; escape the escape character
Mike Bayer [Tue, 24 Oct 2017 22:08:05 +0000 (18:08 -0400)] 
Rework autoescape to be a simple boolean; escape the escape character

Reworked the new "autoescape" feature introduced in
:ref:`change_2694` in 1.2.0b2 to be fully automatic; the escape
character now defaults to a forwards slash ``"/"`` and
is applied to percent, underscore, as well as the escape
character itself, for fully automatic escaping.  The
character can also be changed using the "escape" parameter.

Change-Id: I74894a2576983c0f6eb89480c9e5727f49fa9c25
Fixes: #2694
7 years agoModernize SQL server binary tests
Mike Bayer [Tue, 24 Oct 2017 16:40:25 +0000 (12:40 -0400)] 
Modernize SQL server binary tests

In preparation for I6e3c16a69465b4fbc7b17a1927fb5e66acee93cb
let's first use simplified binary test fixtures.

Change-Id: Ie0ac3ad194a64019bfcea0e5001cc8bdcf8a05e5

7 years agoMerge remote-tracking branch 'origin/pr/396'
Mike Bayer [Tue, 24 Oct 2017 14:40:05 +0000 (10:40 -0400)] 
Merge remote-tracking branch 'origin/pr/396'

7 years agoMerge remote-tracking branch 'origin/pr/394'
Mike Bayer [Tue, 24 Oct 2017 14:39:54 +0000 (10:39 -0400)] 
Merge remote-tracking branch 'origin/pr/394'

7 years agoMerge remote-tracking branch 'origin/pr/359'
Mike Bayer [Tue, 24 Oct 2017 14:39:43 +0000 (10:39 -0400)] 
Merge remote-tracking branch 'origin/pr/359'

7 years agoMerge remote-tracking branch 'origin/pr/393'
Mike Bayer [Tue, 24 Oct 2017 14:39:35 +0000 (10:39 -0400)] 
Merge remote-tracking branch 'origin/pr/393'

7 years agoRemove extra backslash
Yoichi NAKAYAMA [Tue, 24 Oct 2017 07:09:45 +0000 (16:09 +0900)] 
Remove extra backslash

7 years agoFix typo in "on duplicate key update" example
Yoichi NAKAYAMA [Tue, 24 Oct 2017 07:00:21 +0000 (16:00 +0900)] 
Fix typo in "on duplicate key update" example

7 years agoMerge "Resolve AliasedClass when determining owning class of association proxy"
mike bayer [Tue, 24 Oct 2017 00:56:06 +0000 (20:56 -0400)] 
Merge "Resolve AliasedClass when determining owning class of association proxy"