Commit Graph

10813 Commits

Author SHA1 Message Date
Mike Bayer 0d91796bb3 Merge branch 'doc_typo' of https://bitbucket.org/fredj/sqlalchemy 2017-01-24 17:36:49 -05:00
Mike Bayer 6e83259e7f Merge branch 'patch-1' of https://github.com/jeffwidman/sqlalchemy 2017-01-24 17:35:16 -05:00
Mike Bayer 0cc5561c93 Merge branch 'fix-example-re' of https://github.com/demoray/sqlalchemy 2017-01-24 17:33:01 -05:00
Frederic Junod 8795472c87 Fix typo in documentation 2017-01-20 09:52:15 +01:00
mike bayer 81518ae2e2 Merge "Dont set _set_select_from() for alias object" 2017-01-19 16:28:58 -05:00
Mike Bayer 42027de3fc 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
2017-01-19 14:43:13 -05:00
Mike Bayer 4ae02f46e9 Dont set _set_select_from() for alias object
Fixed bug first introduced in 0.9.7 as a result of 🎫`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
2017-01-19 13:49:08 -05:00
Mike Bayer 17b85b3445 - 1.1.6 prep
Change-Id: I95b9af4987ad26653a36bccfc88828ff22ce896b
2017-01-19 11:49:13 -05:00
Mike Bayer 6078165993 - 1.1.5 rel_1_1_5 2017-01-17 16:23:00 -05:00
Mike Bayer 18d0509c75 - 1.0.17 release date 2017-01-17 16:22:28 -05:00
Mike Bayer 92385b6e1c Merge branch 'master' into rel_1_1 2017-01-17 16:19:54 -05:00
Mike Bayer 2f86267f07 - this test is too brittle under load, not worth it, remove it
Change-Id: I3f294b4d153979c308532360d03ab7be3c5d994a
2017-01-17 16:19:43 -05:00
Mike Bayer a75524561c Merge branch 'master' into rel_1_1 2017-01-17 15:51:18 -05:00
Mike Bayer f2028dc5af - further changes to avoid pytest warnings
Change-Id: Ia83a996ff97a6ba54a0666a32241e570f3852ab4
2017-01-17 15:51:02 -05:00
Mike Bayer 984235a12d Merge branch 'master' into rel_1_1 2017-01-17 14:42:35 -05:00
Gábor Lipták f624a3ae8b 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
2017-01-17 12:13:34 -05:00
Mike Bayer dc66790e84 Merge branch 'master' into rel_1_1 2017-01-17 12:08:49 -05:00
Mike Bayer 3a6c55fb51 - repair an errant docstring w/o r
Change-Id: I2e9c8dbc79c00b54520748d1d7cae5230a612c96
2017-01-17 12:08:38 -05:00
Mike Bayer f7c8b08bd2 Merge branch 'master' into rel_1_1 2017-01-17 11:45:26 -05:00
Mike Bayer 5c2ef5b542 - update copyright in .c files
Change-Id: If905d1bc026b688ec7203674ff14c72bc4906abf
2017-01-17 11:45:18 -05:00
Mike Bayer a0de2bfa10 Merge branch 'master' into rel_1_1 2017-01-17 10:48:39 -05:00
mike bayer 99d65925e6 Merge "Parse (but don't record) COMMENT portion of MySQL table key" 2017-01-17 10:47:33 -05:00
Lele Long bd6ba3ac82 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
2017-01-17 10:23:07 -05:00
Joseph Schorr 1f407c2a47 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
2017-01-17 10:21:47 -05:00
Mike Bayer 00b24eb0f4 Merge branch 'master' into rel_1_1 2017-01-16 16:28:01 -05:00
Mike Bayer 46828cc157 - correctly document LIKE / ILIKE, fixes #3890
Change-Id: Ie59e61f53d7c59a4777ab9e6e75a43c71d67523b
2017-01-16 16:27:48 -05:00
Mike Bayer 751887ad6e Merge branch 'master' into rel_1_1 2017-01-16 15:57:25 -05:00
mike bayer d8198c2d87 Merge "Better hide engine password" 2017-01-16 15:56:02 -05:00
Valery Yundin bccc1419a6 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
2017-01-16 14:02:26 -05:00
Mike Bayer 2e610cf155 Merge branch 'master' into rel_1_1 2017-01-16 14:00:50 -05:00
Mike Bayer 3aefc6e8a4 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 🎫`3431`, 🎫`3811` which involved
similar issues with joined loading.

Change-Id: If111a76b0812010905b0ac811276a816779d297f
Fixes: #3854
2017-01-16 13:16:25 -05:00
Mike Bayer 67a0fd1fb7 Merge branch 'master' into rel_1_1 2017-01-16 09:21:13 -05:00
Mike Bayer 710ce4aaf9 - fix changelog
Change-Id: Ib1da230f6fd691753c4a5056b165d7397d198b09
2017-01-16 09:21:06 -05:00
Mike Bayer ff2b4adfd7 - fix changelog
Change-Id: Idca0cab9d2ffdf498cc57bee9d215b9f4b72ef13
2017-01-16 09:19:15 -05:00
mike bayer 9ef1913ed6 Merge "Use full column->type processing for ON CONFLICT SET clause" 2017-01-13 15:47:00 -05:00
mike bayer 2c13aa097b Merge "Support python3.6" 2017-01-13 15:41:20 -05:00
Mike Bayer afd78a37da 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
2017-01-13 14:33:42 -05:00
Mike Bayer fa6dd376bb 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
2017-01-13 10:57:41 -05:00
Mike Bayer 0460bc79d9 - document how to use autocommit isolation level for CONCURRENTLY,
fixes #3887

Change-Id: I6d1a13b7bb4169204105c7a100d17cfed3ded9d1
2017-01-12 15:57:46 -05:00
mike bayer 073506bc55 Merge "Pass **kw to bound params in multi values" 2017-01-12 08:38:39 -05:00
Carlos García Montoro c703b9ce89 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
2017-01-09 18:00:33 -05:00
mike bayer e251f64d68 Merge "Adapt from "localparent" in joinedloader" 2017-01-09 17:42:03 -05:00
Mike Bayer 4fec72f178 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
2017-01-09 17:37:25 -05:00
mike bayer e6eefc0c5e Merge "Tighten rules for order_by(Label) resolution" 2017-01-09 14:25:13 -05:00
mike bayer bc4a96836d Merge "update for 2017 copyright" 2017-01-09 14:24:46 -05:00
Mike Bayer 51a72503b0 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 🎫`3611`.

Change-Id: I296ecda38c01ec8f69dcd843beaebed6949cecfa
Fixes: #3884
2017-01-09 14:16:22 -05:00
Mike Bayer 6b489db899 Tighten rules for order_by(Label) resolution
- Fixed bug originally introduced in 0.9 via 🎫`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
2017-01-06 17:56:41 -05:00
Mike Bayer 2b4d028a69 - add a section for ARRAY of JSON to complement ARRAY of ENUM. references #3467
Change-Id: I9836b842be01ef24138071fa022d80f5f77be14f
2017-01-05 10:03:55 -05:00
Mike Bayer 64e72b58fd update for 2017 copyright
Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
2017-01-04 12:39:24 -05:00
plumSemPy cd95d4a5b9 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
2017-01-04 12:12:52 -05:00