]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
5 years agoMerge "Omit onclause as source of FROMs from a Join"
mike bayer [Fri, 11 Oct 2019 17:33:48 +0000 (17:33 +0000)] 
Merge "Omit onclause as source of FROMs from a Join"

5 years agoMerge "added additional error message to is_disconnect() for Firebird dialects"
mike bayer [Fri, 11 Oct 2019 17:30:23 +0000 (17:30 +0000)] 
Merge "added additional error message to is_disconnect() for Firebird dialects"

5 years agoMerge "pass executemany context to _repr_params"
mike bayer [Fri, 11 Oct 2019 17:27:55 +0000 (17:27 +0000)] 
Merge "pass executemany context to _repr_params"

5 years agopass executemany context to _repr_params
Mike Bayer [Wed, 9 Oct 2019 17:55:19 +0000 (13:55 -0400)] 
pass executemany context to _repr_params

Fixed bug where parameter repr as used in logging and error reporting needs
additional context in order to distinguish between a list of parameters for
a single statement and a list of parameter lists, as the "list of lists"
structure could also indicate a single parameter list where the first
parameter itself is a list, such as for an array parameter.   The
engine/connection now passes in an additional boolean indicating how the
parameters should be considered.  The only SQLAlchemy backend that expects
arrays as parameters is that of  psycopg2 which uses pyformat parameters,
so this issue has not been too apparent, however as other drivers that use
positional gain more features it is important that this be supported. It
also eliminates the need for the parameter repr function to guess based on
the parameter structure passed.

Fixes: #4902
Change-Id: I086246ee0eb51484adbefd83e07295fa56576c5f

5 years agoadded additional error message to is_disconnect() for Firebird dialects
lukens [Thu, 10 Oct 2019 16:06:15 +0000 (12:06 -0400)] 
added additional error message to is_disconnect() for Firebird dialects

Added additional "disconnect" message "Error writing data to the
connection" to Firebird disconnection detection.  Pull request courtesy
lukens.

Fixes: #4903
Closes: #4904
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4904
Pull-request-sha: c56d7c4abf6b6c8263efaf070b4e7a319e12a875

Change-Id: Ib70c20c616e7519b933fee587a3b3e8dbb4c2f81

5 years agocherry-pick changelog update for 1.3.11
Mike Bayer [Thu, 10 Oct 2019 00:34:13 +0000 (20:34 -0400)] 
cherry-pick changelog update for 1.3.11

5 years agocherry-pick changelog from 1.3.10
Mike Bayer [Thu, 10 Oct 2019 00:34:12 +0000 (20:34 -0400)] 
cherry-pick changelog from 1.3.10

5 years agoRepair Oracle compat version check; dont warn if failed
Mike Bayer [Wed, 9 Oct 2019 20:05:34 +0000 (16:05 -0400)] 
Repair Oracle compat version check; dont warn if failed

Fixed regression in Oracle dialect that was inadvertently using max
identifier length of 128 characters on Oracle server 12.2 and greater even
though the stated contract for the remainder of the 1.3 series is  that
this value stays at 30 until version SQLAlchemy 1.4.  Also repaired issues
with the retrieval of the "compatibility" version, and removed the warning
emitted when the "v$parameter" view was not accessible as this was  causing
user confusion.

Fixes: #4898
Change-Id: Ieb7b3e093610896c5aa12d0789b63262e0ecf9d8

5 years agoOmit onclause as source of FROMs from a Join
Mike Bayer [Tue, 8 Oct 2019 20:42:21 +0000 (16:42 -0400)] 
Omit onclause as source of FROMs from a Join

The :class:`.Join` construct no longer considers the "onclause" as a source
of additional FROM objects to be omitted from the FROM list of an enclosing
:class:`.Select` object as standalone FROM objects. This applies to an ON
clause that includes a reference to another  FROM object outside the JOIN;
while this is usually not correct from a SQL perspective, it's also
incorrect for it to be omitted, and the behavioral change makes the
:class:`.Select` / :class:`.Join` behave a bit more intuitively.

Fixes: #4621
Change-Id: Iaa1e75b7c59b21e9701ab3c9b69e66930feaf8ee

5 years agolist sqlalchemy-access as external dialect
Gord Thompson [Tue, 8 Oct 2019 12:27:05 +0000 (06:27 -0600)] 
list sqlalchemy-access as external dialect

5 years agoMerge "fix error in test_round_trip for TimeTest with mysql+pyodbc"
mike bayer [Tue, 8 Oct 2019 19:44:12 +0000 (19:44 +0000)] 
Merge "fix error in test_round_trip for TimeTest with mysql+pyodbc"

5 years agoMerge "Add result map targeting for custom compiled, text objects"
mike bayer [Tue, 8 Oct 2019 15:23:51 +0000 (15:23 +0000)] 
Merge "Add result map targeting for custom compiled, text objects"

5 years agoAdd result map targeting for custom compiled, text objects
Mike Bayer [Thu, 3 Oct 2019 21:36:27 +0000 (17:36 -0400)] 
Add result map targeting for custom compiled, text objects

In order for text(), custom compiled objects, etc. to be usable
by Query(), they are all targeted by object key in the result map.
As we no longer want Query to implicitly label these, as well as that
text() has no label feature, support adding entries to the result
map that have no name, key, or type, only the object itself, and
then ensure that the compiler sets up for positional targeting
when this condition is detected.

Allows for more flexible ORM query usage with custom expressions
and text() while having less special logic in query itself.

Fixes: #4887
Change-Id: Ie073da127d292d43cb132a2b31bc90af88bfe2fd

5 years agoMerge "Fix max_identifier_length for SQL server"
mike bayer [Mon, 7 Oct 2019 21:04:49 +0000 (21:04 +0000)] 
Merge "Fix max_identifier_length for SQL server"

