]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
8 years ago- add a note as to why we have this very complicated Annotated
Mike Bayer [Thu, 9 Mar 2017 22:38:21 +0000 (17:38 -0500)] 
- add a note as to why we have this very complicated Annotated
system

Change-Id: I7d4048b92fcd3a7c7630c43aa9390d983f447c0a

8 years agoAllow SchemaType and Variant to work together
Mike Bayer [Tue, 7 Mar 2017 17:53:00 +0000 (12:53 -0500)] 
Allow SchemaType and Variant to work together

Added support for the :class:`.Variant` and the :class:`.SchemaType`
objects to be compatible with each other.  That is, a variant
can be created against a type like :class:`.Enum`, and the instructions
to create constraints and/or database-specific type objects will
propagate correctly as per the variant's dialect mapping.

Also added testing for some potential double-event scenarios
on TypeDecorator but it seems usually this doesn't occur.

Change-Id: I4a7e7c26b4133cd14e870f5bc34a1b2f0f19a14a
Fixes: #2892
8 years agoRepair missing "checkfirst" for test suite
Mike Bayer [Tue, 7 Mar 2017 20:00:18 +0000 (15:00 -0500)] 
Repair missing "checkfirst" for test suite

the test_metadata tests trigger the before_create dispatch without
the checkfirst flag.  Postgresql backend should be able to
tolerate this.

Change-Id: Ife497cc3a4eb2812462116f94aad732864225f3f

8 years ago- document ForeignKeyConstraint columns / elements, fixes #2904
Mike Bayer [Tue, 7 Mar 2017 19:54:53 +0000 (14:54 -0500)] 
- document ForeignKeyConstraint columns / elements, fixes #2904

Change-Id: Ia50a3100d1bd88020c30224932b16aeadd7f4c75

8 years agoMerge "Don't cache savepoint identifiers"
mike bayer [Tue, 7 Mar 2017 00:12:40 +0000 (19:12 -0500)] 
Merge "Don't cache savepoint identifiers"

8 years agoDon't cache savepoint identifiers
Mike Bayer [Mon, 6 Mar 2017 17:26:01 +0000 (12:26 -0500)] 
Don't cache savepoint identifiers

Fixed bug in compiler where the string identifier of a savepoint would
be cached in the identifier quoting dictionary; as these identifiers
are arbitrary, a small memory leak could occur if a single
:class:`.Connection` had an unbounded number of savepoints used,
as well as if the savepoint clause constructs were used directly
with an unbounded umber of savepoint names.   The memory leak does
**not** impact the vast majority of cases as normally the
:class:`.Connection`, which renders savepoint names with a simple
counter starting at "1", is used on a per-transaction or
per-fixed-number-of-transactions basis before being discarded.

The savepoint name in virtually all cases does not require quoting
at all, however to support potential third party use cases
the "check for quotes needed" logic is retained, at a small
performance cost.   Uncondtionally quoting the name is another
option, but this would turn the name into a case sensitive name
which runs the risk of poor interactions with existing deployments
that may be looking at these names in other contexts.

Change-Id: I6b53c96abf7fdf1840592bbca5da81347911844c
Fixes: #3931
8 years ago- update asktom link, fixes #3925
Mike Bayer [Mon, 6 Mar 2017 21:50:13 +0000 (16:50 -0500)] 
- update asktom link, fixes #3925

Change-Id: Ibd63311dfccebbdf67e8ad7dc56ad311bf573895

8 years agoUpdate profiles for psycopg2 2.7
Mike Bayer [Mon, 6 Mar 2017 21:09:32 +0000 (16:09 -0500)] 
Update profiles for psycopg2 2.7

psycopg2 has updated their unicode / string handling, greatly
reducing callcounts on Python 2.x.

Change-Id: Idffd242b303ffea9c7733068a4be290da4dbe679

8 years agoOnly use schema_translate_map on SchemaItem subclasses
Mike Bayer [Tue, 28 Feb 2017 19:03:47 +0000 (14:03 -0500)] 
Only use schema_translate_map on SchemaItem subclasses

Fixed bug in new "schema translate" feature where the translated schema
name would be invoked in terms of an alias name when rendered along
with a column expression; occurred only when the source translate
name was "None".   The "schema translate" feature now only takes
effect for :class:`.SchemaItem` and :class:`.SchemaType` subclasses,
that is, objects that correspond to a DDL-creatable structure in
a database.

Change-Id: Ie8cb35aeaba2c67efec8c8c57c219e4dd346e44a
Fixes: #3924
8 years ago- 1.1.7 prep
Mike Bayer [Tue, 28 Feb 2017 19:49:04 +0000 (14:49 -0500)] 
- 1.1.7 prep

