]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
7 years agoFirst level repair for cx_Oracle 6.0 test regressions
Mike Bayer [Fri, 18 Aug 2017 17:04:14 +0000 (13:04 -0400)] 
First level repair for cx_Oracle 6.0 test regressions

Fixed more regressions caused by cx_Oracle 6.0; at the moment, the only
behavioral change for users is disconnect detection now detects for
cx_Oracle.DatabaseError in addition to cx_Oracle.InterfaceError, as
this behavior seems to have changed.   Other issues regarding numeric
precision and uncloseable connections are pending with the upstream
cx_Oracle issue tracker.

Change-Id: Id61f1e33b21c155a598396340dfdecd28ff4066b
Fixes: #4045
(cherry picked from commit 03255a5a0fc6aa8acfff99ed9e62d58054b8b6af)

7 years ago- ensure identifier re-use doesn't make this break
Mike Bayer [Tue, 22 Aug 2017 17:55:49 +0000 (13:55 -0400)] 
- ensure identifier re-use doesn't make this break

Change-Id: I9fe6c42c097d31b50a479250d39a3cd8ebcbffaf
(cherry picked from commit 41549de9609bce90942ca6afc75978d5254c8fd5)

7 years ago- allow a separate template database to be used for
Mike Bayer [Tue, 22 Aug 2017 17:12:43 +0000 (13:12 -0400)] 
- allow a separate template database to be used for
PG CREATE DATABASE.  as nobody will connect to it that would
solve the contention issue here
- backport --nomemory since tox.ini is using it

Change-Id: I00a4d52091876e120faff4a8a5493c53280d96f1
(cherry picked from commit 4c306818396c8cc98a16a14c5ed3361cf6ff373a)

7 years ago- repair --dbs
Mike Bayer [Tue, 22 Aug 2017 17:07:24 +0000 (13:07 -0400)] 
- repair --dbs

Change-Id: I69e39d2368f50b126c369ecc35e01799fd013254
(cherry picked from commit 3fc6f32ddc5fbbf439acff42c2fdae9e910154be)

7 years ago- still supporting py2.6 in 1.1 (!)
Mike Bayer [Tue, 22 Aug 2017 13:41:40 +0000 (09:41 -0400)] 
- still supporting py2.6 in 1.1 (!)

Change-Id: Iaaababf83b9c3a6e4dc784fc9807bed01c90b69b

7 years ago- simplify and see if it still works
Mike Bayer [Tue, 22 Aug 2017 02:12:30 +0000 (22:12 -0400)] 
- simplify and see if it still works

Change-Id: Id0cf7ae2223507d413aaa22e5f8df066b7ac2b46
(cherry picked from commit fe5eede555973044aceda038e28a190ebb483579)

7 years agomerge PG fixes from master
Mike Bayer [Tue, 22 Aug 2017 00:15:21 +0000 (20:15 -0400)] 
merge PG fixes from master

Change-Id: I5630eb8ba503c567bebddd10f6e525ceb3dd5998

7 years agofix a typo
hsmtkk [Wed, 16 Aug 2017 09:38:40 +0000 (18:38 +0900)] 
fix a typo

(cherry picked from commit 58fb83c45b2100f3cf9308c04eefb87e79202aac)

7 years ago- filter out non-oracle URLs
Mike Bayer [Mon, 21 Aug 2017 16:08:01 +0000 (12:08 -0400)] 
- filter out non-oracle URLs

Change-Id: I475f744f8801bc923d738e466d208d662e707413
(cherry picked from commit 97e455f21b513936b7afda760c2ab0f3c04a12fd)

7 years ago- this test doesn't work in strict mode, not that important
Mike Bayer [Mon, 21 Aug 2017 03:11:57 +0000 (23:11 -0400)] 
- this test doesn't work in strict mode, not that important

Change-Id: I3ed361af5c9f0c7acbeb8b534966828949f4958b
(cherry picked from commit 63d47c051d92ffa78f1006d9c9f83f1508bc358e)

7 years ago- a few mysql fixes, more to come
Mike Bayer [Sun, 20 Aug 2017 22:57:05 +0000 (18:57 -0400)] 
- a few mysql fixes, more to come

Change-Id: Icdcc8ed03374251b8d3815ae58e2726ea27c14b4
(cherry picked from commit 64032a35ae3dbed0bd5bbdf4d07b3f0094684f87)

7 years ago- rework oracle de-provisioning to write URLs to the file as well,
Mike Bayer [Sun, 20 Aug 2017 22:21:34 +0000 (18:21 -0400)] 
- rework oracle de-provisioning to write URLs to the file as well,
supporting custom dburi etc.

Change-Id: Ic0ab0b3b4223e40fd335ee3313fda4dfce942100
(cherry picked from commit cc741e1ac7fce9ce7117b4855d56e38749c04868)

7 years ago- add some logging for the provisioning
Mike Bayer [Sun, 20 Aug 2017 02:45:31 +0000 (22:45 -0400)] 
- add some logging for the provisioning

Change-Id: I1ac16bc77642f4f576195ac10443ed8e641e0d49
(cherry picked from commit 00309662008b8c4a66f3e008d417ff836c91004b)

7 years ago- dont run sql mode config tests if we aren't on mysql
Mike Bayer [Sat, 19 Aug 2017 22:20:48 +0000 (18:20 -0400)] 
- dont run sql mode config tests if we aren't on mysql

Change-Id: Ia5a491ec505afed1511a17a167cd1f7d8371acd4
(cherry picked from commit ed197d4c303603f74122cbcab5c9f4ea12ff5cd7)