5 years agoRestore result map check
Mike Bayer [Mon, 7 Oct 2019 20:29:12 +0000 (16:29 -0400)] 
Restore result map check

Was mistakenly removed just now in c4dcf3dda63bfd9254ac5864cc

Change-Id: I84998b6c45cf6b84502eabb3166984dd02fb00d8

5 years agoMerge "Drop right-nested join rewriting"
mike bayer [Mon, 7 Oct 2019 20:27:19 +0000 (20:27 +0000)] 
Merge "Drop right-nested join rewriting"

5 years agoRemove order_by in textual test
Mike Bayer [Mon, 7 Oct 2019 20:18:41 +0000 (16:18 -0400)] 
Remove order_by in textual test

Fixes for SQL server

Change-Id: I089bb9d400fb1b0708340792c3840e44bffa37e4

5 years agoFix max_identifier_length for SQL server
Mike Bayer [Mon, 7 Oct 2019 20:12:30 +0000 (16:12 -0400)] 
Fix max_identifier_length for SQL server

Fixed bug in SQL Server dialect with new "max_identifier_length" feature
where the mssql dialect already featured this flag, and the implementation
did not accommodate for the new initialization hook correctly.

Fixes: #4857
Change-Id: I96a9c6ca9549d8f6fb167c0333f684e8d922a3bf

5 years agoDrop right-nested join rewriting
Mike Bayer [Mon, 7 Oct 2019 19:25:27 +0000 (15:25 -0400)] 
Drop right-nested join rewriting

Dropped support for right-nested join rewriting to support old SQLite
versions prior to 3.7.16, released in 2013.   It is expected that
all modern Python versions among those now supported should all include
much newer versions of SQLite.

Fixes: #4895
Change-Id: I7f0cfc2b7d988ff147b9a4c6d5e2adec87e27029

5 years agoMerge "create second level deduping when use_labels is turned on"
mike bayer [Mon, 7 Oct 2019 18:28:07 +0000 (18:28 +0000)] 
Merge "create second level deduping when use_labels is turned on"

5 years agocreate second level deduping when use_labels is turned on
Mike Bayer [Sat, 5 Oct 2019 22:27:44 +0000 (18:27 -0400)] 
create second level deduping when use_labels is turned on

As of #4753 we allow duplicate columns.  This creates some new
problems that there can be duplicate columns in a subquery
which are then not addressible on the outside because they
are ambiguous (Postgresql has this behavior at least).  Additionally
it creates situations where we are making an anon label of an
anon label which is leaking into the query.

New logic for generating anon labels handles this situation and
also alters the .c collection
of a subquery such that we are only getting the first column
from the derived selectable that has that name, the subsequent ones
have a new deduping label with two underscores and are not exposed
in .c.  The dedupe logic when rendering the columns will handle
duplicate label names for different columns, vs. the same column
repeated, as separate cases.

Fixes: #4892
Change-Id: I929fbd8da14bcc239e0481c24bbd9b5ce826e8fa

5 years agoRemove deprecated extension and similar classes
Mike Bayer [Sun, 6 Oct 2019 01:28:48 +0000 (21:28 -0400)] 
Remove deprecated extension and similar classes

All long-deprecated "extension" classes have been removed, including
MapperExtension, SessionExtension, PoolListener, ConnectionProxy,
AttributExtension.  These classes have been deprecated since version 0.7
long superseded by the event listener system.

Fixes: #4638
Change-Id: If4156d4956b10847bd93b6408a7c52ff5168db9b

5 years agoMerge "Deprecate textual column matching in Row"
mike bayer [Sat, 5 Oct 2019 00:05:33 +0000 (00:05 +0000)] 
Merge "Deprecate textual column matching in Row"

5 years agocherry-pick changelog update for 1.3.10
Mike Bayer [Fri, 4 Oct 2019 20:17:23 +0000 (16:17 -0400)] 
cherry-pick changelog update for 1.3.10

5 years agocherry-pick changelog from 1.3.9
Mike Bayer [Fri, 4 Oct 2019 20:17:22 +0000 (16:17 -0400)] 
cherry-pick changelog from 1.3.9

5 years ago- fix typo
Mike Bayer [Fri, 4 Oct 2019 20:06:28 +0000 (16:06 -0400)] 
- fix typo

Change-Id: I8275a9cbb9a664badbaf759ec62399ac0ead9b20

5 years agoDeprecate textual column matching in Row
Mike Bayer [Tue, 1 Oct 2019 21:38:41 +0000 (17:38 -0400)] 
Deprecate textual column matching in Row

Deprecate query.instances() without a context

Deprecate string alias with contains_eager()

Deprecated the behavior by which a :class:`.Column` can be used as the key
in a result set row lookup, when that :class:`.Column` is not part of the
SQL selectable that is being selected; that is, it is only matched on name.
A deprecation warning is now emitted for this case.   Various ORM use
cases, such as those involving :func:`.text` constructs, have been improved
so that this fallback logic is avoided in most cases.

Calling the :meth:`.Query.instances` method without passing a
:class:`.QueryContext` is deprecated.   The original use case for this was
that a :class:`.Query` could yield ORM objects when given only the entities
to be selected as well as a DBAPI cursor object.  However, for this to work
correctly there is essential metadata that is passed from a SQLAlchemy
:class:`.ResultProxy` that is derived from the mapped column expressions,
which comes originally from the :class:`.QueryContext`.   To retrieve ORM
results from arbitrary SELECT statements, the :meth:`.Query.from_statement`
method should be used.

Note there is a small bump in test_zoomark because the
column._label is being calculated for each of those columns within
baseline_3_properties, as it is now part of the result map.
This label can't be calculated when the column is attached
to the table because it needs to have all the columns present
to do this correctly.  Another approach here would be to
pre-load the _label before the test runs however the zoomark
tests don't have an easy place for this to happen and it's
not really worth it.