Change-Id: I7d738e194339ffd6edf3ff6a078808fc5251fe50

8 years ago- 1.1.6 rel_1_1_6
Mike Bayer [Tue, 28 Feb 2017 16:41:24 +0000 (11:41 -0500)] 
- 1.1.6

8 years agoAdd new reserved words for MySQL 8.0 (beta).
Hanno Schlichting [Tue, 28 Feb 2017 16:10:57 +0000 (11:10 -0500)] 
Add new reserved words for MySQL 8.0 (beta).

Based on https://dev.mysql.com/doc/refman/8.0/en/keywords.html#table-keywords-new-8.0

Change-Id: I128c93520e57331e0ec4d40b0c0e752bf9b982d9
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/346

8 years agoPerformance within instances()
Mike Bayer [Thu, 23 Feb 2017 19:40:00 +0000 (14:40 -0500)] 
Performance within instances()

Continuing from Ie43beecf37945b2bb7fff0aaa597a597293daa18,
also observed is the overhead of PathRegsitry memoized token
functions, as these paths are not cached in the case of
long joinedloader chains.  The memoizations here were made
with short paths in mind, and have been replaced with
an inlined straight create of these paths up front, producing
callcounts very similar to 0.8. Combined with the previous
optimizations, 1.1 now runs the "joined eager load of one row"
worst case test in about 40% fewer calls than 0.8 and 60%
fewer than 1.1.5.

Change-Id: Ib5e1c1345a1dd8edfbdb3fed06eb717d4e164d31
Fixes: #3915
8 years agoMerge "Memoize AliasedClass, ClauseAdapter objects in joined eager load"
mike bayer [Wed, 22 Feb 2017 22:16:28 +0000 (17:16 -0500)] 
Merge "Memoize AliasedClass, ClauseAdapter objects in joined eager load"

8 years ago- add test for inserting PG array w/ NULL, references #3916
Mike Bayer [Thu, 16 Feb 2017 18:00:28 +0000 (13:00 -0500)] 
- add test for inserting PG array w/ NULL, references #3916

Change-Id: I87be274c1ba019b41744a5a76c1b5e9334564ec8

8 years agoMemoize AliasedClass, ClauseAdapter objects in joined eager load
Mike Bayer [Thu, 16 Feb 2017 16:31:26 +0000 (11:31 -0500)] 
Memoize AliasedClass, ClauseAdapter objects in joined eager load

Addressed some long unattended performance concerns within the
joined eager loader query construction system.  The use of ad-hoc
:class:`.AliasedClass` objects per query, which produces lots of column
lookup overhead each time, has been replaced with a cached approach
that makes use of a small pool of :class:`.AliasedClass` objects
that are reused between invocations of joined eager loading.
Callcount reduction of SQL query generation for worst-case joined
loader scenarios (lots of joins, lots of columns) is reduced by
approximately 270%.

Change-Id: Ie43beecf37945b2bb7fff0aaa597a597293daa18
Fixes: #3915
8 years agoAdd new DDL autocommit expressions for Postgresql
Mike Bayer [Mon, 13 Feb 2017 19:20:38 +0000 (14:20 -0500)] 
Add new DDL autocommit expressions for Postgresql

Added regular expressions for the "IMPORT FOREIGN SCHEMA",
"REFRESH MATERIALIZED VIEW" Postgresql statements so that they
autocommit when invoked via a connection or engine without
an explicit transaction.  Pull requests courtesy Frazer McLean
and Paweł Stiasny.

Fixes: #3840
Co-authored-by: Frazer McLean
Co-authored-by: Paweł Stiasny
Change-Id: I92b2b61683d29d57fa23a66a3559120cb1241c2f
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/323

8 years ago- limit to MySQL dialect
Mike Bayer [Mon, 13 Feb 2017 19:40:55 +0000 (14:40 -0500)] 
- limit to MySQL dialect

Change-Id: I2781e1e2221d89c75dd65ff49490d9c409967930

8 years ago- pull autocommit suite into the mysql suite as well
Mike Bayer [Mon, 13 Feb 2017 19:33:21 +0000 (14:33 -0500)] 
- pull autocommit suite into the mysql suite as well

Change-Id: If1106f7f125739e69ad2482f65b8f37672a76c9e

8 years ago- add a test suite that ensures textual autocommit works
Mike Bayer [Mon, 13 Feb 2017 19:17:11 +0000 (14:17 -0500)] 
- add a test suite that ensures textual autocommit works
for correct expressions

Change-Id: I17d35169be914924828487abba05658dff380f2a