7 years ago- correct server side cursor assertion for driver names
Mike Bayer [Sat, 19 Aug 2017 21:30:06 +0000 (17:30 -0400)] 
- correct server side cursor assertion for driver names

Change-Id: Id8156f6af15a36f7d5653dff56f68e81431692a6
(cherry picked from commit ecdd922d9627c60058833fbcc2c8c2bc06d7332b)

7 years ago- backport new tox config options from 1.2
Mike Bayer [Sat, 19 Aug 2017 21:11:01 +0000 (17:11 -0400)] 
- backport new tox config options from 1.2

Change-Id: I081463ecc24bc5059018ffb4be49a320ff55dfab

7 years ago- rework the unittests README which was very out of date
Mike Bayer [Sat, 19 Aug 2017 18:06:14 +0000 (14:06 -0400)] 
- rework the unittests README which was very out of date

Change-Id: Id9bda43ea493a8d493be5ecb19da16a91a298f9d
(cherry picked from commit 31491a6acca68d6708e3e8ba1bc9ea842a54d5fe)

7 years agofix "constrast" typos
Nils Philippsen [Sat, 5 Aug 2017 11:31:06 +0000 (13:31 +0200)] 
fix "constrast" typos

(cherry picked from commit 7765724d51f78690c814eda6533fc0ac81ca9077)

7 years ago- modernize orm.reconstructor documentation a bit
Mike Bayer [Sun, 6 Aug 2017 01:46:24 +0000 (21:46 -0400)] 
- modernize orm.reconstructor documentation a bit

Change-Id: Ied786e8f9ad78f524be03a382d002dada7dd218b
(cherry picked from commit 4b4f8fbf25f1a5a76c1579c1a3fd6ffad07c8c66)

7 years ago- fix one test for STRICT, which may be turned on by default
Mike Bayer [Fri, 4 Aug 2017 15:28:20 +0000 (11:28 -0400)] 
- fix one test for STRICT, which may be turned on by default
in mariadb 10.2.   more mariadb fixes coming

Change-Id: I6e3a94ae7340772663677b1082506adbb2d84a38
(cherry picked from commit 54cdda032ea59789be15972ed0529f71fd4f0214)

7 years ago- 1.1.13 rel_1_1_13
Mike Bayer [Thu, 3 Aug 2017 15:37:42 +0000 (11:37 -0400)] 
- 1.1.13

7 years ago- 1.0.19
Mike Bayer [Thu, 3 Aug 2017 15:36:44 +0000 (11:36 -0400)] 
- 1.0.19

Change-Id: I65ebe00fa7372151210a1f177f5417ac08c41586

7 years ago- convert to spaces
Mike Bayer [Mon, 31 Jul 2017 12:30:45 +0000 (08:30 -0400)] 
- convert to spaces
- restore unreleased directories

Change-Id: Ia5c1142ffbdba6372f800c2e2521660ab62d9c4f
(cherry picked from commit a1160414b8dc798a1cf1b8c71a68c6cdc3526384)

8 years agoRevert cx_Oracle WITH_UNICODE change under > 5.0
Mike Bayer [Fri, 28 Jul 2017 19:05:25 +0000 (15:05 -0400)] 
Revert cx_Oracle WITH_UNICODE change under > 5.0

Fixed performance regression caused by the fix for :ticket:`3937` where
cx_Oracle as of version 5.3 dropped the ``.UNICODE`` symbol from its
namespace,  which was interpreted as cx_Oracle's "WITH_UNICODE" mode being
turned on unconditionally, which invokes functions on the SQLAlchemy
side which convert all strings to unicode unconditionally and causing
a performance impact.  In fact, per cx_Oracle's author the
"WITH_UNICODE" mode has been removed entirely as of 5.1, so the expensive unicode
conversion functions are no longer necessary and are disabled if
cx_Oracle 5.1 or greater is detected under Python 2.  The warning against
"WITH_UNICODE" mode that was removed under :ticket:`3937` is also restored.

Change-Id: Iddd38d81a5adb27c953a5ee2eae5529a21da16e1
Fixes: #4035
(cherry picked from commit 7997d7fdc3634e7dba9fd0113b8b85ef311bfeaa)

8 years ago- 1.1.13
Mike Bayer [Fri, 28 Jul 2017 19:16:17 +0000 (15:16 -0400)] 
- 1.1.13
- 1.0.19

Change-Id: I476213fe905a51826feeddb4e1c97416c2bac558

8 years ago- 1.1.12 rel_1_1_12
Mike Bayer [Mon, 24 Jul 2017 21:18:33 +0000 (17:18 -0400)] 
- 1.1.12

8 years ago- 1.0.18 release date
Mike Bayer [Mon, 24 Jul 2017 21:14:51 +0000 (17:14 -0400)] 
- 1.0.18 release date

(cherry picked from commit f00391a070d9031941bb1c17aecb265b566a6a5b)

Change-Id: Ib9e96acddc871fddbb7eb94993f0994248f8a85d

8 years agoMerge "Ensure we check for boolean condition when we inspect __exit__()" into rel_1_1
mike bayer [Mon, 24 Jul 2017 20:55:00 +0000 (16:55 -0400)] 
Merge "Ensure we check for boolean condition when we inspect __exit__()" into rel_1_1

8 years agoMerge "Guard all indexed access in WeakInstanceDict" into rel_1_1
mike bayer [Mon, 24 Jul 2017 18:50:11 +0000 (14:50 -0400)] 
Merge "Guard all indexed access in WeakInstanceDict" into rel_1_1