Fixes: #4877
Fixes: #4719
Change-Id: I9bd29e72e6dce7c855651d69ba68d7383469acbc

5 years agoWarn for object replaced in identity map during flush
Mike Bayer [Fri, 4 Oct 2019 15:12:27 +0000 (11:12 -0400)] 
Warn for object replaced in identity map during flush

A warning is emitted for a condition in which the :class:`.Session` may
implicitly swap an object out of the identity map for another one with the
same primary key, detaching the old one, which can be an observed result of
load operations which occur within the :meth:`.SessionEvents.after_flush`
hook.  The warning is intended to notify the user that some special
condition has caused this to happen and that the previous object may not be
in the expected state.

Fixes: #4890
Change-Id: Ide11c6b9f21ca67ff5a96266c521d0c56fd6af8d

5 years agoimport StringIO => import io 4889/head
Matt Kohl [Fri, 4 Oct 2019 05:56:50 +0000 (06:56 +0100)] 
import StringIO => import io

5 years agofix error in test_round_trip for TimeTest with mysql+pyodbc
Gord Thompson [Thu, 3 Oct 2019 22:18:54 +0000 (18:18 -0400)] 
fix error in test_round_trip for TimeTest with mysql+pyodbc

Fixes: #4879
### Description
create mysql+pyodbc-specific `_pyodbcTIME` class to avoid error thrown by `result_processor` in the (more) generic mysql/types.py.

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #4880
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4880
Pull-request-sha: 2e4c468c3ad685d6573e0d9755ba97a28df50b6c

Change-Id: Ib5c5b0971969c2a9870b7f43d06703618cfc56f7

5 years agoMerge "Change Oracle max_identifier_length to 128"
mike bayer [Thu, 3 Oct 2019 21:42:48 +0000 (21:42 +0000)] 
Merge "Change Oracle max_identifier_length to 128"

5 years agoMerge "call setinputsizes for cx_Oracle.DATETIME"
mike bayer [Thu, 3 Oct 2019 21:41:40 +0000 (21:41 +0000)] 
Merge "call setinputsizes for cx_Oracle.DATETIME"

5 years agoMerge "Apply quoting to SQL Server _switch_db"
mike bayer [Thu, 3 Oct 2019 21:40:27 +0000 (21:40 +0000)] 
Merge "Apply quoting to SQL Server _switch_db"

5 years agocall setinputsizes for cx_Oracle.DATETIME
Mike Bayer [Thu, 3 Oct 2019 18:09:54 +0000 (14:09 -0400)] 
call setinputsizes for cx_Oracle.DATETIME

Restored adding cx_Oracle.DATETIME to the setinputsizes() call when a
SQLAlchemy :class:`.Date`, :class:`.DateTime` or :class:`.Time` datatype is
used, so that in the case where a bound parameter is passed as NULL
in some complex queries (in particular this happens with some lazy load
situations), the type is still present.  This was removed
in the 1.2 series for arbitrary reasons.

Also adds a suite test for this generic situation.

What's not clear is that do we really need setinputsizes() for all
datatypes if we are supporting NULL in bound parameters.

Fixes: #4886
Change-Id: If99215c31861f9ea6f60a30d47f2f320adc4797f

5 years agoApply quoting to SQL Server _switch_db
Mike Bayer [Thu, 3 Oct 2019 15:18:06 +0000 (11:18 -0400)] 
Apply quoting to SQL Server _switch_db

Added identifier quoting to the schema name applied to the "use" statement
which is invoked when a SQL Server multipart schema name is used within  a
:class:`.Table` that is being reflected, as well as for :class:`.Inspector`
methods such as :meth:`.Inspector.get_table_names`; this accommodates for
special characters or spaces in the database name.  Additionally, the "use"
statement is not emitted if the current database matches the target owner
database name being passed.

Fixes: #4883
Change-Id: I84419730e94aac3a88d331ad8c24d10aabbc34af

5 years agoChange Oracle max_identifier_length to 128
Mike Bayer [Wed, 2 Oct 2019 19:37:24 +0000 (15:37 -0400)] 
Change Oracle max_identifier_length to 128

The max_identifier_length for the Oracle dialect is now 128 characters by
default, unless compatibility version less than 12.2 upon first connect, in
which case the legacy length of 30 characters is used.  This is a
continuation of the issue as committed to the 1.3 series which adds max
identifier length detection upon first connect as well as warns for the
change in Oracle server.

Fixes: #4857
Change-Id: I5b11edaebb54ec7f0e5456a785105838a1d752e5

5 years agoMerge "remove __init__ from MySQLDialect_pyodbc"
mike bayer [Wed, 2 Oct 2019 21:57:43 +0000 (21:57 +0000)] 
Merge "remove __init__ from MySQLDialect_pyodbc"

5 years ago- additional edits to README.dialects.rst
Mike Bayer [Wed, 2 Oct 2019 21:41:53 +0000 (17:41 -0400)] 
- additional edits to README.dialects.rst

Change-Id: I06add0ca77d038f03941ba266cb69dbd6a246ee8

5 years agoMerge remote-tracking branch 'origin/pr/4870'
Mike Bayer [Wed, 2 Oct 2019 21:42:35 +0000 (17:42 -0400)] 
Merge remote-tracking branch 'origin/pr/4870'

Change-Id: I6815063af600681316a4f3cf1cde93866b93db98

5 years agoremove __init__ from MySQLDialect_pyodbc
Gord Thompson [Wed, 2 Oct 2019 20:06:53 +0000 (16:06 -0400)] 
remove __init__ from MySQLDialect_pyodbc

Fixes: #4869
<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description
remove __init__ from MySQLDialect_pyodbc, specifically to get rid of the convert_unicode flag

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #4884
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4884
Pull-request-sha: d63550aca4ff9321e094fcb02105ecfa9d1076e1