8 years agopytds based connector for MS-SQL
Grzegorz Makarewicz [Sun, 12 Feb 2017 19:10:43 +0000 (20:10 +0100)] 
pytds based connector for MS-SQL

8 years agoCheck for columns not part of mapping, correct mapping for eager_defaults
Mike Bayer [Thu, 9 Feb 2017 02:05:16 +0000 (21:05 -0500)] 
Check for columns not part of mapping, correct mapping for eager_defaults

Fixed two closely related bugs involving the mapper eager_defaults
flag in conjunction with single-table inheritance; one where the
eager defaults logic would inadvertently try to access a column
that's part of the mapper's "exclude_properties" list (used by
Declarative with single table inheritance) during the eager defaults
fetch, and the other where the full load of the row in order to
fetch the defaults would fail to use the correct inheriting mapper.

Fixes: #3908
Change-Id: Ie745174c917d512e2c46d9e3cc14512cde53cc9a

8 years agoDon't post-SELECT columns w/o a server default/onupdate for eager_defaults
Mike Bayer [Thu, 9 Feb 2017 02:42:34 +0000 (21:42 -0500)] 
Don't post-SELECT columns w/o a server default/onupdate for eager_defaults

Fixed a major inefficiency in the "eager_defaults" feature whereby
an unnecessary SELECT would be emitted for column values where the
ORM had explicitly inserted NULL, corresponding to attributes that
were unset on the object but did not have any server default
specified, as well as expired attributes on update that nevertheless
had no server onupdate set up.   As these columns are not part of the
RETURNING that eager_defaults tries to use, they should not be
post-SELECTed either.

Change-Id: I0d4f1e9d3d9717d68dcc0592f69456a1f1c36df8
Fixes: #3909
8 years ago- document Query.with_session(), direct constructor usage
Mike Bayer [Wed, 8 Feb 2017 22:47:29 +0000 (17:47 -0500)] 
- document Query.with_session(), direct constructor usage

Change-Id: I47499d040623202dd9b3be0ea65f2d9ad03c11a4

8 years agoMake all tests to be PEP8 compliant
Khairi Hafsham [Thu, 2 Feb 2017 18:02:21 +0000 (13:02 -0500)] 
Make all tests to be PEP8 compliant

tested using pycodestyle version 2.2.0

Fixes: #3885
Change-Id: I5df43adc3aefe318f9eeab72a078247a548ec566
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/343

8 years agoMerge "Accept FetchedValue, text() for column "default" value"
mike bayer [Wed, 1 Feb 2017 23:13:06 +0000 (18:13 -0500)] 
Merge "Accept FetchedValue, text() for column "default" value"

8 years ago- add a note referring to the enum value as not currently persisted,
Mike Bayer [Wed, 1 Feb 2017 23:09:45 +0000 (18:09 -0500)] 
- add a note referring to the enum value as not currently persisted,
reference #3906

Change-Id: I2274c356cc88cd011c5a34a69e75a2548a93e87a

8 years agoAccept FetchedValue, text() for column "default" value
Mike Bayer [Wed, 1 Feb 2017 21:25:31 +0000 (16:25 -0500)] 
Accept FetchedValue, text() for column "default" value

Fixed bug whereby the :meth:`.DDLEvents.column_reflect` event would not
allow a non-textual expression to be passed as the value of the
"default" for the new column, such as a :class:`.FetchedValue`
object to indicate a generic triggered default or a
:func:`.sql.expression.text` construct.  Clarified the documentation
in this regard as well.

Fixes: #3905
Change-Id: I829796c3e9f87f375149bebee7eef133a6876d4d

8 years ago- clarify Enum validation rules, fixes #3904
Mike Bayer [Wed, 1 Feb 2017 21:39:48 +0000 (16:39 -0500)] 
- clarify Enum validation rules, fixes #3904

Change-Id: I221f161ae77ee1b9487329330bc520ab65e97611

8 years agoUnion the exclude_properties of the inheriting mapper in declarative
Mike Bayer [Thu, 26 Jan 2017 21:11:49 +0000 (16:11 -0500)] 
Union the exclude_properties of the inheriting mapper in declarative

Fixed bug where the "automatic exclude" feature of declarative that
ensures a column local to a single table inheritance subclass does
not appear as an attribute on other derivations of the base would
not take effect for multiple levels of subclassing from the base.

Change-Id: Ibf67b631b4870dd1bd159f7d6085549d299fffe0
Fixes: #3895
8 years agoMerge "Add count(), scalar() to baked query"
mike bayer [Mon, 30 Jan 2017 22:27:21 +0000 (17:27 -0500)] 
Merge "Add count(), scalar() to baked query"

8 years agoAdd count(), scalar() to baked query
Mike Bayer [Wed, 25 Jan 2017 18:30:47 +0000 (13:30 -0500)] 
Add count(), scalar() to baked query