8 years agoMake flush logic slightly clearer in tutorial.
Feanil Patel [Sun, 23 Jul 2017 13:17:39 +0000 (09:17 -0400)] 
Make flush logic slightly clearer in tutorial.

Improve the wording of how sessions commit changes.
(cherry picked from commit c9b37f9689dca784a0a5d932cd8f0cd133c436cc)

8 years agoEnsure we check for boolean condition when we inspect __exit__()
Mike Bayer [Mon, 24 Jul 2017 16:13:05 +0000 (12:13 -0400)] 
Ensure we check for boolean condition when we inspect __exit__()

Fixed issue in testing fixtures which was incompatible with a change
made as of Python 3.6.2 involving context managers.

Change-Id: I0f12aa6cc15cba89153f7e4888ac347e7ce599c7
Fixes: #4034
(cherry picked from commit 7d4005156b5a48989dae7c4424faafc03cc8410d)

8 years agoGuard all indexed access in WeakInstanceDict
Mike Bayer [Mon, 17 Jul 2017 15:06:22 +0000 (11:06 -0400)] 
Guard all indexed access in WeakInstanceDict

Added ``KeyError`` checks to all methods within
:class:`.WeakInstanceDict` where a check for ``key in dict`` is
followed by indexed access to that key, to guard against a race against
garbage collection that under load can remove the key from the dict
after the code assumes its present, leading to very infrequent
``KeyError`` raises.

Change-Id: I881cc2899f7961d29a0549f44149a2615ae7a4ea
Fixes: #4030
(cherry picked from commit 1a75f676d75b5daf67455d6e85b7b4df6f2316dc)

8 years ago- Merge directory holder README from 1.0.x and also 1.0's changelog
Mike Bayer [Mon, 24 Jul 2017 14:50:37 +0000 (10:50 -0400)] 
- Merge directory holder README from 1.0.x and also 1.0's changelog

Change-Id: I588eebd027b4ad3428bd522f36a6f1cd77f105bb
(cherry picked from commit 39c72682b85c1d3912ced383733d03eca7a43845)

8 years ago- move to file-per-changelog for unreleased change notes,
Mike Bayer [Sat, 22 Jul 2017 20:32:01 +0000 (16:32 -0400)] 
- move to file-per-changelog for unreleased change notes,
so that we no longer have to rely upon merges within
the changelog files.   because gerrit doesn't allow us
to use custom merge engines unlike git, we have no ability
to merge multiple changes into the changelog files without
going through conflicts.   new version of changelog
in git supports these new patterns.

Change-Id: I588eebd027b4ad3428bd522f36a6f1cd77f105bb
(cherry picked from commit 39c72682b85c1d3912ced383733d03eca7a43845)

8 years agoMerge "Check for column object in eval_none, not propkey" into rel_1_1
mike bayer [Wed, 19 Jul 2017 20:22:10 +0000 (16:22 -0400)] 
Merge "Check for column object in eval_none, not propkey" into rel_1_1

8 years agoCheck for column object in eval_none, not propkey
Mike Bayer [Tue, 18 Jul 2017 15:41:12 +0000 (11:41 -0400)] 
Check for column object in eval_none, not propkey

Fixed bug involving JSON NULL evaluation logic added in 1.1 as part
of :ticket:`3514` where the logic would not accommodate ORM
mapped attributes named differently from the :class:`.Column`
that was mapped.

Change-Id: I1848afcfb63ad7f074f315d8d3097666069b42be
Fixes: #4031
(cherry picked from commit e2ede596adff3ce584f8c43ba024cafabc509a06)

8 years agoCheck for non-entity when inspecting for subqueryload
Mike Bayer [Tue, 18 Jul 2017 18:58:26 +0000 (14:58 -0400)] 
Check for non-entity when inspecting for subqueryload

Fixed issue where adding additional non-entity columns to
a query that includes an entity with subqueryload relationships
would fail, due to an inspection added in 1.1.11 as a result of
:ticket:`4011`.

Change-Id: I8ef082be649125bdc07b428cb9b0a77a65d73671
Fixes: #4033
(cherry picked from commit 3d41ea09a899b06feedd02864a69b8dc833f5a6b)

8 years agoReplace Session class with session instance
Tom Sitter [Wed, 12 Jul 2017 15:54:25 +0000 (11:54 -0400)] 
Replace Session class with session instance

The Session class was used instead of the session instance which resulted in an attribute error.
(cherry picked from commit 43f41fbfaa8f3030148c131628c5e9fe8fda9f66)

8 years agoFix typo, foriegn -> foreign
Pablo Marti [Mon, 10 Jul 2017 17:43:58 +0000 (19:43 +0200)] 
Fix typo, foriegn -> foreign
(cherry picked from commit c6b46759829633e6745b561861891a8ffb85fbb8)

8 years ago- remove intersphinx usage, the overhead of re-fetching
Mike Bayer [Sun, 9 Jul 2017 17:02:59 +0000 (13:02 -0400)] 
- remove intersphinx usage, the overhead of re-fetching
inventory on every build not worth it

Change-Id: I3c4506b246d0f327c4b56afa723975daee984476
(cherry picked from commit a66979fe1efaa93ba25b1bcd8b67ea2eae2fc48b)

8 years agoAdd support for CACHE and ORDER to sequences
David Moore [Wed, 5 Jul 2017 19:06:49 +0000 (15:06 -0400)] 
Add support for CACHE and ORDER to sequences

Added new keywords :paramref:`.Sequence.cache` and
:paramref:`.Sequence.order` to :class:`.Sequence`, to allow rendering
of the CACHE parameter understood by Oracle and PostgreSQL, and the
ORDER parameter understood by Oracle.  Pull request
courtesy David Moore.