Change-Id: I8986f7bf6de4d2b221106eded63576439d467c0f

5 years agoAdd max_identifier_length parameter; warn for Oracle
Mike Bayer [Wed, 2 Oct 2019 15:20:58 +0000 (11:20 -0400)] 
Add max_identifier_length parameter; warn for Oracle

Added new :func:`.create_engine` parameter
:paramref:`.create_engine.max_identifier_length`. This overrides the
dialect-coded "max identifier length" in order to accommodate for databases
that have recently changed this length and the SQLAlchemy dialect has
not yet been adjusted to detect for that version.  This parameter interacts
with the existing :paramref:`.create_engine.label_length` parameter in that
it establishes the maximum (and default) value for anonymously generated
labels.

The Oracle dialect now emits a warning if Oracle version 12.2 or greater is
used, and the :paramref:`.create_engine.max_identifier_length` parameter is
not set.   The version in this specific case defaults to that of the
"compatibility" version set in the Oracle server configuration, not the
actual server version.   In version 1.4, the default max_identifier_length
for 12.2 or greater will move to 128 characters.  In order to maintain
forwards compatibility, applications should set
:paramref:`.create_engine.max_identifier_length` to 30 in order to maintain
the same length behavior, or to 128 in order to test the upcoming behavior.
This length determines among other things how generated constraint names
are truncated for statements like ``CREATE CONSTRAINT`` and ``DROP
CONSTRAINT``, which means a the new length may produce a name-mismatch
against a name that was generated with the old length, impacting database
migrations.

Fixes: #4857
Change-Id: Ib62efb00c6180c375869029b57353d90385d7950

5 years agoMerge "Run row value processors up front"
mike bayer [Tue, 1 Oct 2019 21:00:35 +0000 (21:00 +0000)] 
Merge "Run row value processors up front"

5 years agoRun row value processors up front
Mike Bayer [Tue, 4 Jun 2019 21:29:20 +0000 (17:29 -0400)] 
Run row value processors up front

as part of a larger series of changes to generalize row-tuples,
RowProxy becomes plain Row and is no longer a "proxy"; the
DBAPI row is now copied directly into the Row when constructed,
result handling occurs at once.

Subsequent changes will break out Row into a new version that
behaves fully a tuple.

Change-Id: I2ffa156afce5d21c38f28e54c3a531f361345dd5

5 years agoCancel polymorphic loading in optimized get
Mike Bayer [Tue, 1 Oct 2019 01:26:08 +0000 (21:26 -0400)] 
Cancel polymorphic loading in optimized get

Since optimized_get for inheriting mappers writes a simple
SELECT, we need to cancel out any with_polymorphic selectables
that interfere with simple column lookup.  While adaptation is
another option, just removing the with_polymorphic is much
simpler.   The issue is not noticeable unless the ResultProxy
is not allowing "key fallback" column lookups, which will
be the case when this behavior is deprecated.

Fixes: #4718
Change-Id: I8fa2f5c0434b6a681813a92ac71fe12712f5d634

5 years ago- Add changelog for #4873
Mike Bayer [Mon, 30 Sep 2019 17:10:38 +0000 (13:10 -0400)] 
- Add changelog for #4873

Change-Id: I882d3c0e2b7e10cb5a2bec2d45d088ad51da1831

5 years agoMerge "Simplify _ColumnEntity, related"
mike bayer [Mon, 30 Sep 2019 15:32:18 +0000 (15:32 +0000)] 
Merge "Simplify _ColumnEntity, related"

5 years agoSimplify _ColumnEntity, related
Mike Bayer [Fri, 27 Sep 2019 21:32:10 +0000 (17:32 -0400)] 
Simplify _ColumnEntity, related

In the interests of making Query much more lightweight up front,
rework the calculations done at the top when the entities
are constructed to be much less inolved.  Use the new
coercion system for _ColumnEntity and stop accepting
plain strings, this will need to emit a deprecation warning
in 1.3.x.     Use annotations and other techniques to reduce
the decisionmaking and complexity of Query.

For the use case of subquery(), .statement, etc. we would like
to do minimal work in order to get the columns clause.

Change-Id: I7e459bbd3bb10ec71235f75ef4f3b0a969bec590

5 years agoEnsure states with null m2o FK value are still populated by selectinloader
Mike Bayer [Mon, 30 Sep 2019 13:55:40 +0000 (09:55 -0400)] 
Ensure states with null m2o FK value are still populated by selectinloader

Fixed regression in selectinload loader strategy caused by #4775 (released
in version 1.3.6) where a many-to-one attribute of None would no longer be
populated by the loader.  While this was usually not noticeable due to the
lazyloader populating None upon get, it would lead to a detached instance
error if the object were detached.

Fixes: #4872
Change-Id: I18466841683111643810ebc4331376df38c4767b

5 years agoupdate README.dialects; add *.pyd to .gitignore 4870/head
Gord Thompson [Sun, 29 Sep 2019 18:36:01 +0000 (12:36 -0600)] 
update README.dialects; add *.pyd to .gitignore

5 years agoMove identity_lookup to session
Mike Bayer [Thu, 26 Sep 2019 22:07:46 +0000 (18:07 -0400)] 
Move identity_lookup to session

This performance critical method is on Query needlessly, just to appease
the horizontal sharding API.   Have the performance impact of invoking
Query only incur if horizontal sharding is actually used.

Change-Id: I03db2befe2f5614380258927a62ed389a6ba0fae

5 years agoUnify generation between Core and ORM query
Mike Bayer [Wed, 25 Sep 2019 21:42:51 +0000 (17:42 -0400)] 
Unify generation between Core and ORM query

generation is to be enhanced to include caching
functionality, so ensure that Query and all generative in Core
(e.g. select, DML etc) are using the same generations system.