Change-Id: I8af0d7b41ae2df384ce5d0ef274732352d81f376
Fixes: #3897
8 years agoFix nested index_property setter when there is no container value
Jeong YunWon [Fri, 27 Jan 2017 14:29:59 +0000 (23:29 +0900)] 
Fix nested index_property setter when there is no container value

Fixed bug in new :mod:`sqlalchemy.ext.indexable` extension
where setting of a property that itself refers to another property
would fail.

Fixes: #3901
Change-Id: I203a66117e2399afee11a34f43f0e93adfc6d571

8 years agoCopy whereclause / using in ExcludeConstraint
Mike Bayer [Mon, 30 Jan 2017 17:10:16 +0000 (12:10 -0500)] 
Copy whereclause / using in ExcludeConstraint

Fixed bug in Postgresql :class:`.ExcludeConstraint` where the
"whereclause" and "using" parameters would not be copied during an
operation like :meth:`.Table.tometadata`.

Change-Id: I2f704981d4d4862f9c82a50272006fab8becebb6
Fixes: #3900
8 years ago- add missing param tag
Mike Bayer [Sat, 28 Jan 2017 14:53:10 +0000 (09:53 -0500)] 
- add missing param tag

Change-Id: Ic2cc0bdafbf3f1bc2993a9ad3475530eed91d0f1

8 years ago- cte() has moved to HasCTE(), since SelectBase is referred to
Mike Bayer [Sat, 28 Jan 2017 14:43:40 +0000 (09:43 -0500)] 
- cte() has moved to HasCTE(), since SelectBase is referred to
a lot just add inherited members so links to things like SelectBase.cte
continue to function

Change-Id: Ib57948d576d2063e10b0f528a5deaf07ea262322

8 years ago- remove misleading comment, ref #3902
Mike Bayer [Fri, 27 Jan 2017 17:08:57 +0000 (12:08 -0500)] 
- remove misleading comment, ref #3902

Change-Id: I481628146ff31bc9ea2f8a3687f375832b17e501

8 years agoDon't check isolation level prior to SQL Server 2005
Mike Bayer [Thu, 26 Jan 2017 21:54:02 +0000 (16:54 -0500)] 
Don't check isolation level prior to SQL Server 2005

Added a version check to the "get_isolation_level" feature, which is
invoked upon first connect, so that it skips for SQL Server version
2000, as the necessary system view is not available prior to SQL Server
2005.

Change-Id: If4f860513f0aae6625803f449714aedfc5075f57
Fixes: #3898
8 years ago- document that "column" and "where" are arbitrary SQL expressions
Mike Bayer [Thu, 26 Jan 2017 21:01:20 +0000 (16:01 -0500)] 
- document that "column" and "where" are arbitrary SQL expressions
for ExcludeConstraint, if string is used then quoting must
be applied manually.  fixes #3899

Change-Id: I5885c90179e4056b84fc4776464bba7c8c70a80a

8 years agoMerge branch 'doc_typo' of https://bitbucket.org/fredj/sqlalchemy
Mike Bayer [Tue, 24 Jan 2017 22:36:49 +0000 (17:36 -0500)] 
Merge branch 'doc_typo' of https://bitbucket.org/fredj/sqlalchemy

8 years agoMerge branch 'patch-1' of https://github.com/jeffwidman/sqlalchemy
Mike Bayer [Tue, 24 Jan 2017 22:35:16 +0000 (17:35 -0500)] 
Merge branch 'patch-1' of https://github.com/jeffwidman/sqlalchemy

8 years agoMerge branch 'fix-example-re' of https://github.com/demoray/sqlalchemy
Mike Bayer [Tue, 24 Jan 2017 22:33:01 +0000 (17:33 -0500)] 
Merge branch 'fix-example-re' of https://github.com/demoray/sqlalchemy

8 years agoFix typo in documentation
Frederic Junod [Fri, 20 Jan 2017 08:52:15 +0000 (09:52 +0100)] 
Fix typo in documentation

8 years agoMerge "Dont set _set_select_from() for alias object"
mike bayer [Thu, 19 Jan 2017 21:28:58 +0000 (16:28 -0500)] 
Merge "Dont set _set_select_from() for alias object"

8 years agoImprove server-side Sequence documentation
Mike Bayer [Thu, 19 Jan 2017 19:12:19 +0000 (14:12 -0500)] 
Improve server-side Sequence documentation

Include the metadata argument for the Sequence
and explain the rationale.  Correct inconsistencies
between Core / ORM examples and update language
regarding client side vs. server side Sequence
directive.