Change-Id: I082c3f8ef56ef89dbaad5da9d5695be5313b0614
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/96
(cherry picked from commit faa6609dac2ce6e55e0f690df3ba88c13133ec5c)

8 years ago- 1.1.12 placeholder
Mike Bayer [Wed, 5 Jul 2017 20:08:02 +0000 (16:08 -0400)] 
- 1.1.12 placeholder

Change-Id: Ibf559430163717fc58d0e72f28c1e2f0051b26bc

8 years agoInclude missing import in example
Michael Stewart [Fri, 30 Jun 2017 21:02:20 +0000 (14:02 -0700)] 
Include missing import in example
(cherry picked from commit 1db3029abc371c0808fb622ae2bd716ada81281a)

8 years agoadded link for CrateDB support
Jodok Batlogg [Fri, 23 Jun 2017 19:16:18 +0000 (21:16 +0200)] 
added link for CrateDB support

(cherry picked from commit 9f1a375f10cb7af558a9549081a0e792546aca21)

8 years ago- 1.1.12 prep
Mike Bayer [Mon, 19 Jun 2017 15:01:58 +0000 (11:01 -0400)] 
- 1.1.12 prep

Change-Id: Ibc3f1490ccf5c8e6d467340b2b73f9ddfebfb83c

8 years ago- 1.1.11 rel_1_1_11
Mike Bayer [Mon, 19 Jun 2017 14:42:56 +0000 (10:42 -0400)] 
- 1.1.11

8 years agoMerge "Handle SHOW VARIABLES returning no row" into rel_1_1
mike bayer [Fri, 16 Jun 2017 22:39:59 +0000 (18:39 -0400)] 
Merge "Handle SHOW VARIABLES returning no row" into rel_1_1

8 years agoHandle SHOW VARIABLES returning no row
Mike Bayer [Fri, 16 Jun 2017 17:30:25 +0000 (13:30 -0400)] 
Handle SHOW VARIABLES returning no row

MySQL 5.7 has introduced permission limiting for the "SHOW VARIABLES"
command; the MySQL dialect will now handle when SHOW returns no
row, in particular for the initial fetch of SQL_MODE, and will
emit a warning that user permissions should be modified to allow the
row to be present.

Change-Id: I98e7a69230da397b17eae07b7e9d024fa7aeeb26
Fixes: #4007
(cherry picked from commit 5650a0c306391216a9c9ce1961c5b548e534b5eb)

8 years agoRepair WithinGroup.get_children()
Mike Bayer [Fri, 16 Jun 2017 13:58:03 +0000 (09:58 -0400)] 
Repair WithinGroup.get_children()

Fixed AttributeError which would occur in :class:`.WithinGroup`
construct during an iteration of the structure.

Change-Id: I563882d93c8c32292463a605b636aa60c77e9406
Fixes: #4012
(cherry picked from commit 3a314fcea8539133947d5ec8e42a6c86e30fdf9a)

8 years agoSet complete FROM list for subquery eagerload's orig query
Mike Bayer [Thu, 15 Jun 2017 17:12:16 +0000 (13:12 -0400)] 
Set complete FROM list for subquery eagerload's orig query

Instead of checking that the "orig_entity" we receive applies
as a correct FROM element for the subquery we're building,
set the FROM clause of the query to exactly what it already
is based on column_descriptions (assuming there is no FROM
list already), thereby ensuring that the FROM list will remain
intact, regardless of what orig_entity turns out to be and
what the target_cols ultimately refer towards.

Fixed issue with subquery eagerloading which continues on from
the series of issues fixed in :ticket:`2699`, :ticket:`3106`,
:ticket:`3893` involving that the "subquery" contains the correct
FROM clause when beginning from a joined inheritance subclass
and then subquery eager loading onto a relationship from
the base class, while the query also includes criteria against
the subclass. The fix in the previous tickets did not accommodate
for additional subqueryload operations loading more deeply from
the first level, so the fix has been further generalized.

Change-Id: Ic909590814f71e577d8266b1dbc4c393dc48e019
Fixes: #4011
(cherry picked from commit 6d2a03c1ec21cc428c91476c170ad7dbe219926c)

8 years ago- fix the col length missing just like in master...
Mike Bayer [Thu, 15 Jun 2017 22:47:33 +0000 (18:47 -0400)] 
- fix the col length missing just like in master...

Change-Id: I172999198217b9a09f136664f5a7e38e7e099df6

8 years agoMerge test case from 770e1e399cb0c91db73a551e1962ccbb57f42e76,
Mike Bayer [Thu, 15 Jun 2017 20:06:23 +0000 (16:06 -0400)] 
Merge test case from 770e1e399cb0c91db73a551e1962ccbb57f42e76,
which applies to a 1.2 regression

Change-Id: Ic99508dbf48e63b97975cb06fcb84e73135e0f4f

8 years ago- repair "types" imports in postgresql/test_types, master
Mike Bayer [Fri, 9 Jun 2017 15:06:13 +0000 (11:06 -0400)] 
- repair "types" imports in postgresql/test_types, master
using "sqltypes" now

Change-Id: Ic327eb8b5708739c9e225512f85a44b05e50be49

8 years agoRender ARRAY index embedded between type and COLLATE
Mike Bayer [Thu, 8 Jun 2017 16:55:23 +0000 (12:55 -0400)] 
Render ARRAY index embedded between type and COLLATE

Fixed bug where using :class:`.ARRAY` with a string type that
features a collation would fail to produce the correct syntax
within CREATE TABLE.