Additionally, deprecate Select.append methods and state
Select methods independently of their append versions.
Mutability of expression objects is a special case only when
generating new objects during a visit.

Fixes: #4637
Change-Id: I3dfac00d5e0f710c833b236f7a0913e1ca24dde4

5 years agomove pytest assert rewrite to conftest.py
Mike Bayer [Mon, 23 Sep 2019 20:33:04 +0000 (16:33 -0400)] 
move pytest assert rewrite to conftest.py

this seems to be the best place to put this as it is guaranteed
before the module is imported.   this is for the benefit of
3rd party dialects that also would have this in their conftest.py,
so that they don't have to do the "bootstrap" loading hack.

Change-Id: Ieae5324240e04a7919df46f4fca03f8db7a2af81

5 years agoSupport SQLite URIs
Mike Bayer [Fri, 20 Sep 2019 13:25:40 +0000 (09:25 -0400)] 
Support SQLite URIs

Added support for sqlite "URI" connections, which allow for sqlite-specific
flags to be passed in the query string such as "read only" for Python
sqlite3 drivers that support this.

Fixes: #4863
Change-Id: I7740b55ee8f2ede72a5c49ee94a7540e4d0250f2

5 years agoAdd req for nullable booleans
Mike Bayer [Wed, 18 Sep 2019 13:56:33 +0000 (09:56 -0400)] 
Add req for nullable booleans

Access doesn't allow for Yes/No columns to store null, so add
a rule for this.

Change-Id: If9316cd05733e39fbd59a6f54024f6740b563041

5 years agoAdd missing suite_level requirements "independent_connections"
Mike Bayer [Wed, 18 Sep 2019 12:47:46 +0000 (08:47 -0400)] 
Add missing suite_level requirements "independent_connections"

In 14b1e6fe8e18d139846c1aba6761d4eea3dc25c3 we added
suite-level requirements but did not add them to the
base, causing failures in third party dialect test suites.

Change-Id: I7edf0be86b814b508071c5c752fc2dd744a3d9ad

5 years agoFix typo in docs (errors.rst) 4862/head
Mikhail Burshteyn [Wed, 18 Sep 2019 11:00:26 +0000 (14:00 +0300)] 
Fix typo in docs (errors.rst)

5 years agoAdd missing suite level requirements from 2efd89d02941
Mike Bayer [Wed, 18 Sep 2019 01:04:21 +0000 (21:04 -0400)] 
Add missing suite level requirements from 2efd89d02941

In 2efd89d02941ab4267d6e2842963fd38b1539f6c we added
suite-level requirements but did not add them to the
base, causing failures in third party dialect test suites.

Change-Id: Ic5f1a053f5c47166e1b12c613595823106c8736e

5 years agoAdd missing suite level requirements from #4234
Mike Bayer [Tue, 17 Sep 2019 16:49:46 +0000 (12:49 -0400)] 
Add missing suite level requirements from #4234

In 9d5e117f6fcc38d8773bc943c615888dc8a3a819 we added
suite-level requirements but did not add them to the
base, causing failures in third party dialect test suites.

Change-Id: I030b5d0fd957814dfce77a71b59babd9b5e3b1bc
References: #4234

5 years agoAdd note on the use of tuple_() for the IN operator in the docs
Stepland [Mon, 16 Sep 2019 15:40:29 +0000 (11:40 -0400)] 
Add note on the use of tuple_() for the IN operator in the docs

Closes: #4861
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4861
Pull-request-sha: c7379d390752d0c10d6488872b163b06ee30d952

Change-Id: I223008f720fe64951e2a0bf95aab955ece22516b

5 years agoDocument visitors module
Mike Bayer [Thu, 12 Sep 2019 16:37:38 +0000 (12:37 -0400)] 
Document visitors module

As we are going to be adding a lot of new features to the visitors
module which may impact end-user custom constructs, start documenting
the package for now.

Change-Id: Ibae471c2cb861f6280f601b7b2382d61968825cd

5 years agoMerge "Restore subquery.as_scalar() w/ deprecation"
mike bayer [Wed, 11 Sep 2019 15:10:16 +0000 (15:10 +0000)] 
Merge "Restore subquery.as_scalar() w/ deprecation"

5 years agoRestore subquery.as_scalar() w/ deprecation
Mike Bayer [Tue, 10 Sep 2019 16:46:21 +0000 (12:46 -0400)] 
Restore subquery.as_scalar() w/ deprecation

Apparently Alias had an .as_scalar() method, so restore an
equivalent to Subquery with an appropriate deprecation warning.

Fixes: #4854
Change-Id: I6255d61b7d82487ca90ba8ee79d4b3a74e7cbe38

5 years agoRemove unnecessary util.callable usage
Steven Loria [Mon, 9 Sep 2019 14:48:29 +0000 (10:48 -0400)] 
Remove unnecessary util.callable usage

Fixes: #4850
<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description
<!-- Describe your changes in detail -->

Removes usage of `util.callable`.

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #4851
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4851
Pull-request-sha: a0ccdff2cb74f5e944d8baccc269c382b591c8e2

Change-Id: I79918f44becbc5dbefdc7ff65128695c1cabed1d

5 years agoUse compat.raise_from_cause() for re-raise of schema item error
Mike Bayer [Sun, 8 Sep 2019 01:34:14 +0000 (21:34 -0400)] 
Use compat.raise_from_cause() for re-raise of schema item error

Fixes: #4847
Change-Id: I5bc8a87ccae1b49ea507d344b7933c248e04ee89

5 years agoCatch set_parent_w_dispatch missing
Mike Bayer [Fri, 6 Sep 2019 22:40:46 +0000 (18:40 -0400)] 
Catch set_parent_w_dispatch missing

Added an explicit error message for the case when objects passed to
:class:`.Table` are not :class:`.SchemaItem` objects, rather than resolving
to an attribute error.