Co-authored-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
Change-Id: I65c522acf9bdf25041a5baf2e10be41f0927999a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/341

8 years agoDont set _set_select_from() for alias object
Mike Bayer [Thu, 19 Jan 2017 16:41:09 +0000 (11:41 -0500)] 
Dont set _set_select_from() for alias object

Fixed bug first introduced in 0.9.7 as a result of :ticket:`3106`
which would cause an incorrect query in some forms of multi-level
subqueryload against aliased entities, with an unnecessary extra
FROM entity in the innermost subquery.

Fixes: #3893
Change-Id: Ic4003c2c1c0206bd22a098fd497a7375c2758305

8 years ago- 1.1.6 prep
Mike Bayer [Thu, 19 Jan 2017 16:49:13 +0000 (11:49 -0500)] 
- 1.1.6 prep

Change-Id: I95b9af4987ad26653a36bccfc88828ff22ce896b

8 years ago- 1.1.5 rel_1_1_5
Mike Bayer [Tue, 17 Jan 2017 21:23:00 +0000 (16:23 -0500)] 
- 1.1.5

8 years ago- 1.0.17 release date
Mike Bayer [Tue, 17 Jan 2017 21:22:28 +0000 (16:22 -0500)] 
- 1.0.17 release date

8 years agoMerge branch 'master' into rel_1_1
Mike Bayer [Tue, 17 Jan 2017 21:19:54 +0000 (16:19 -0500)] 
Merge branch 'master' into rel_1_1

8 years ago- this test is too brittle under load, not worth it, remove it
Mike Bayer [Tue, 17 Jan 2017 21:13:19 +0000 (16:13 -0500)] 
- this test is too brittle under load, not worth it, remove it

Change-Id: I3f294b4d153979c308532360d03ab7be3c5d994a

8 years agoMerge branch 'master' into rel_1_1
Mike Bayer [Tue, 17 Jan 2017 20:51:18 +0000 (15:51 -0500)] 
Merge branch 'master' into rel_1_1

8 years ago- further changes to avoid pytest warnings
Mike Bayer [Tue, 17 Jan 2017 20:51:02 +0000 (15:51 -0500)] 
- further changes to avoid pytest warnings

Change-Id: Ia83a996ff97a6ba54a0666a32241e570f3852ab4

8 years agoMerge branch 'master' into rel_1_1
Mike Bayer [Tue, 17 Jan 2017 19:42:35 +0000 (14:42 -0500)] 
Merge branch 'master' into rel_1_1

8 years agoCorrect pytest deprecation warning
Gábor Lipták [Tue, 17 Jan 2017 17:13:34 +0000 (12:13 -0500)] 
Correct pytest deprecation warning

WC1 None [pytest] section in setup.cfg files is deprecated, use [tool:pytest] instead.

Change-Id: I099c8207730ae1226f7357ff8be0d8ab149878ed
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/334

8 years agoMerge branch 'master' into rel_1_1
Mike Bayer [Tue, 17 Jan 2017 17:08:49 +0000 (12:08 -0500)] 
Merge branch 'master' into rel_1_1

8 years ago- repair an errant docstring w/o r
Mike Bayer [Tue, 17 Jan 2017 17:08:38 +0000 (12:08 -0500)] 
- repair an errant docstring w/o r

Change-Id: I2e9c8dbc79c00b54520748d1d7cae5230a612c96

8 years agoMerge branch 'master' into rel_1_1
Mike Bayer [Tue, 17 Jan 2017 16:45:26 +0000 (11:45 -0500)] 
Merge branch 'master' into rel_1_1

8 years ago- update copyright in .c files
Mike Bayer [Tue, 17 Jan 2017 16:45:18 +0000 (11:45 -0500)] 
- update copyright in .c files

Change-Id: If905d1bc026b688ec7203674ff14c72bc4906abf

8 years agoMerge branch 'master' into rel_1_1
Mike Bayer [Tue, 17 Jan 2017 15:48:39 +0000 (10:48 -0500)] 
Merge branch 'master' into rel_1_1

8 years agoMerge "Parse (but don't record) COMMENT portion of MySQL table key"
mike bayer [Tue, 17 Jan 2017 15:47:33 +0000 (10:47 -0500)] 
Merge "Parse (but don't record) COMMENT portion of MySQL table key"