The "COLLATE" must appear to the right of the array dimensions,
so we are using regexp substitution to insert the brackets in the
appropriate place.  A more heavyweight solution would be that datatypes
know how to split up their base type vs. modifiers, but as this is
so specific to Postgresql ARRAY it's better to handle these cases
more locally.

Change-Id: I394c3c673eb60689e51b5301e51651972cfdb4c0
Fixes: #4006
(cherry picked from commit ec422fb70e0044ed42dcfda5fb1a7a65db322cf1)

8 years agoParse for Postgresql version w/ "beta"
Mike Bayer [Wed, 7 Jun 2017 16:30:22 +0000 (12:30 -0400)] 
Parse for Postgresql version w/ "beta"

Continuing with the fix that correctly handles Postgresql
version string "10devel" released in 1.1.8, an additional regexp
bump to handle version strings of the form "10beta1".   While
Postgresql now offers better ways to get this information, we
are sticking w/ the regexp at least through 1.1.x for the least
amount of risk to compatibility w/ older or alternate Postgresql
databases.

Change-Id: I12ddb06465f7dcf80563c27632441ef5963f60d4
Fixes: #4005
(cherry picked from commit b6d3f60791834ead92564fc58afebc2c3eb4a2ff)

8 years ago- assert passive_deletes='all' does not affect collection/scalar
Mike Bayer [Tue, 6 Jun 2017 22:53:03 +0000 (18:53 -0400)] 
- assert passive_deletes='all' does not affect collection/scalar
membership removal

in issue #3844 we hypotheized that passive_deletes='all' was broken
because it sets to NULL a foreign key attribute when the child
object is removed or replaced.   However, not doing the NULL
set means that nothing happens at all and the operation silently
fails.

Change-Id: I11834e7e324349e172dc797bac62731008b6b95a
(cherry picked from commit acf64c4178169b765f3f7ae492b1774955cf541f)

8 years agoFix a few doc typos
Lele Gaifax [Mon, 22 May 2017 13:03:06 +0000 (15:03 +0200)] 
Fix a few doc typos

(cherry picked from commit 4779ddd865d693f4c3521fbe200a96b88ed67186)

Change-Id: Ib3caafad523fac408475a2557c30be9ff39b0a65

8 years agoAdd placeholder XML support
Mike Bayer [Fri, 26 May 2017 15:24:25 +0000 (11:24 -0400)] 
Add placeholder XML support

Added a placeholder type :class:`.mssql.XML` to the SQL Server
dialect, so that a reflected table which includes this type can
be re-rendered as a CREATE TABLE.  The type has no special round-trip
behavior nor does it currently support additional qualifying
arguments.

Change-Id: I651fa729bd8e9b31a0b5effe0839aff077d77c46
Fixes: #3973
(cherry picked from commit b1369b47217558779a5b8a17ecd945cedd608dc7)

8 years agoRaise if ForeignKeyConstraint created with different numbers of
Mike Bayer [Thu, 25 May 2017 14:17:11 +0000 (10:17 -0400)] 
Raise if ForeignKeyConstraint created with different numbers of
local and remote columns.

An :class:`.ArgumentError` is now raised if a
:class:`.ForeignKeyConstraint` object is created with a mismatched
number of "local" and "remote" columns, which otherwise causes the
internal state of the constraint to be incorrect.   Note that this
also impacts the condition where a dialect's reflection process
produces a mismatched set of columns for a foreign key constraint.

Downstream DB2 dialect has been reported as potentially causing this
scenario.

Change-Id: Id51c34a6c43749bb582639f9c1dc28723482f0e5
Fixes: #3949
References: #3998
(cherry picked from commit a78718b9340e9840a470300932af178ce57c0f7d)

8 years agoRemove twophase for cx_Oracle 6.x
Mike Bayer [Tue, 23 May 2017 14:17:51 +0000 (10:17 -0400)] 
Remove twophase for cx_Oracle 6.x

Support for two-phase transactions has been removed entirely for
cx_Oracle when version 6.0b1 or later of the DBAPI is in use.  The two-
phase feature historically has never been usable under cx_Oracle 5.x in
any case, and cx_Oracle 6.x has removed the connection-level "twophase"
flag upon which this feature relied.

Change-Id: I2e8161cc2bc12f4845c9224cd483038112fe9734
Fixes: #3997
(cherry picked from commit 1b98ce355a60b7ad9898aeb412c21591bb438231)

8 years ago- add option to disable py.test warnings plugin;
Mike Bayer [Tue, 23 May 2017 16:24:26 +0000 (12:24 -0400)] 
- add option to disable py.test warnings plugin;
lift cap on py.test.
references: https://github.com/pytest-dev/pytest/issues/2430

Change-Id: Ieb8a6258ba1d15efa570d9cda2b51cf021499a23
(cherry picked from commit a987942761542666be89f40a9ac4a35e001b8265)

8 years ago- add session.close() w/ rationale to top-level "using transactions"
Mike Bayer [Tue, 23 May 2017 15:35:12 +0000 (11:35 -0400)] 
- add session.close() w/ rationale to top-level "using transactions"
 section.  References #3974

Change-Id: Idb650cbe9825cfae893ee917132b5b9d693f0c6c
(cherry picked from commit 7fc7492d86f6e5ca105743a184cd07190e9f9b28)

8 years ago- pin py.test at 3.0.7 due to https://github.com/pytest-dev/pytest/issues/2430
Mike Bayer [Tue, 23 May 2017 15:12:22 +0000 (11:12 -0400)] 
- pin py.test at 3.0.7 due to https://github.com/pytest-dev/pytest/issues/2430