Fixes: #4847
Change-Id: I4dcdcee86b64c85ccf12e2ddc3d638563d307991

5 years agoAdjustments to _copy_internals()
Mike Bayer [Fri, 6 Sep 2019 16:45:53 +0000 (12:45 -0400)] 
Adjustments to _copy_internals()

We are looking to build a generalization of copy_internals(),
so move out any special logic from these methods.   Re-implement
and clarify rationale for the Alias doesnt copy a TableClause rule as
part of the adaption
traversal, establish that we forgot to build out comparison and cache
key for CTE, remove incomplete _copy_internals() from GenerativeSelect
(it doesn't handle the order_by_clause or group_by_clause, so is incomplete)

Change-Id: I95039f042503171aade4ba0fabc9b1598e3c49cf

5 years agoMerge remote-tracking branch 'origin/pr/4842'
Mike Bayer [Fri, 6 Sep 2019 00:12:21 +0000 (20:12 -0400)] 
Merge remote-tracking branch 'origin/pr/4842'

Change-Id: I4f8463e76b27dd58e047b9099f6089ffbe661e17

5 years agoadd SQL Server 2017 to mssql/base.py - Fixes #4833
Gord Thompson [Fri, 6 Sep 2019 00:10:08 +0000 (20:10 -0400)] 
add SQL Server 2017 to mssql/base.py - Fixes #4833

### Description
Add version 14 for SQL Server 2017 to mssql/base.py

Fixes #4833

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

Closes: #4832
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4832
Pull-request-sha: 3d72335284fd585c40b961bbc7013e53f3874cb5

Change-Id: Ib53a938a22386aab9e603048753cd2966c5d2b33

5 years agoMerge "Improve testcase condition statement for dialects"
mike bayer [Fri, 6 Sep 2019 00:09:37 +0000 (00:09 +0000)] 
Merge "Improve testcase condition statement for dialects"

5 years agoMerge "Strip special chars in anonymized bind names"
mike bayer [Thu, 5 Sep 2019 15:52:21 +0000 (15:52 +0000)] 
Merge "Strip special chars in anonymized bind names"

5 years agoImprove testcase condition statement for dialects
j00356287 [Thu, 5 Sep 2019 15:50:13 +0000 (11:50 -0400)] 
Improve testcase condition statement for dialects

We could get dialect.requires_name_normalize rather than use hard code
as "firebird" or "oracle", since we have add `normalize` attribute for
quite a long time.

### Description

Use `dialect.requires_name_normalize` instead `testing.against("firebird", "oracle")`

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #4843
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4843
Pull-request-sha: 304fe67b06c1f010a164806a12b68cfce9bd0d2b

Change-Id: I276f781482779473258f9269074847e283711b05

5 years agoDocument Query deduplication
Mike Bayer [Thu, 5 Sep 2019 15:46:44 +0000 (11:46 -0400)] 
Document Query deduplication

Users are frequently confused why count() does not return the same
number as the number of objects returned by all().  While we continue
to want to find a better solution to this problem, in the meantime
this has never been clearly documented.  Add an FAQ section with
links from .count() , .all(), ORM tutorial.

Change-Id: I6eff36b686ff6cdd55489036fc48a981bc47d5ee

5 years agoUpdate link to sqlalchemy-access 4842/head
Gord Thompson [Thu, 5 Sep 2019 13:53:41 +0000 (07:53 -0600)] 
Update link to sqlalchemy-access

5 years agoStrip special chars in anonymized bind names
Mike Bayer [Wed, 4 Sep 2019 22:46:53 +0000 (18:46 -0400)] 
Strip special chars in anonymized bind names

Characters that interfere with "pyformat" or "named" formats in bound
parameters, namely ``%, (, )`` and the space character, as well as a few
other typically undesirable characters, are stripped early for a
:func:`.bindparam` that is using an anonymized name, which is typically
generated automatically from a named column which itself includes these
characters in its name and does not use a ``.key``, so that they do not
interfere either with the SQLAlchemy compiler's use of string formatting or
with the driver-level parsing of the parameter, both of which could be
demonstrated before the fix.  The change only applies to anonymized
parameter names that are generated and consumed internally, not end-user
defined names, so the change should have no impact on any existing code.
Applies in particular to the psycopg2 driver which does not otherwise quote
special parameter names, but also strips leading underscores to suit Oracle
(but not yet leading numbers, as some anon parameters are currently
entirely numeric/underscore based); Oracle in any case continues to quote
parameter names that include special characters.

Fixes: #4837
Change-Id: I21cb654c3e4ef786114160b8b4295242720bf3f9

5 years agoRaise for NULL discriminator and pk is present
Mike Bayer [Tue, 3 Sep 2019 13:56:41 +0000 (09:56 -0400)] 
Raise for NULL discriminator and pk is present

An exception is now raised if the ORM loads a row for a polymorphic
instance that has a primary key but the discriminator column is NULL, as
discriminator columns should not be null.

Fixes: #4836
Change-Id: Ice1a853a7dd7687c58079b9933f145b90d314236

5 years agoCreate SECURITY.md
mike bayer [Fri, 30 Aug 2019 23:56:43 +0000 (19:56 -0400)] 
Create SECURITY.md

add SECURITY.md to suit Githubs "security" sidebar.

5 years agoMerge "Annotate session-bind-lookup entity in Query-produced selectables"
mike bayer [Fri, 30 Aug 2019 22:23:44 +0000 (22:23 +0000)] 
Merge "Annotate session-bind-lookup entity in Query-produced selectables"

5 years agoMerge "Render LIMIT/OFFSET conditions after compile on select dialects"
mike bayer [Fri, 30 Aug 2019 22:22:28 +0000 (22:22 +0000)] 
Merge "Render LIMIT/OFFSET conditions after compile on select dialects"

5 years agoAnnotate session-bind-lookup entity in Query-produced selectables
Mike Bayer [Thu, 29 Aug 2019 16:09:17 +0000 (12:09 -0400)] 
Annotate session-bind-lookup entity in Query-produced selectables

Added new entity-targeting capabilities to the :class:`.Query` object to
help with the case where the :class:`.Session` is using a bind dictionary
against mapped classes, rather than a single bind, and the :class:`.Query`
is against a Core statement that was ultimately generated from a method
such as :meth:`.Query.subquery`; a deep search is performed to locate
any ORM entity related to the query in order to locate a mapper if
one is not otherwise present.

Fixes: #4829
Change-Id: I95cf325a5aba21baec4b313246c6f4d692284820

5 years agoRender LIMIT/OFFSET conditions after compile on select dialects
Mike Bayer [Sun, 18 Aug 2019 14:02:24 +0000 (10:02 -0400)] 
Render LIMIT/OFFSET conditions after compile on select dialects

Added new "post compile parameters" feature.  This feature allows a
:func:`.bindparam` construct to have its value rendered into the SQL string
before being passed to the DBAPI driver, but after the compilation step,
using the "literal render" feature of the compiler.  The immediate
rationale for this feature is to support LIMIT/OFFSET schemes that don't
work or perform well as bound parameters handled by the database driver,
while still allowing for SQLAlchemy SQL constructs to be cacheable in their
compiled form.     The immediate targets for the new feature are the "TOP
N" clause used by SQL Server (and Sybase) which does not support a bound
parameter, as well as the "ROWNUM" and optional "FIRST_ROWS()" schemes used
by the Oracle dialect, the former of which has been known to perform better
without bound parameters and the latter of which does not support a bound
parameter.   The feature builds upon the mechanisms first developed to
support "expanding" parameters for IN expressions.   As part of this
feature, the Oracle ``use_binds_for_limits`` feature is turned on
unconditionally and this flag is now deprecated.

- adds limited support for "unique" bound parameters within
a text() construct.

- adds an additional int() check within the literal render
function of the Integer datatype and tests that non-int values
raise ValueError.

Fixes: #4808
Change-Id: Iace97d544d1a7351ee07db970c6bc06a19c712c6

5 years agoDon't create enum constraints in enum sortable tests
Mike Bayer [Fri, 30 Aug 2019 17:11:05 +0000 (13:11 -0400)] 
Don't create enum constraints in enum sortable tests

Fixed unit test regression released in 1.3.8 that would cause failure for
Oracle, SQL Server and other non-native ENUM platforms due to new
enumeration tests added as part of :ticket:`4285` enum sortability in the
unit of work; the enumerations created constraints that were duplicated on
name.

Fixes: #4285
Change-Id: I34f51e82be9b6bb43b0df8c54bb36822e6eeb73e

5 years agoMerge "Label simple column transformations as the column name"
mike bayer [Fri, 30 Aug 2019 15:21:08 +0000 (15:21 +0000)] 
Merge "Label simple column transformations as the column name"

5 years agoLabel simple column transformations as the column name
Mike Bayer [Tue, 27 Aug 2019 21:08:11 +0000 (17:08 -0400)] 
Label simple column transformations as the column name

Additional logic has been added such that certain SQL expressions which
typically wrap a single database column will use the name of that column as
their "anonymous label" name within a SELECT statement, potentially making
key-based lookups in result tuples more intutive.   The primary example of
this is that of a CAST expression, e.g. ``CAST(table.colname AS INTEGER)``,
which will export its default name as "colname", rather than the usual
"anon_1" label, that is, ``CAST(table.colname AS INTEGER) AS colname``.
If the inner expression doesn't have a name, then the previous "anonymous
label" logic is used.  When using SELECT statements that make use of
:meth:`.Select.apply_labels`, such as those emitted by the ORM, the
labeling logic will produce ``<tablename>_<inner column name>`` in the same
was as if the column were named alone.   The logic applies right now to the
:func:`.cast` and :func:`.type_coerce` constructs as well as some
single-element boolean expressions.

Fixes: #4449
Change-Id: Ie3b73470e3bea53f2386cd86514cdc556491564e

5 years agocherry-pick changelog update for 1.3.9
Mike Bayer [Tue, 27 Aug 2019 23:30:04 +0000 (19:30 -0400)] 
cherry-pick changelog update for 1.3.9

5 years agocherry-pick changelog from 1.3.8
Mike Bayer [Tue, 27 Aug 2019 23:30:04 +0000 (19:30 -0400)] 
cherry-pick changelog from 1.3.8

5 years agoMerge "Implement type-level sorting for Enum; apply to ORM primary keys"
mike bayer [Tue, 27 Aug 2019 19:29:21 +0000 (19:29 +0000)] 
Merge "Implement type-level sorting for Enum; apply to ORM primary keys"

5 years agoImplement type-level sorting for Enum; apply to ORM primary keys
Nicolas CANIART [Thu, 22 Aug 2019 18:16:29 +0000 (14:16 -0400)] 
Implement type-level sorting for Enum; apply to ORM primary keys

Added support for the use of an :class:`.Enum` datatype using Python
pep-435 enumeration objects as values for use as a primary key column
mapped by the ORM.  As these values are not inherently sortable, as
required by the ORM for primary keys, a new
:attr:`.TypeEngine.sort_key_function` attribute is added to the typing
system which allows any SQL type to  implement a sorting for Python objects
of its type which is consulted by the unit of work.   The :class:`.Enum`
type then defines this using the  database value of a given enumeration.
The sorting scheme can be  also be redefined by passing a callable to the
:paramref:`.Enum.sort_key_function` parameter.  Pull request courtesy
Nicolas Caniart.

Fixes: #4285
Closes: #4816
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4816
Pull-request-sha: 42266b766c1e462d5b8a409cda05d33dea13bd34

Change-Id: Iadcc16173c1ba26ffac5830db57743a4cb987c55

5 years agoPGDialect.get_check_constraints: Handle "NOT VALID"
Bill Finn [Tue, 27 Aug 2019 16:21:57 +0000 (12:21 -0400)] 
PGDialect.get_check_constraints: Handle "NOT VALID"

Added support for reflection of CHECK constraints that include the special
PostgreSQL qualifier "NOT VALID", which can be present for CHECK
constraints that were added to an exsiting table with the directive that
they not be applied to existing data in the table. The PostgreSQL
dictionary for CHECK constraints as returned by
:meth:`.Inspector.get_check_constraints` may include an additional entry
``dialect_options`` which within will contain an entry ``"not_valid":
True`` if this symbol is detected.   Pull request courtesy Bill Finn.

Fixes: #4824
Closes: #4825
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4825
Pull-request-sha: a0e1ab133c2d46521a74e55423ac2ba866682dae

Change-Id: I78365f50055c95474c92124b85df66c5c80c00c8

5 years agoMerge "Serialize the context dictionary in Load objects"
mike bayer [Mon, 26 Aug 2019 20:50:56 +0000 (20:50 +0000)] 
Merge "Serialize the context dictionary in Load objects"

5 years agoSerialize the context dictionary in Load objects
Mike Bayer [Mon, 26 Aug 2019 15:44:09 +0000 (11:44 -0400)] 
Serialize the context dictionary in Load objects

Fixed bug where :class:`.Load` objects were not pickleable due to
mapper/relationship state in the internal context dictionary.  These
objects are now converted to picklable using similar techniques as that of
other elements within the loader option system that have long been
serializable.

Fixes: #4823
Change-Id: Id2a0d8b640ac475c86d6416ad540671e66d410e5

5 years agoMerge "Remove erroneous assertion from array._bind_param"
mike bayer [Mon, 26 Aug 2019 17:40:14 +0000 (17:40 +0000)] 
Merge "Remove erroneous assertion from array._bind_param"

5 years agoRemove erroneous assertion from array._bind_param
Mike Bayer [Mon, 26 Aug 2019 13:45:06 +0000 (09:45 -0400)] 
Remove erroneous assertion from array._bind_param

Fixed bug where Postgresql operators such as
:meth:`.postgresql.ARRAY.Comparator.contains` and
:meth:`.postgresql.ARRAY.Comparator.contained_by` would fail to function
correctly for non-integer values when used against a
:class:`.postgresql.array` object, due to an erroneous assert statement.

Fixes: #4822
Change-Id: I886aca4c86dc7d64e9d0dfc1d910a0ae64d775a1

5 years agoRun eager loaders on unexpire
Mike Bayer [Wed, 26 Apr 2017 22:50:05 +0000 (18:50 -0400)] 
Run eager loaders on unexpire

Eager loaders, such as joined loading, SELECT IN loading, etc., when
configured on a mapper or via query options will now be invoked during
the refresh on an expired object; in the case of selectinload and
subqueryload, since the additional load is for a single object only,
the "immediateload" scheme is used in these cases which resembles the
single-parent query emitted by lazy loading.

Change-Id: I7ca2c77bff58dc21015d60093a88c387937376b2
Fixes: #1763
5 years agobump variance on test_merge_load
Mike Bayer [Fri, 23 Aug 2019 14:55:33 +0000 (10:55 -0400)] 
bump variance on test_merge_load

This test is very sensitive and fluctuates a lot, failing builds,
bump the variance to try and resolve.

Change-Id: Ia19bb8871b432059cb3917ca0050a68f75c0a0f2

5 years agoMerge "Add hide_parameters flag to create_engine"
mike bayer [Thu, 22 Aug 2019 22:02:48 +0000 (22:02 +0000)] 
Merge "Add hide_parameters flag to create_engine"

5 years agoMerge "Ensure discarded collection removed from empty collections"
mike bayer [Thu, 22 Aug 2019 22:01:38 +0000 (22:01 +0000)] 
Merge "Ensure discarded collection removed from empty collections"

5 years agoEnsure discarded collection removed from empty collections
Mike Bayer [Thu, 22 Aug 2019 00:19:43 +0000 (20:19 -0400)] 
Ensure discarded collection removed from empty collections

A bulk replace operation was not attending to the previous
list still present in the "_empty_collections" dictionary
which was added as part of #4519.

Fixes: #4519
Change-Id: I3f99f8647c0fb8140b3dfb03686a5d3b90da633f

5 years agoRemove mock dependency
Mike Bayer [Thu, 22 Aug 2019 18:11:18 +0000 (14:11 -0400)] 
Remove mock dependency

Mock is not needed over python 3.3, we need this tox
requirement only for Python 2.7 right now.

Change-Id: I06ae31f9fe6eaece0ec508e9431e4f8166a59684

5 years agoAdd hide_parameters flag to create_engine
Mike Bayer [Wed, 21 Aug 2019 21:29:55 +0000 (17:29 -0400)] 
Add hide_parameters flag to create_engine

Added new parameter :paramref:`.create_engine.hide_parameters` which when
set to True will cause SQL parameters to no longer be logged, nor rendered
in the string representation of a :class:`.StatementError` object.

Fixes: #4815
Change-Id: Ib87f868b6936cf6b42b192644e9d732ec24266c2

5 years agoFix rst typo
Mike Bayer [Wed, 21 Aug 2019 20:55:32 +0000 (16:55 -0400)] 
Fix rst typo

The changelog for #4793 has a typo in the RST and didn't show up
in the changelog, causing confusion as seen in #4814

Change-Id: I5833097c1576120fbc2ea27c54bbca685ae89f88
References: #4793
References: #4814