8 years agoParse (but don't record) COMMENT portion of MySQL table key
Lele Long [Sat, 3 Dec 2016 18:10:07 +0000 (13:10 -0500)] 
Parse (but don't record) COMMENT portion of MySQL table key

The MySQL dialect now will not warn when a reflected column has a
"COMMENT" keyword on it, but note however the comment is not yet
reflected; this is on the roadmap for a future release.  Pull request
courtesy Lele Long.

Fixes: #3867
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/324
Change-Id: I869e29aba6766d0eda1e59af09a3e8e3748a3942

8 years agoAdd support for prefixes on CREATE INDEX statements in MySQL
Joseph Schorr [Tue, 17 Jan 2017 15:02:17 +0000 (10:02 -0500)] 
Add support for prefixes on CREATE INDEX statements in MySQL

Added a new parameter ``mysql_prefix`` supported by the :class:`.Index`
construct, allows specification of MySQL-specific prefixes such as
"FULLTEXT". Pull request courtesy Joseph Schorr.

Change-Id: I5a21fa466fdfd4d9e39e1fb4ecec1eab93b92c36
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/339

8 years agoMerge branch 'master' into rel_1_1
Mike Bayer [Mon, 16 Jan 2017 21:28:01 +0000 (16:28 -0500)] 
Merge branch 'master' into rel_1_1

8 years ago- correctly document LIKE / ILIKE, fixes #3890
Mike Bayer [Mon, 16 Jan 2017 21:27:48 +0000 (16:27 -0500)] 
- correctly document LIKE / ILIKE, fixes #3890

Change-Id: Ie59e61f53d7c59a4777ab9e6e75a43c71d67523b

8 years agoMerge branch 'master' into rel_1_1
Mike Bayer [Mon, 16 Jan 2017 20:57:25 +0000 (15:57 -0500)] 
Merge branch 'master' into rel_1_1

8 years agoMerge "Better hide engine password"
mike bayer [Mon, 16 Jan 2017 20:56:02 +0000 (15:56 -0500)] 
Merge "Better hide engine password"

8 years agoBetter hide engine password
Valery Yundin [Fri, 16 Dec 2016 14:22:08 +0000 (09:22 -0500)] 
Better hide engine password

Avoid putting engine password in the exception message in
`MetaData.reflect` (since exception messages often appear in logs).
Use the same redacted `__repr__` implementation in
`TLEngine` as in its base class `Engine`

Change-Id: Ic0a7baea917a9c8d87dffdd82ef566673ab08e02
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/327

8 years agoMerge branch 'master' into rel_1_1
Mike Bayer [Mon, 16 Jan 2017 19:00:50 +0000 (14:00 -0500)] 
Merge branch 'master' into rel_1_1

8 years agoAdd "existing" populators for subqueryload
Mike Bayer [Mon, 16 Jan 2017 17:10:08 +0000 (12:10 -0500)] 
Add "existing" populators for subqueryload

Fixed bug in subquery loading where an object encountered as an
"existing" row, e.g. already loaded from a different path in the
same query, would not invoke subquery loaders for unloaded attributes
that specified this loading.  This issue is in the same area
as that of :ticket:`3431`, :ticket:`3811` which involved
similar issues with joined loading.

Change-Id: If111a76b0812010905b0ac811276a816779d297f
Fixes: #3854
8 years agoMerge branch 'master' into rel_1_1
Mike Bayer [Mon, 16 Jan 2017 14:21:13 +0000 (09:21 -0500)] 
Merge branch 'master' into rel_1_1

8 years ago- fix changelog
Mike Bayer [Mon, 16 Jan 2017 14:21:06 +0000 (09:21 -0500)] 
- fix changelog

Change-Id: Ib1da230f6fd691753c4a5056b165d7397d198b09

8 years ago- fix changelog
Mike Bayer [Mon, 16 Jan 2017 14:19:15 +0000 (09:19 -0500)] 
- fix changelog

Change-Id: Idca0cab9d2ffdf498cc57bee9d215b9f4b72ef13

8 years agoMerge "Use full column->type processing for ON CONFLICT SET clause"
mike bayer [Fri, 13 Jan 2017 20:47:00 +0000 (15:47 -0500)] 
Merge "Use full column->type processing for ON CONFLICT SET clause"

8 years agoMerge "Support python3.6"
mike bayer [Fri, 13 Jan 2017 20:41:20 +0000 (15:41 -0500)] 
Merge "Support python3.6"

8 years agoUse full column->type processing for ON CONFLICT SET clause
Mike Bayer [Fri, 13 Jan 2017 17:43:24 +0000 (12:43 -0500)] 
Use full column->type processing for ON CONFLICT SET clause

Fixed bug in new "ON CONFLICT DO UPDATE" feature where the "set"
values for the UPDATE clause would not be subject to type-level
processing, as normally takes effect to handle both user-defined
type level conversions as well as dialect-required conversions, such
as those required for JSON datatypes.   Additionally, clarified that
the keys in the set_ dictionary should match the "key" of the column,
if distinct from the column name.  A warning is emitted
for remaining column names that don't match column keys; for
compatibility reasons, these are emitted as they were previously.

Fixes: #3888
Change-Id: I67a04c67aa5f65e6d29f27bf3ef2f8257088d073

8 years agoSupport python3.6
Mike Bayer [Wed, 11 Jan 2017 15:12:12 +0000 (10:12 -0500)] 
Support python3.6

Corrects some warnings and adds tox config.  Adds DeprecationWarning
to the error category.   Large sweep for string literals w/ backslashes
as this is common in docstrings

Co-authored-by: Andrii Soldatenko
Fixes: #3886
Change-Id: Ia7c838dfbbe70b262622ed0803d581edc736e085
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/337

8 years ago- document how to use autocommit isolation level for CONCURRENTLY,
Mike Bayer [Thu, 12 Jan 2017 20:57:46 +0000 (15:57 -0500)] 
- document how to use autocommit isolation level for CONCURRENTLY,
fixes #3887

Change-Id: I6d1a13b7bb4169204105c7a100d17cfed3ded9d1

8 years agoMerge "Pass **kw to bound params in multi values"
mike bayer [Thu, 12 Jan 2017 13:38:39 +0000 (08:38 -0500)] 
Merge "Pass **kw to bound params in multi values"

8 years agoSet autoincrement to False; use sqlite_autoincrement in versioned_history
Carlos García Montoro [Mon, 9 Jan 2017 22:46:25 +0000 (17:46 -0500)] 
Set autoincrement to False; use sqlite_autoincrement in versioned_history

Ensure that the history table sets autoincrement=False, since these values
are copied in all cases; the flag will emit an error as of 1.1 if the
primary key is composite.   Additionally, use the sqlite_autoincrement flag
so that SQLite uses unique primary key identifiers for new rows even if
some rows have been deleted.

Fixes: #3872
Change-Id: I65912eb394b3b69d7f4e3c098f4f948b0a7a5374
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/93

8 years agoMerge "Adapt from "localparent" in joinedloader"
mike bayer [Mon, 9 Jan 2017 22:42:03 +0000 (17:42 -0500)] 
Merge "Adapt from "localparent" in joinedloader"

8 years agoPass **kw to bound params in multi values
Mike Bayer [Wed, 28 Dec 2016 21:32:53 +0000 (16:32 -0500)] 
Pass **kw to bound params in multi values

Fixed bug where literal_binds compiler flag was not honored by the
:class:`.Insert` construct for the "multiple values" feature; the
subsequent values are now rendered as literals.

Change-Id: I81ac358fd59995885d482e7571620090210865d2
Fixes: #3880
8 years agoMerge "Tighten rules for order_by(Label) resolution"
mike bayer [Mon, 9 Jan 2017 19:25:13 +0000 (14:25 -0500)] 
Merge "Tighten rules for order_by(Label) resolution"

8 years agoMerge "update for 2017 copyright"
mike bayer [Mon, 9 Jan 2017 19:24:46 +0000 (14:24 -0500)] 
Merge "update for 2017 copyright"

8 years agoAdapt from "localparent" in joinedloader
Mike Bayer [Mon, 9 Jan 2017 19:16:22 +0000 (14:16 -0500)] 
Adapt from "localparent" in joinedloader

Fixed bug involving joined eager loading against multiple entities
when polymorphic inheritance is also in use which would throw
"'NoneType' object has no attribute 'isa'".  The issue was introduced
by the fix for :ticket:`3611`.

Change-Id: I296ecda38c01ec8f69dcd843beaebed6949cecfa
Fixes: #3884
8 years agoTighten rules for order_by(Label) resolution
Mike Bayer [Fri, 6 Jan 2017 22:02:32 +0000 (17:02 -0500)] 
Tighten rules for order_by(Label) resolution

- Fixed bug originally introduced in 0.9 via :ticket:`1068` where
order_by(<some Label()>) would order by the label name based on name
alone, that is, even if the labeled expression were not at all the same
expression otherwise present, implicitly or explicitly, in the
selectable.  The logic that orders by label now ensures that the
labeled expression is related to the one that resolves to that name
before ordering by the label name; additionally, the name has to
resolve to an actual label explicit in the expression elsewhere, not
just a column name.  This logic is carefully kept separate from the
order by(textual name) feature that has a slightly different purpose.

Change-Id: I44fc36dab34380cc238c1e79ecbe23f1628d588a
Fixes: #3882
8 years ago- add a section for ARRAY of JSON to complement ARRAY of ENUM. references #3467
Mike Bayer [Thu, 5 Jan 2017 15:02:58 +0000 (10:02 -0500)] 
- add a section for ARRAY of JSON to complement ARRAY of ENUM. references #3467

Change-Id: I9836b842be01ef24138071fa022d80f5f77be14f

8 years agoupdate for 2017 copyright
Mike Bayer [Wed, 4 Jan 2017 17:39:24 +0000 (12:39 -0500)] 
update for 2017 copyright

Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de

8 years agoEnsure session.no_autoflush uses finally
plumSemPy [Wed, 4 Jan 2017 17:06:48 +0000 (12:06 -0500)] 
Ensure session.no_autoflush uses finally

The :attr:`.Session.no_autoflush` context manager now ensures that
the autoflush flag is reset within a "finally" block, so that if
an exception is raised within the block, the state still resets
appropriately.  Pull request courtesy Emin Arakelian.

Change-Id: Ib19ddf32074b1df82a6a1f1ae14e3a962cd31a5f
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/335

8 years agoMerge "Correct any_, all_ spelling"
mike bayer [Wed, 28 Dec 2016 21:50:09 +0000 (16:50 -0500)] 
Merge "Correct any_, all_ spelling"

8 years ago- fix bad merge to changelog
Mike Bayer [Wed, 28 Dec 2016 21:15:22 +0000 (16:15 -0500)] 
- fix bad merge to changelog

Change-Id: I1e7444d722414627ba2a31bce13bd737950abb0c

8 years agoCorrect any_, all_ spelling
Mike Bayer [Wed, 28 Dec 2016 21:14:31 +0000 (16:14 -0500)] 
Correct any_, all_ spelling

- Fixed 1.1 regression where "import *" would not work for
sqlalchemy.sql.expression, due to mis-spelled "any_" and "all_"
functions.

Change-Id: I25d1cd34c9239dbdcdb1889c5cda2474557e1418
Fixes: #3878
8 years agoFix typo
Jeff Widman [Sat, 24 Dec 2016 10:34:24 +0000 (02:34 -0800)] 
Fix typo

8 years agoTypo
Francisco Capdevila [Thu, 22 Dec 2016 18:08:23 +0000 (15:08 -0300)] 
Typo

8 years agoDon't select lastrowid for inline=True
Mike Bayer [Wed, 21 Dec 2016 15:16:31 +0000 (10:16 -0500)] 
Don't select lastrowid for inline=True

- Fixed bug where SQL Server dialects would attempt to select the
last row identity for an INSERT from SELECT, failing in the case when
the SELECT has no rows.  For such a statement,
the inline flag is set to True indicating no last primary key
should be fetched.

Change-Id: Ic40d56d9eadadc3024a4d71245f9eed4c420024a
Fixes: #3876
8 years agoCall nextval() on sequence when doing INSERT from SELECT
Mike Bayer [Wed, 21 Dec 2016 18:39:56 +0000 (13:39 -0500)] 
Call nextval() on sequence when doing INSERT from SELECT

Fixed bug where an INSERT from SELECT where the source table contains
an autoincrementing Sequence would fail to compile correctly.

Change-Id: I41eb9f65789a4007712ae61ed5fa23a9839a5128
Fixes: #3877
8 years ago- these two tests require sane rowcount at the base
Mike Bayer [Wed, 21 Dec 2016 15:31:33 +0000 (10:31 -0500)] 
- these two tests require sane rowcount at the base

Change-Id: I7efcfb56826963e4702d19107db3c9d37c4fcb64

8 years agoUse session for exec check
Mike Bayer [Wed, 21 Dec 2016 15:20:19 +0000 (10:20 -0500)] 
Use session for exec check

This was using a different connection which could deadlock on
SQL Server.

Change-Id: Ia7953f362c99d9247dd47c3f5c3b0b91c96db1a5

8 years agoBump "table compression" flag to Oracle 10.1
Mike Bayer [Tue, 20 Dec 2016 14:15:55 +0000 (09:15 -0500)] 
Bump "table compression" flag to Oracle 10.1

- Fixed bug where the "COMPRESSION" keyword was used in the ALL_TABLES
query on Oracle 9.2; even though Oracle docs state table compression
was introduced in 9i, the actual column is not present until
10.1.

Change-Id: Iebfa59bfcfdff859169df349a5426137ab006e67
Fixes: #3875
8 years agoAdd real .entities to _BundleEntity
Mike Bayer [Mon, 19 Dec 2016 17:39:15 +0000 (12:39 -0500)] 
Add real .entities to _BundleEntity

Fixed bug where the single-table inheritance query criteria would not
be inserted into the query in the case that the :class:`.Bundle`
construct were used as the selection criteria.

Change-Id: Ib7c128ceef5c3220a098cdfd0270c43a2a67716d
Fixes: #3874