Change-Id: I587282da141aa6ea92f944eeb4c9e5782d0b5f29
(cherry picked from commit eed7888f85a4255390e2522dbd428cbfe7a08bab)

8 years ago- remove .gitattributes and merge=union as this isn't really
Mike Bayer [Mon, 22 May 2017 22:43:05 +0000 (18:43 -0400)] 
- remove .gitattributes and merge=union as this isn't really
    working anyway.   need to try something else.

Change-Id: I7a1a298023e151f04502c268734961b86ed2519b

8 years agoRepair formatting throughout documentation
Kataev Denis [Mon, 22 May 2017 21:52:45 +0000 (17:52 -0400)] 
Repair formatting throughout documentation

1. Section decorators to [one style](http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#sections):
without inset at both side and with same length as text.
2. Fix broken [reference](http://docs.sqlalchemy.org/en/latest/core/type_basics.html#generic-types).
3. Convert tabs to space in some small files.
4. Some python code snippets have python+sql syntax hint.

Change-Id: I39a7a41ef0b0591c6bf1e610748e2b5c19fc5379
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/361
(cherry picked from commit 42b6ef8ccd691f6ace30ae16ed70f92e748f763f)

8 years ago- add a note to versioning that version id col cannot be null,
Mike Bayer [Mon, 22 May 2017 18:32:06 +0000 (14:32 -0400)] 
- add a note to versioning that version id col cannot be null,
is not supported.

Change-Id: I3724fea3f2d508210e35827eb1ea17f5e334da19
Fixes: #3673
(cherry picked from commit fcaf17766fdd22e67407e432f7666d63439d7a39)

8 years agoPrevent SQL server isolation level from failing
Mike Bayer [Sun, 21 May 2017 19:28:00 +0000 (15:28 -0400)] 
Prevent SQL server isolation level from failing

Fixed bug where SQL Server transaction isolation must be fetched
from a different view when using Azure data warehouse, the query
is now attempted against both views and then a NotImplemented
is raised unconditionally if failure continues to provide the
best resiliency against future arbitrary API changes in new
SQL Server versions.

Change-Id: I621b5089febe8ace136428fa133fde1a7e21cda4
Fixes: #3994
(cherry picked from commit 2574ca4b215cb06720d3ff4352d87ce87ebdd160)

8 years ago- 1.1.11 version placeholder
Mike Bayer [Sun, 21 May 2017 19:25:09 +0000 (15:25 -0400)] 
- 1.1.11 version placeholder

Change-Id: I3a5850a704a2a4e69a9894544fcc4ffa60b1017f

8 years ago- add 1.1.11 placeholder
Mike Bayer [Sun, 21 May 2017 19:24:49 +0000 (15:24 -0400)] 
- add 1.1.11 placeholder

Change-Id: Ia45668f2882ac0e59ade390262b09cbb62ecac0b
(cherry picked from commit ccbd68bb3ce09a013c998e4dcc26c0df7b03f205)

8 years ago- 1.1.10 rel_1_1_10
Mike Bayer [Fri, 19 May 2017 20:11:30 +0000 (16:11 -0400)] 
- 1.1.10

8 years ago- Document the most transparent way to set JSON.NULL for
Mike Bayer [Thu, 18 May 2017 21:44:10 +0000 (17:44 -0400)] 
- Document the most transparent way to set JSON.NULL for
a column default.

The JSON.NULL value is special in that while it is a Python-side
value, it represents "do this special behavior", and is not at all
like any other Python-side value for which normally, that's exactly
the type of data we want back.   So in this case, encourage the user
to use a SQL expression that is exact, so in the ORM context, you get
back what was actually persisted in the column.  There's some variants
of this such as literal(JSON.NULL, JSON) but text("'null'") is simpler.

Change-Id: I0339fafdc03e4b2f533d53970b2f74c774f2687b
Fixes: #3923
(cherry picked from commit 4d4ea792e7ea7945de9c9b1e005ce09b2feb45b5)

8 years ago- add complete parameter /return value docs to session.begin() /
Mike Bayer [Wed, 17 May 2017 14:46:52 +0000 (10:46 -0400)] 
- add complete parameter /return value docs to session.begin() /
session.begin_nested().  Fixes #3993

Change-Id: If485d77b364c34d94061d2f48efbde3f8a8adec9
(cherry picked from commit 4c6917e1d68a8baab7efe10e9ce5e5c8187f65ca)

8 years ago- move additional sections under with_polymorphic missed
Mike Bayer [Tue, 16 May 2017 15:00:41 +0000 (11:00 -0400)] 
- move additional sections under with_polymorphic missed
in the previous change

Change-Id: I20217d4d4ebfc033229d87e472ad82d32202617a
(cherry picked from commit 75c8b88cddeeadb539fce1c038997d0aebe6f621)

8 years ago- categorize these two with_polymorphic subsections under with_polymorphic
Mike Bayer [Tue, 16 May 2017 14:51:14 +0000 (10:51 -0400)] 
- categorize these two with_polymorphic subsections under with_polymorphic

Change-Id: I8bd49ac241df4b8645c8f78938d6f8122952d75a
(cherry picked from commit 6079158b21da7598ff37115649bbdd955713eb11)

8 years ago- fix broken link
Mike Bayer [Tue, 16 May 2017 13:59:38 +0000 (09:59 -0400)] 
- fix broken link

Change-Id: I2f3b5ae29600696b34a6afdddc2f94920febf31d
(cherry picked from commit 7aa50b9b197d542b63e86f423865f9bbec7af443)

8 years agomodernize and repair inheritance examples
Mike Bayer [Tue, 16 May 2017 13:51:06 +0000 (09:51 -0400)] 
modernize and repair inheritance examples

remarkably, the examples for concrete and single were still
using classical mappings.    Ensure all three examples use
modern declarative patterns, each illustrate the identical set
of query operations.  Use back_populates, flat=True for joins,
etc. ensure flake8 linting, correct links and add a link back
from newly reworked inheritance documentation.

Change-Id: I8465a9badbb0eda804f457ccac599f051ee3c27c
(cherry picked from commit 5329fc481ed1dcea0e922fd63def3094bda12c91)

8 years agoCascade mappers in terms of the instance's mapper
Mike Bayer [Fri, 12 May 2017 14:53:54 +0000 (10:53 -0400)] 
Cascade mappers in terms of the instance's mapper

Fixed a (extremely old) bug in cascade_mappers where the
first cascade we do is against the "self" mapper, and not the
one that actually corresponds to the state given. These are
different in the case where we start with a relationship
to a class, and the instance is of a subclass, which itself
can have relationships that aren't on the base mapper.

A pretty severe bug that somehow has avoided the radar
since the beginning.

Change-Id: I512956b9757b07e06f3ca1ccb507a33fb10bed31
Fixes: #3986
(cherry picked from commit 0f8721fa52e335ab2abeb548c8914b99a8c5e1fd)

8 years agoAdd links to with_only_columns to Select.column, append_column
Mike Bayer [Fri, 12 May 2017 13:23:44 +0000 (09:23 -0400)] 
Add links to with_only_columns to Select.column, append_column

Provide a brief example for these two methods
indicating that typically a table-bound (or other selectable)
column is appended here, then link to with_only_columns
documentation which has in-depth guidelines already including
that one should not append columns from the current select to itself.

Change-Id: I0742405a7f3c41450d337b9c633519d9cc101dfb
Fixes: #3987
(cherry picked from commit 4352e220ac04d09e120c441e79b1ac12c7ca2c45)

8 years agoUpdate inheritance documentation.
Mike Bayer [Mon, 1 May 2017 17:04:32 +0000 (13:04 -0400)] 
Update inheritance documentation.

The inheritance documentation is confused, disorganized, and out
of date.  Reorganize and clarify, in particular in preparation
for new inheritance features.

Change-Id: Ibe6a35b4b0432bad866a6afb0598b2cf1b509f10
(cherry picked from commit 6194483b73c94565aee62c5867a251a1841db5a9)

8 years agoFix docs syntax error
Denis Kataev [Wed, 10 May 2017 12:33:16 +0000 (17:33 +0500)] 
Fix docs syntax error

(cherry picked from commit 3e3554d37ca589218c13f9b2969801dccbbdfa2c)

8 years agoMerge "Use regexp to parse cx_oracle version string" into rel_1_1
mike bayer [Tue, 9 May 2017 19:51:25 +0000 (15:51 -0400)] 
Merge "Use regexp to parse cx_oracle version string" into rel_1_1

8 years agoUse regexp to parse cx_oracle version string
Mike Bayer [Tue, 9 May 2017 16:17:04 +0000 (12:17 -0400)] 
Use regexp to parse cx_oracle version string

Fixed bug in cx_Oracle dialect where version string parsing would
fail for cx_Oracle version 6.0b1 due to the "b" character.  Version
string parsing is now via a regexp rather than a simple split.

Change-Id: I2af7172b0d7184e3ea3bd051e9fa8d6ca2a571cd
Fixes: #3975
(cherry picked from commit 50484eda7787c3e83c9c88c1841fc63b348ca23c)

8 years agoSupport autocommit for GRANT and REVOKE on postgresql
Jacob Hayes [Mon, 8 May 2017 20:26:06 +0000 (16:26 -0400)] 
Support autocommit for GRANT and REVOKE on postgresql

Extends `AUTOCOMMIT_REGEXP` for the postgres dialect to include `GRANT` and `REVOKE`.

Change-Id: Iba15f1ebf5bd7bc0fc1193fdf561417e53bf5d57
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/357
(cherry picked from commit 328248e6e31100aae03f060b83488f3116cd3450)

8 years agoProtect against cls weakref becoming None
Mike Bayer [Mon, 8 May 2017 22:36:57 +0000 (18:36 -0400)] 
Protect against cls weakref becoming None

Protected against testing "None" as a class in the case where
declarative classes are being garbage collected and new
automap prepare() operations are taking place concurrently, very
infrequently hitting a weakref that has not been fully acted upon
after gc.

Change-Id: I32e1dfc5ac46bac4127fe808cfd18368e2fad9dd
(cherry picked from commit 22570c3181ef4e98c548c2f6254a0c7585568f06)

8 years agoBreak the lines to fit pdf and fix another broken syntax
LunarShaddow [Mon, 8 May 2017 04:31:50 +0000 (12:31 +0800)] 
Break the lines to fit pdf and fix another broken syntax

(cherry picked from commit 3d19fb6d53c2aa0fdb7944569fa697c75785634c)

Change-Id: I17334d7673c645505af4eaaf2112544f2fa5e625

8 years ago- add 1.2 forwards-port version
Mike Bayer [Mon, 8 May 2017 21:54:15 +0000 (17:54 -0400)] 
- add 1.2 forwards-port version

Change-Id: I093f3939be8858a2f327c5ee5884b9629b216855

8 years agofixes a typo
Ben Fagin [Mon, 1 May 2017 17:30:11 +0000 (10:30 -0700)] 
fixes a typo
(cherry picked from commit 6224df56a6fa28efda6e6e5007b015ad9d6d7d14)

8 years ago- big rewrite of the Sequence documentation:
Mike Bayer [Fri, 5 May 2017 18:59:39 +0000 (14:59 -0400)] 
- big rewrite of the Sequence documentation:

1. Sequence should be associated with MetaData always,
except in the really weird case someone is sharing a Sequence
among multiple metadatas.  Make this a "best practice", end the
confusion of #3951, #3979

2. "optional" is not a thing people use, trim this way down

3. remove confusing language

Change-Id: Iab5aec319da2582092fe2615ee50430f76441aff

8 years ago- add another note re: 339e2c13b0fc8e95a47d00c0f8fc5afc4b6dff9a
Mike Bayer [Fri, 5 May 2017 14:39:18 +0000 (10:39 -0400)] 
- add another note re: 339e2c13b0fc8e95a47d00c0f8fc5afc4b6dff9a
which clarifies that ForeignKey circumvents this logic as a
"convenience".   issue #3978 is updated to address trying to make
this consistent.

Change-Id: I089acaa89f11b7a6310c2bf32916e26eb62ab9c0
(cherry picked from commit 8f830d78ba1d68ea3e10006e10e65ddb571f45ee)

8 years ago- add a note to MetaData.schema indicating that the Table
Mike Bayer [Fri, 5 May 2017 13:19:18 +0000 (09:19 -0400)] 
- add a note to MetaData.schema indicating that the Table
will be cataloged in the .tables collection with its fully
qualified name.   Fixes #3978

Change-Id: I65fa063918efc22658e93c39a0680cb83553dec8
(cherry picked from commit 339e2c13b0fc8e95a47d00c0f8fc5afc4b6dff9a)

8 years agotest / document postgresql_ops against a labeled expression
Mike Bayer [Mon, 24 Apr 2017 20:19:08 +0000 (16:19 -0400)] 
test / document postgresql_ops against a labeled expression

Since postgresql_ops explicitly states that it expects
string keys, to apply to a function call or expression one
needs to give the SQL expression a label that can be referred
to by name in the dictionary.   test / document this.

Change-Id: I4bc4ade46dac27f9c1b92e7823433292beab97b9
Fixes: #3970
(cherry picked from commit 029d0f75385298f8056c04eba1d2f9563126a8a6)

8 years ago- edits
Mike Bayer [Sat, 22 Apr 2017 20:43:31 +0000 (16:43 -0400)] 
- edits

Change-Id: If2445c4cbcd7eb18e06823e8821940a391890979
(cherry picked from commit 6560bf82f387ca53c79f91f93ae97e6594795da8)

8 years ago- update relationship loader docs, backport from
Mike Bayer [Fri, 21 Apr 2017 21:40:11 +0000 (17:40 -0400)] 
- update relationship loader docs, backport from
1.2 wip

Change-Id: I0a3c4a0166f6feed23a021723233d281fad597ec
(cherry picked from commit e53009e25378990ee48d4c0c6a194d2d8d3ed01e)

8 years agoFix of minor typo in the UnmappedInstanceError message
Jonathan Suever [Thu, 6 Apr 2017 19:52:10 +0000 (15:52 -0400)] 
Fix of minor typo in the UnmappedInstanceError message

(cherry picked from commit 90c72c31a55337bef61cdd0cb75f5d128bcc34f9)

8 years ago- remove errant doctest comment
Mike Bayer [Mon, 17 Apr 2017 19:33:12 +0000 (15:33 -0400)] 
- remove errant doctest comment

Change-Id: Idb8520ff807074ceca36645728a63b79d1cdff6c
(cherry picked from commit c2834f9298ddf14c0177e862b344de9e526cdf35)

8 years agoRemove MySQL UTC_TIMESTAMP rule
Mike Bayer [Thu, 13 Apr 2017 14:11:41 +0000 (10:11 -0400)] 
Remove MySQL UTC_TIMESTAMP rule

Removed an ancient and unnecessary intercept of the UTC_TIMESTAMP
MySQL function, which was getting in the way of using it with a
parameter.

Change-Id: I6e6b52c051418bcb9d31987e78299310810cb78d
Fixes: #3966
(cherry picked from commit c0b85ad6ad1df2497a95c87d837c32d87f17291f)

8 years agoConsider mysql partition options separately from other table options
Mike Bayer [Thu, 6 Apr 2017 00:59:42 +0000 (20:59 -0400)] 
Consider mysql partition options separately from other table options

Move down all the PARTITION, SUBPARTITION options
into a separate segment so that they come out at the
end of CREATE TABLE after the table options.

Change-Id: Iaa1c823848c93680ca22d72bda1b7c49742b9060
Fixes: #3961
(cherry picked from commit 93b11905e599a6d73a85d2085e15385ebf46cdc6)

8 years ago- 1.1.10 prep
Mike Bayer [Thu, 6 Apr 2017 13:54:48 +0000 (09:54 -0400)] 
- 1.1.10 prep

Change-Id: Ieec7379402ce35d3d0c15a5e6b5056e9d83071cf

8 years ago- 1.1.9 rel_1_1_9
Mike Bayer [Tue, 4 Apr 2017 18:03:01 +0000 (14:03 -0400)] 
- 1.1.9

8 years agoAdd much more detail to the "unhashable types" change
Mike Bayer [Tue, 4 Apr 2017 17:09:55 +0000 (13:09 -0400)] 
Add much more detail to the "unhashable types" change

Change-Id: I34cbf54913b81ef2ae8b2e60f03feb78601460e5
Fixes: 3958