]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
3 years agofurther simplify pool-sharing doc rel_1_2
Mike Bayer [Fri, 11 Mar 2022 21:01:09 +0000 (16:01 -0500)] 
further simplify pool-sharing doc

1. the event based approach doesn't require dispose() to be
   called at all, and the note that the "pool will hang" makes
   no sense.   I have no idea what that refers towards
2. the subsequent paragraph about connections and sessions
   is unintelligible.  old paragraphs like these are likely
   why people complain about the docs so much.  try to just
   say "don't do this", as that is easier than trying to
   explain to use connection.invalidate() etc.

Change-Id: Id840c65a2f71583ced4dc82fd8690e7da4c4b10e
(cherry picked from commit b098d2a8b9c8a6fd1ddc5dce1eca7e70ace3f545)

3 years agodispose session outside of child proc
Mike Bayer [Fri, 11 Mar 2022 19:59:04 +0000 (14:59 -0500)] 
dispose session outside of child proc

disposing inside the child proc can interfere with the parent
process.  we likely never considered this.

Fixes: #7815
Change-Id: I6ad0e5840655ed99a9d30002eba280c8e44a5c2e
(cherry picked from commit 936f0b2fc226171a81df3ca66c269750e7e52436)

3 years agoadd copybutton
Mike Bayer [Fri, 11 Mar 2022 18:40:16 +0000 (13:40 -0500)] 
add copybutton

works great, including for plain code plus prompt code
with SQL (copies only the prompt code when prompts are present).
added some styling to zzzeeksphinx

Change-Id: I1b94b0488689e875adfb90ec171e04f7e8022415
(cherry picked from commit 7a48471f6482576ac50abab35ce4fa64c1f633b4)

3 years agoadd attribute sphinx is breaking on
Mike Bayer [Fri, 17 Sep 2021 21:27:46 +0000 (17:27 -0400)] 
add attribute sphinx is breaking on

the hybridmethod internal seems to be confusing
a recent version of sphinx autodoc, add attribute it's searching
for.

Change-Id: I27f671a51f857b62337cc2374bbc87383ae9710d
(cherry picked from commit c50183274728544e40e7da4fd35cf240da5df656)
(cherry picked from commit 6919a48337b3788e02389e738b5fb8a8b2d36f19)

4 years agoSupport pytest 6.x
Mike Bayer [Sun, 27 Sep 2020 15:31:18 +0000 (11:31 -0400)] 
Support pytest 6.x

pytest has removed support for pytest.Class().collect()
and we need to use from_parent.

Change-Id: Ia5fed9b22e76c99f71489283acee207f996f52a4

4 years agoupdate for pytest-xdist terminology
Mike Bayer [Fri, 14 Aug 2020 16:32:56 +0000 (12:32 -0400)] 
update for pytest-xdist terminology

With version 2.0.0 they removed the old terminology, which
I had no idea had been changed in any case for several years.

pushing this out for all branches

Change-Id: I6404b9b04be1ec02dc7a74abe149888dc7166ae5

5 years agoRepair doubled "using engines in fork()" section
Mike Bayer [Wed, 15 Jul 2020 23:14:46 +0000 (19:14 -0400)] 
Repair doubled "using engines in fork()" section

This section was written twice in two different ways with
the same recipe.  consolidate into one section and
add additional caveats regading dispose.

Change-Id: I20524935e7c10e3624d561ea2735312fd04e673d
References: #5460
(cherry picked from commit f4aa9def8f35136d1fe3bba81aaeddb72e7772a2)
(cherry picked from commit 147b116c32f2404ccc6cf32e679031eb75dae48b)

5 years agoFix capitalization typos in engines.rst
Abraham Sangha [Mon, 8 Jun 2020 16:17:09 +0000 (10:17 -0600)] 
Fix capitalization typos in engines.rst

(cherry picked from commit 6322cb20974b1d702b9fa0cfc07dbef2c549797c)

5 years agoFix 'email_address' being typoed as 'email_addres' in two places
Mark Amery [Thu, 28 May 2020 12:37:24 +0000 (13:37 +0100)] 
Fix 'email_address' being typoed as 'email_addres' in two places

(cherry picked from commit 8a6e64323abeb9d08de3f68c63c6401ba1a5f847)

5 years agoRun search and replace of symbolic module names
Mike Bayer [Tue, 14 Apr 2020 17:23:30 +0000 (13:23 -0400)] 
Run search and replace of symbolic module names

Replaces a wide array of Sphinx-relative doc references
with an abbreviated absolute form now supported by
zzzeeksphinx.

Change-Id: I94bffcc3f37885ffdde6238767224296339698a2

5 years agoEnable zzzeeksphinx module prefixes
Mike Bayer [Sun, 12 Apr 2020 19:18:02 +0000 (15:18 -0400)] 
Enable zzzeeksphinx module prefixes

zzzeeksphinx 1.1.2 in git can now convert short
prefix names in a configured lookup to fully qualified module
names, so that
we can have succinct and portable pyrefs
that still resolve absolutely.
It also includes a formatter that will format all pyrefs
in a fully consistent way regardless of the package path,
by unconditionally removing all package tokens but always
leaving class names in place including for methods, which
means we no longer have to deal with tildes in pyrefs.

The most immediate goal of the absolute prefixes is
that we have lots of
"ambiguous" names that appear in muliple places, like select(),
ARRAY, ENUM etc.   With the incoming future packages there
is going to be lots of name overlap so it is necessary
that all names eventually use absolute package paths
when Sphinx receives them.

In multiple stages, pyrefs will be converted using the
zzzeeksphinx tools/fix_xrefs.py tool so that doclinks can
be made absolute using symbolic prefixes.

For this review, the actual search and replace of symbols
is not performed, instead some general cleanup to prepare
the docs as well as a lookup file used by the tool
to do the conversion.   this relatively small patch will
be backported
with appropriate changes to 1.3, 1.2, 1.1 and the tool
can then be run on each branch individually.  We are shooting
for almost no warnings at all for master (still a handful
I can't figure out which don't seem to have any impact)
, very few for 1.3,
and for 1.2 / 1.1 we hope for a significant reduction
in warnings.

Overall for all versions pyrefs should
always point to the correct target, if they are in fact
hyperlinked.  it's better for a ref to go nowhere and
be plain text than go to the wrong thing.  Right now,
hundreds of API links are pointing to the wrong thing
as they are ambiguous names such as refresh(), insert(),
update(), select(), join(), JSON etc. and Sphinx sends these all
to essesntially random destinations among as many as five
or six possible choices per symbol.  A shorthand system
that allows us to use absolute refs without having
to type out a full blown absoulte module is the only
way this is going to work, and we should ultimately
seek to abandon any use of prefix dot for lookups.  Everything
should be on an underscore token so at the very least the module
spaces can be reorganized without having to search and replace
the entire documentation every time.

Change-Id: I484a7329034af275fcdb322b62b6255dfeea9151
(cherry picked from commit d8d755ad619e2ee78f2c7cb60ae9a1feee4c6d76)
(cherry picked from commit 8f992000a4ed59d5f91796cef5cec7697ce464fc)

5 years agoAdd missing definitions to glossary
Mike Bayer [Mon, 13 Apr 2020 19:24:23 +0000 (15:24 -0400)] 
Add missing definitions to glossary

improve formatting

Change-Id: Iea3b72187d7c8020e18babb72a53c39c5aeec68c
(cherry picked from commit 1b1fe518512441959f4ac9c9b715271e2b6d7977)

5 years agoFix almost all read-level sphinx warnings
Mike Bayer [Sat, 11 Apr 2020 17:53:41 +0000 (13:53 -0400)] 
Fix almost all read-level sphinx warnings

Partial backport of 43bcb0de1ecc1dc2abd7e7c3eb0c39f3eab9adc0.

Also enables sphinx multiprocess.

Change-Id: I49b1959b9a5fe84fb4c74366da2724284a804936
(cherry picked from commit d56887bcb63808ff6b42e4370ec082a8ef5a41a0)

5 years agoBackport documentation warnings for relationship eval()
Mike Bayer [Tue, 7 Apr 2020 21:37:14 +0000 (17:37 -0400)] 
Backport documentation warnings for relationship eval()

Documentation that is taken from #5238.

Change-Id: Id802f403190adfab0ca034afe2214ba10fd9cfbb
(cherry picked from commit 11b2b645078ffb46217d493ef9f5aebdf79b8bfc)
(cherry picked from commit e2fb6c97826c3b3f6a2d7bf6d2d57a7a192787c8)

5 years agotypo: missing comma
michitaro.koike [Thu, 26 Mar 2020 07:09:42 +0000 (16:09 +0900)] 
typo: missing comma

(cherry picked from commit 2d4171ec8c85a468bdbdcf55e8d053b1586747ff)

5 years agoClarify Alembic vs. Migrate
Mike Bayer [Fri, 20 Mar 2020 20:40:47 +0000 (16:40 -0400)] 
Clarify Alembic vs. Migrate

Migrate is fully legacy at this point so continue to mention
it to provide clarity, but ensure it isn't suggested
as a real alternative.  It's unclear if Migrate will be able
to support SQLAlchemy 2.0.

Change-Id: Ia81aaccbd18f197ab533b083e87cc4d04ea05839
(cherry picked from commit a25e2e02e108551d2910171202fd91fdaeb8162c)

5 years agoFix "special_key" attribute name in association proxy documentation
Mike Bayer [Tue, 17 Mar 2020 02:06:15 +0000 (22:06 -0400)] 
Fix "special_key" attribute name in association proxy documentation

Fixes: #5204
Change-Id: I1366be823d753bdcd92c98b948bdfa7960a27eb7
(cherry picked from commit 1768dd2a08dee92d73d160a5ba437df4ced37d2c)

5 years agoRemove trailing slashes in pre-commit config
Mike Bayer [Thu, 12 Mar 2020 00:47:25 +0000 (20:47 -0400)] 
Remove trailing slashes in pre-commit config

See https://github.com/sqlalchemy/dogpile.cache/pull/176

Change-Id: Id9a75546d4d0eae93ad837a77c6ffa9249efff5c
(cherry picked from commit f8a037aa822415d10f0ca8b8be0bb06d49f03d10)

5 years agoFix link in docs of query_expression and with_expression
Federico Caselli [Wed, 11 Mar 2020 18:09:41 +0000 (19:09 +0100)] 
Fix link in docs of query_expression and with_expression

Ref #5198

Change-Id: I566c2f7bbe08e9017e09e133079bef1c38469595
(cherry picked from commit 4cf10e7deb15dc3c5424a209fd243ca760bbbb8b)

5 years agofix typo in PickleType documentation
Federico Caselli [Wed, 4 Mar 2020 12:48:30 +0000 (13:48 +0100)] 
fix typo in PickleType documentation

(cherry picked from commit f9753f5c8f7c4427fa7b21076d3f46177afbfcd0)

5 years agoInclude column_property composition examples
Mike Bayer [Tue, 3 Mar 2020 13:58:35 +0000 (08:58 -0500)] 
Include column_property composition examples

Add cross-linking between column_property() and ColumnProperty

Add section to describe using .expression

remove inherited-members from ColumnProperty to greatly
decrease verbosity

Fixes: #5179
Change-Id: Ic477b16350dbf551100b31d14ff3ba8ba8221a43
(cherry picked from commit 4c81d99bab0e884473abfcb573772aa5d94264c7)

5 years agoUpdate dialect API documentation
Mike Bayer [Mon, 2 Mar 2020 15:28:32 +0000 (10:28 -0500)] 
Update dialect API documentation

The docstrings for connect() and on_connect() were incorrect
between Dialect vs. DefaultDialect.   Redocumented related
methods, clean up formatting, and remove unicode-related
attribute descriptions from the top level Dialect document
as these don't apply to Python 3.

Change-Id: I45baab757f8e20627eba42c30b9e8dbe26356275
(cherry picked from commit 649de79950dcf952d7a44069faf36925c23c4e63)

5 years agoRemove print statement in favor of print() function in docs and examples
Albert Tugushev [Wed, 26 Feb 2020 16:09:29 +0000 (11:09 -0500)] 
Remove print statement in favor of print() function in docs and examples

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

### Description
<!-- Describe your changes in detail -->
Remove print statements

### 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:

- [X] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [ ] 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: #5166
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5166
Pull-request-sha: 04a7394f71298322188f0861b4dfe93e5485839d

Change-Id: Ib90a59fac929661a18748c6e44966fb87e3978c6
(cherry picked from commit a836e3df5d973f75bd8330cecb76511b67c13612)

5 years agoImprove ResultProxy/Row documentation before the API change
Mike Bayer [Thu, 13 Feb 2020 17:48:26 +0000 (12:48 -0500)] 
Improve ResultProxy/Row documentation before the API change

We'd like to merge Ieb9085e9bcff564359095b754da9ae0af55679f0,
however the documentation in that change should be based off
of more comprehensive documentation than what we have already.

Add the notion of "row" to the tutorial and document all
methods.   This will also be backported at least to 1.3
in terms of RowProxy.

Change-Id: I2173aecc86cf15c5a7c473b8f471639ee9082f84
(cherry picked from commit 8fabe50d7a47b50215a7ea4cf1d39409d9529e51)
(cherry picked from commit c5d51df5e4fe329913ad4c04ed7db8e1c61c3b84)

5 years agoUpdate basic_relationships.rst
randallk [Mon, 20 Jan 2020 00:11:44 +0000 (17:11 -0700)] 
Update basic_relationships.rst

Fix relationship used in doc.

(cherry picked from commit 698a279c918b2d037fc49700c51126d624db777a)

5 years agoDocument SQLite "mixed binary" behavior
Mike Bayer [Thu, 6 Feb 2020 15:26:50 +0000 (10:26 -0500)] 
Document SQLite "mixed binary" behavior

The Pysqlite driver can store a string value with
or without an indicator that the value is to be retrieved
as bytes or as a unicode string object.    To suit the
use case where a SQLite database has mixed values on a row
by row basis, provide a recipe for a MixedBinary datatype.

Change-Id: I9a166bd6fc673d8d46a53ab9697cb3d412e5fcee
References: #5073
(cherry picked from commit ee1d914888113ceb9928ece6e0a715c813bdfcfa)

5 years agoAdd second section detailing cascade_backrefs to backref section
Mike Bayer [Tue, 4 Feb 2020 21:46:49 +0000 (16:46 -0500)] 
Add second section detailing cascade_backrefs to backref section

We only have docs for "cascade_backrefs" in the session->cascades
documentation, when this really should be mentioned in the chapter
that's all about backrefs.  Add a similar section and link to the
original for further detail.

Fixes: #5130
Change-Id: I58b6dcafd4ce43e4b9ebd86a40123502c01d4e39
(cherry picked from commit e48c685933b3b6f405134b5cb74f488075ae585d)

5 years agoAdd explanation of `polymorphic_identity` to docs
Eli [Tue, 29 Oct 2019 02:43:30 +0000 (19:43 -0700)] 
Add explanation of `polymorphic_identity` to docs

Fixes: #4951
Change-Id: I592063ffc7c9ffa0eff8bffd53f6ce407a551d15
(cherry picked from commit 295441bab3051e96e7651047acb02cabca9ac0f5)

5 years agoFix newly found rst issue
Mike Bayer [Tue, 31 Dec 2019 01:01:23 +0000 (20:01 -0500)] 
Fix newly found rst issue

Likely due to new versions flake8-rst-docstrings or similar,
repair an incorrectly formatted code example in a doc string
causing all the gerrits to fail.

Change-Id: Ib2b242f435005a9e075315881c30c4a599d322e7

5 years agoImprove documentation for refresh_flush event
Mike Bayer [Thu, 19 Dec 2019 14:19:53 +0000 (09:19 -0500)] 
Improve documentation for refresh_flush event

This event does not include INSERTed primary key columns
and additionally will always be limited to default/onupdate
columns.    Note better choices for interception of INSERT
events.

Change-Id: I22b71ca1b336d4b098af075cc4694c55387b64f3
(cherry picked from commit 944fa6952157651faae53a12a92782b4265ddc8d)

5 years agoAdd pass through exact pyodbc connection string.
Gord Thompson [Wed, 4 Dec 2019 10:47:24 +0000 (03:47 -0700)] 
Add pass through exact pyodbc connection string.

(cherry picked from commit 565a56153149f0d27934abf1bc1a7fa81e59c484)

5 years agoAdd note re: pyodbc keywords in lowercase.
Gord Thompson [Wed, 4 Dec 2019 00:02:19 +0000 (17:02 -0700)] 
Add note re: pyodbc keywords in lowercase.

(cherry picked from commit 511964302467140a25fb50c68a1c96d24a079b80)

5 years agoAdd dialect for Apache Solr
Ahmed Adel [Tue, 3 Dec 2019 07:06:20 +0000 (09:06 +0200)] 
Add dialect for Apache Solr

(cherry picked from commit 6e873b299949f530eca0bff12feb798ff15ba89e)

5 years agoUse viewonly=True for composite secondary join example
Mike Bayer [Tue, 19 Nov 2019 15:12:35 +0000 (10:12 -0500)] 
Use viewonly=True for composite secondary join example

This example isn't writable as given.   Add additonal
warnings.  Also modernize the "query-enabled property"
section and add links to hybrids.

Fixes: #4992
Change-Id: I8f4b4db9e42ab2207a74532e3b17a56c35b0a837
(cherry picked from commit 25a6596030cbf16a870db142ddf096223c79be7a)

5 years agoAdd TypeDecorator recipe for timezone aware/UTC conversion
Mike Bayer [Wed, 13 Nov 2019 15:49:01 +0000 (10:49 -0500)] 
Add TypeDecorator recipe for timezone aware/UTC conversion

Change-Id: I59e6c76a4a53ce3782bcfc4aecdeb1b4fdd7b941
References: https://github.com/sqlalchemy/sqlalchemy/issues/4980
(cherry picked from commit e345864506346700dc4c21ff21bfc18f2c047831)

5 years agofixed typo in session.py in line 3063
L0stLink [Sat, 2 Nov 2019 10:09:03 +0000 (15:09 +0500)] 
fixed typo in session.py in line 3063

Changed : wish to detect is a "rollback" is
 to : wish to detect if a "rollback" is
, improving clarity.

(cherry picked from commit 7f260c95d65f9bb77e4e0bbb8ef78f57b183fc7c)

5 years agoImprove SQL Server pyodbc documentation
Mike Bayer [Thu, 31 Oct 2019 14:30:46 +0000 (10:30 -0400)] 
Improve SQL Server pyodbc documentation

While we were told years ago that ODBC is intended to be used with
DSNs only, however this use does not correspond well with how most
other database connectivity systems work in that modern systems
already have their own registries of connection information in any
case, meaning this is usually the best place to add details such
as hostnames and driver names, rather than having them locked away
in a server-specific ODBC registry.    So here we dial back the
language that one style or another of connecting is "preferred";
both styles are supported equally, and the critical advantage of
hostname mapping in that the target database name is both explicit
as well as modifyable is also added.

Add additional background for how DSNs work and refine other
sentences.   "URL encoding" is the correct terminology for
adding spaces and special characters to a URL.

Change-Id: I13a74432976e6d3166633b98f9bb84c4856caac8
(cherry picked from commit 65466dec6346ad84340af1cf3e431020add0f9a5)

5 years agoTypo fix
Ales Dokshanin [Wed, 23 Oct 2019 15:37:49 +0000 (18:37 +0300)] 
Typo fix

(cherry picked from commit 26d9a29514ea0949f09f75622065e737fabeabe1)

5 years agoWarn that before_compile for lazyload needs bake_queries=False
Mike Bayer [Fri, 25 Oct 2019 14:08:18 +0000 (10:08 -0400)] 
Warn that before_compile for lazyload needs bake_queries=False

The longer term future plan for ORM queries is that there
will be a new hook that receives queries before invocation
rather than "compilation", which will make use of a new
caching system.

Fixes: #4947
Change-Id: I256c16155a0cc9b7133e86e22d27040cb64eb1a9
(cherry picked from commit 172d99a8a1282b534aeadafebdd2af0162758931)

5 years agoAdd doc note for multiple table mapping
Mike Bayer [Wed, 23 Oct 2019 15:18:56 +0000 (11:18 -0400)] 
Add doc note for multiple table mapping

When mapping to a construct like OUTER JOIN, an UPDATE from the
ORM expects that all involved tables have a row already present;
document this as well as a potential workaround.

Fixes: #4927
Change-Id: Ie99f9f53cea33d9df2513f384a7c68676b197fb7
(cherry picked from commit 2cae55269b6745bd733be142a6e199d8ecf9b50a)

5 years agoFix pydoc typo in sqlite dialect
Matt Livesey [Thu, 17 Oct 2019 07:36:30 +0000 (09:36 +0200)] 
Fix pydoc typo in sqlite dialect

(cherry picked from commit a727f250ccc55df8532f6498ad46dd747ce32250)

5 years agoFix test failures from func doc fix
Mike Bayer [Fri, 18 Oct 2019 02:11:31 +0000 (22:11 -0400)] 
Fix test failures from func doc fix

The doc edits in e45878bf4f9cdfb714dce8b2a4d705178947674d
triggered a doctest and a pep8 failure.

Change-Id: I41c6cba9bab2d3721d9c6280be47eec32f4b4736
(cherry picked from commit d25c03310fd3523392d37b88c23c48cf26836248)

5 years agofix func docs
Mike Bayer [Thu, 17 Oct 2019 19:04:47 +0000 (15:04 -0400)] 
fix func docs

sphinx is not generating the docs for func.  cross-copy
__doc__ and also add more links.

Fixes: #4922
Change-Id: I5512111d726b6fcf9821be730c9e29adc73c95cb
(cherry picked from commit e45878bf4f9cdfb714dce8b2a4d705178947674d)

5 years agoClarify isolation_level documentation
Mike Bayer [Tue, 15 Oct 2019 15:27:51 +0000 (11:27 -0400)] 
Clarify isolation_level documentation

Fixes: #4909
Change-Id: I32114a8349c1d2d0a837610ccc74f9e789ed20f5
(cherry picked from commit 2ef87804e9b7d3048dcbd70d526282f727b48eb0)

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

(cherry picked from commit edf8e782cf5011cd43a0ee281b9e0b1d1becef1f)

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
(cherry picked from commit f79967441fd092ba9cc81f53b6a71e8cf0223b35)

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

(cherry picked from commit af94e639ae7b0e2ee3d8caf92b0f7e128f4199ab)

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
(cherry picked from commit 33648643f227929f083b67d817701f930078f901)

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
(cherry picked from commit f92fa1b5dfceb5c079a46db598294db133cb0cac)

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
(cherry picked from commit 6a60d7305bafc311115543e0c2cb5136a254edf2)

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
(cherry picked from commit ed02d924dd0bd1bce56b40bea74e1d382c352833)

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

(cherry picked from commit 11c24cd2ed6ac746e9f94a22a6e16c13e608ef6e)

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
(cherry picked from commit 75c3950732a66ff7f4aca152653d6cb14eb9783c)

5 years agoDocument how to work with reflection and custom datatypes
Mike Bayer [Tue, 20 Aug 2019 13:42:36 +0000 (09:42 -0400)] 
Document how to work with reflection and custom datatypes

Describe the link between table reflection, datatype lookups,
and what approaches are needed in the case where in-Python datatypes
are needed in the reflected table metadata.

Fixes: #4812
Change-Id: I68bef2bf472811797d4f5d9a625c6b9bca902f78
(cherry picked from commit a3df16995b45e14d4c572302b17bccfa9a7cbf57)

5 years ago- shore up TypeDecorator docs a bit to not render tons of
Mike Bayer [Sun, 11 Aug 2019 02:20:31 +0000 (22:20 -0400)] 
- shore up TypeDecorator docs a bit to not render tons of
comparator methods

Change-Id: I8f434b18b2bd632a0db0db1376262944272d2198
(cherry picked from commit 731a20049b372ee2e0c7408519623363e22a4db4)

5 years agoClarify INSERT/UPDATE defaults vs. data marshalling
Mike Bayer [Sat, 10 Aug 2019 22:17:59 +0000 (18:17 -0400)] 
Clarify INSERT/UPDATE defaults vs. data marshalling

- Add a full introductory paragraph to INSERT/UPDATE defaults
stating what we mean when we talk about this concept.  Add a note
differentiating what a default does, vs. a rule that intercepts
data as it moves into the database, providing links

- Add a quick section referring to TypeDecorator in the ORM
section on modifying attribute behavior

- Add an "ORM tip", a new thing that we can use in Core to link
to ORM concepts when useful, in the TypeDecorator section which
mentions that for more open ended conversion of arbitrary user
data based on business rules, @validates might be useful
(although this still does not suit the case of full blown form
validation).

- add glossary entries for DML, data marshalling since we already
use these terms and I'd like to refer to them more often.

Fixes: #4796
Change-Id: Ic4cd5c1595fd51c00a9bf24c021d2e56d457d346
(cherry picked from commit cda0b4a2b909be55cef7a844a04689ec527041c0)

6 years agoSmall text error in json field doc
Denis Kataev [Mon, 8 Jul 2019 16:32:20 +0000 (21:32 +0500)] 
Small text error in json field doc

Small fix json field doc

(cherry picked from commit 7b8ff3c335938532b70e6ffff212bd8f67c56add)

6 years agoFix doc for #4765
Denis Kataev [Wed, 17 Jul 2019 16:02:53 +0000 (21:02 +0500)] 
Fix doc for #4765

(cherry picked from commit 86d8b12a6b3f3d5481614dd79aa1977e93d91d8b)

6 years agoRepair json example in tutorial to suit non-present sqlite support
Mike Bayer [Fri, 5 Jul 2019 20:14:06 +0000 (16:14 -0400)] 
Repair json example in tutorial to suit non-present sqlite support

Change-Id: If896273adbab2e3fdb995272f6e55de420aee220

6 years agoRename tutorial section to "Using Aliases and Subqueries"
Mike Bayer [Fri, 5 Jul 2019 19:55:20 +0000 (15:55 -0400)] 
Rename tutorial section to "Using Aliases and Subqueries"

add some verbiage to start differentiating a subquery from
an alias.

Also, get rid of a very strange note to use ``.correlate(None)``
on a non-scalar subquery; this is unnecessary and confusing.

Change-Id: I83b2fd1275c719a32bb74060756d61bc51b52892
(cherry picked from commit f4f9ec1c2f6fad29729ee379adb537f8648d1737)

6 years agoNote DBAPIs and dialects that we don't support
Mike Bayer [Fri, 5 Jul 2019 16:19:55 +0000 (12:19 -0400)] 
Note DBAPIs and dialects that we don't support

Since we have strong CI for the DBAPIs and dialects that are actively
supported, this indicates that those DBAPIs that aren't in CI are
continuing to fall behind in support, to the point where we can
not address issues that may arise. As such, the Sybase and Firebird
dialects overall are moving into an explicit "not supported" zone
where we would like to eventually remove them.   Additionally,
a pass is made through legacy MySQL and PostgreSQL DBAPI dialects
as well as those which we aren't able to include in CI to note
that these DBAPIs aren't actively supported by the project.

Change-Id: I61f1515b97b741b7534b54e434e3e47065df7b5d
(cherry picked from commit 4bd4bae5c1132e1ca41425f742402d06026a918a)

6 years agoSquashed commit of the following:
Mike Bayer [Fri, 5 Jul 2019 14:06:16 +0000 (10:06 -0400)] 
Squashed commit of the following:

commit d4f3bedc74568b7ec543988ee2d43e64c5ace28f
Author: Carson Ip <carsonip@users.noreply.github.com>
Date:   Fri Jul 5 11:20:12 2019 +0800

    Fix typo in docstring

commit a3e4b05744f51ec5d12a2fee1ad6093de904273e
Author: Carson Ip <carsonip@users.noreply.github.com>
Date:   Fri Jul 5 11:14:57 2019 +0800

    Fix typo in docstring

Change-Id: Ifa2ebff5629bf970e5fac28bba64d501376cfae9
(cherry picked from commit 28daa34cb887e0f07e9f53e4b9e7596e6df12cd9)

6 years agoAdd tutorial section for cast(), type_coerce()
Mike Bayer [Thu, 4 Jul 2019 15:16:50 +0000 (11:16 -0400)] 
Add tutorial section for cast(), type_coerce()

Change-Id: I49f635f0ad4d07abe8ef2681c9660ec7fcf5f99b
(cherry picked from commit e03f7ab50e69ffce67585cdc7a0cb7a3cc5c0cc1)

6 years agoFix typo in documentation examples
Emile Caron [Mon, 17 Jun 2019 14:25:21 +0000 (16:25 +0200)] 
Fix typo in documentation examples

(cherry picked from commit 12253707148910d8dafb79425c0fe7d651b9e151)

6 years agoRework Session transaction FAQs
Mike Bayer [Fri, 7 Jun 2019 18:50:22 +0000 (14:50 -0400)] 
Rework Session transaction FAQs

In preparation for #4712, add an errors.rst code to the Session's
exception about waiting to be rolled back and rework the FAQ entry
to be much more succinct.  When this FAQ was first written, I found
it hard to describe why flush worked this way but as the use case is
clearer now, and #4712 actually showed it being confusing when it doesn't
work this way, we can make a simpler and more definitive statement
about this behavior.   Additionally, language about "subtransactions"
is minimized as I might be removing or de-emphasizing this concept in
2.0 (though maybe not as it does seem to work well).

Change-Id: I557872aff255b07e14dd843aa024e027a017afb8
(cherry picked from commit 4bd3cf69b2a7f5b1977e7be2b8588fd5d3424d11)

6 years agoupdate LICENSE to be the exact MIT formatting
Mike Bayer [Tue, 28 May 2019 16:40:31 +0000 (12:40 -0400)] 
update LICENSE to be the exact MIT formatting

Change-Id: I9ee75862924cd8f95ea8d812ab2e2a0ff4e48a66
(cherry picked from commit e624c2cc70d970687cf027c4527fe6f9fa870bc0)

6 years agoReformat license name
Mike Bayer [Tue, 28 May 2019 13:46:20 +0000 (09:46 -0400)] 
Reformat license name

While we have the OSI classifier for "MIT License", it looks
like for the "license" field, this is normally just the word
"MIT" and not "MIT License".   While the pypa docs suggest we
only need it as the OSI classifier, keep it also in "license"
in order to appease common tooling.

Change-Id: Ife51bbc74d6c1b8ab9a736024818fbba35316e17
(cherry picked from commit fff65b814a16914aae41bd63cdef6bf55a676c67)

6 years agoAdd documentation / tracker URLs for pypi
Mike Bayer [Mon, 27 May 2019 21:26:35 +0000 (17:26 -0400)] 
Add documentation / tracker URLs for pypi

Change-Id: I379b3d9e59ff8cda17c2d738fde794249f105510
(cherry picked from commit 9feec16b149aaaadb5b55933c7bb020becca45f5)

6 years agoUse py.test for versioned_history tests, nose no longer runs
Mike Bayer [Sat, 25 May 2019 13:14:45 +0000 (09:14 -0400)] 
Use py.test for versioned_history tests, nose no longer runs
without warnings under python 3

Fixes: #4697
Change-Id: I46d395d3b6642acd9317e27d6a5723ae5201e877
(cherry picked from commit 0694c7f272819d013b5e1931f1baf0ebfb05e666)

6 years agodoc grammar updates
Mengxi Zhang [Wed, 22 May 2019 19:46:16 +0000 (12:46 -0700)] 
doc grammar updates

(cherry picked from commit aabd369670fff4d99501c0be4632a9873372ba78)

6 years agoImprove docstrings for AtributeEvents re: propagate flag
Mike Bayer [Wed, 22 May 2019 15:43:01 +0000 (11:43 -0400)] 
Improve docstrings for AtributeEvents re: propagate flag

Make sure the flag is illustrated as well as that every event
has a seealso encouraging the user to look at the top level
listen options.

Fixes: #4691
Change-Id: I137bd74e5d93971bbd04758c7a022a026e13b423
(cherry picked from commit 999bd50753a46785d8031d080af661f608b867c5)

6 years agoAdd .pre-commit-config.yaml
Mike Bayer [Sat, 18 May 2019 14:47:39 +0000 (10:47 -0400)] 
Add .pre-commit-config.yaml

See https://pre-commit.com/ for documentation on how to use
this file.

SQLAlchemy and related projects make use of Black and zimports
for code formatting, this hook allows for automated pre-commit
runs.

Change-Id: I4bbb49747e9f7fb52251dc61ecda98361cd036fd
(cherry picked from commit 69ebf2cc365baf82016c9d1672fe89e39594b523)

6 years agoDocument and test modification of .values in before_compile_update
Mike Bayer [Thu, 16 May 2019 00:27:30 +0000 (20:27 -0400)] 
Document and test modification of .values in before_compile_update

Change-Id: I2a694bcf24b06806dc98651015e7c7a8b090ff65
(cherry picked from commit 89e6beaf46ebdd626e292eb20f7b6ae0c3a9ae5c)

6 years agoFixes typo in core/connections.rst
Michael J Ward [Tue, 23 Apr 2019 20:44:06 +0000 (15:44 -0500)] 
Fixes typo in core/connections.rst

The generated sql was using the incorrect `user_schema` instead
of the correct `user_schema_one` translated table name.

(cherry picked from commit 9bba68a5a70d9e58bbc7490f7313c3b9dc2bb9ba)

6 years ago- fix long line
Mike Bayer [Fri, 10 May 2019 00:32:04 +0000 (20:32 -0400)] 
- fix long line

Change-Id: If44d364ae02da447169a3dc51b6514225578cf82
(cherry picked from commit 3abced7bd2842d41e17f438a65efc15aa71d4bb4)

6 years ago- remove references to nose
Mike Bayer [Thu, 9 May 2019 15:57:12 +0000 (11:57 -0400)] 
- remove references to nose

Change-Id: I970cc257dfb1c69413fa1c5593ba523ffc5070d4
(cherry picked from commit 1a3792c3b3af9b945862686b6d54a855342a5331)

6 years agoAdd documentation for MySQL optimizer hints using prefix_with
Mike Bayer [Wed, 8 May 2019 15:40:12 +0000 (11:40 -0400)] 
Add documentation for MySQL optimizer hints using prefix_with

Fixes: #4667
Change-Id: Iac3345319dc7c5a20bc7a6520492d2f341b64807
(cherry picked from commit c608c3f2f8af0e4cd9e2ffbd3b6f7f487e785282)

6 years agoInclude GenericTypeCompiler in docs
Bjørnar Myrheim [Wed, 1 May 2019 07:39:26 +0000 (09:39 +0200)] 
Include GenericTypeCompiler in docs

Fixes: #4411
Change-Id: Ic60e78555651d05ff0492650bd7647685b867671
Closes: #4651
(cherry picked from commit cdd01a06f7cf5e9ce35544a02c182eca4015992c)

6 years agoremote_attr and local_attr refer to class bound attributes, not MapperProperty
Mike Bayer [Thu, 25 Apr 2019 22:24:27 +0000 (17:24 -0500)] 
remote_attr and local_attr refer to class bound attributes, not MapperProperty

backport from master

Change-Id: If3ffe0945f47010e1ddecabfc27a6e7707031fd9

6 years agoUse "parent object" instead of "primary object"
vpsx [Wed, 17 Apr 2019 23:48:40 +0000 (18:48 -0500)] 
Use "parent object" instead of "primary object"

(cherry picked from commit 6758a459597e5221607a81a693bd98352bb1c94f)

6 years agoVersion 1.2.20 placeholder
Mike Bayer [Mon, 15 Apr 2019 16:29:31 +0000 (12:29 -0400)] 
Version 1.2.20 placeholder

6 years ago- 1.2.19 rel_1_2_19
Mike Bayer [Mon, 15 Apr 2019 16:08:35 +0000 (12:08 -0400)] 
- 1.2.19

6 years agoUpdate link for cx_Oracle
Mike Bayer [Fri, 5 Apr 2019 14:20:08 +0000 (10:20 -0400)] 
Update link for cx_Oracle

Fixes: #4596
Change-Id: I80205d51fe500520030f2c94c06363e1fb6f9c65
(cherry picked from commit 1ec2f7cfd6c1fa8acf9a41330df597af99dcadc7)

6 years agoImprove documentation for connection pool logging
jaskiratsingh [Fri, 5 Apr 2019 13:51:12 +0000 (09:51 -0400)] 
Improve documentation for connection pool logging

Also do a general pass for logging + doc formatting,
add more cross-linking and remove obsolete information such
as "echo_uow"/

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Fixes: #4571
Closes: #4583
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4583
Pull-request-sha: e98ad34eca7e9f59fb07cd8b7ec317c1cb989848

Change-Id: I03f7354a4ef55fd8b6a51d03a280579f36e8a06c
(cherry picked from commit 2b25827b8455aaaa8c73180d0c26afb3e3187adc)

6 years agoEnhance documentation for string compilation use cases
Mike Bayer [Fri, 5 Apr 2019 01:43:12 +0000 (21:43 -0400)] 
Enhance documentation for string compilation use cases

- Add a web link for UnsupportedCompilationError
- Add new section to errors.rst
- add more detail and cross-linking to the FAQ
- include security caveats for parameter rendering

Fixes: #4595
Change-Id: I31ea57c18d65770cd2a51276bbe2847a9eb72bba
(cherry picked from commit 6845be0927245e47c27f8e160472cf9a55a41dc4)

6 years agoClarify that declarative string resolution does not imply imports are implicit
Antony Gelberg [Sat, 16 Mar 2019 21:34:12 +0000 (17:34 -0400)] 
Clarify that declarative string resolution does not imply imports are implicit

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Closes: #4545
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4545
Pull-request-sha: c25221838d726f316dc04102b6b2002cec6b3a6c

Change-Id: Ic38621f7deb3cb25e250aab61c5b2b02d633b187
(cherry picked from commit e209df356a38a1885f2b0fdab3c5d7e7d58837d9)

6 years agoCommit transaction after SNAPSHOT isolation change
Mike Bayer [Fri, 8 Mar 2019 23:36:33 +0000 (18:36 -0500)] 
Commit transaction after SNAPSHOT isolation change

A commit() is emitted after an isolation level change to SNAPSHOT, as both
pyodbc and pymssql open an implicit transaction which blocks subsequent SQL
from being emitted in the current transaction.

Fixes: #4536
Change-Id: If3ba70f495bce2a35a873a3a72d1b30406e678c8
(cherry picked from commit cbc31716c2cef29f45506c6227c2154e3093c845)

6 years agoUpdate the mysql-connector-python docs for now
Mike Bayer [Fri, 8 Mar 2019 14:54:58 +0000 (09:54 -0500)] 
Update the mysql-connector-python docs for now

mysql-connector-python still seems to have issues with binary datatypes
but the other issues here, with the possible exception of the deadlock
still being investigated, seem to have been resolved in the recent
8.x series of mysql-connector-python.   The driver is still not
recommended due to these issues however we don't need a special
class of warnings at this point.

Change-Id: I2d59e76df5e84b34e318a24b468626900c39da46
References: #4531
(cherry picked from commit 312d529dbbaa9bb7d8d804280cb39797c6402931)

6 years agoFix large_resultsets performance example field name
Matt Schuchhardt [Wed, 6 Mar 2019 15:28:48 +0000 (10:28 -0500)] 
Fix large_resultsets performance example field name

Fixed bug in large_resultsets example case where a re-named "id" variable
due to code reformatting caused the test to fail.  Pull request courtesy
Matt Schuchhardt.

Fixes: #4528
Closes: #4529
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4529
Pull-request-sha: 8f52f10422114c397254db9e6f940d042708e0bd

Change-Id: Iaca6fd06ec0ede8ff1745d627708ba492a2114c8
(cherry picked from commit 203de6946ef09b9fed2875491d2ac087a6dbfec6)

6 years agoFix pooling typo
Mike Bayer [Wed, 6 Mar 2019 00:42:41 +0000 (19:42 -0500)] 
Fix pooling typo

eng -> engine

Fixes: #4526
Change-Id: If117099b8521e15887ae916a5dbfcfa0b7cd594b
(cherry picked from commit 66373c58118dc70ef59ff60c0516ef158966c47b)

6 years agoAdd missing attribute in hybrid.py docs
Daniel Demmel [Mon, 4 Mar 2019 18:10:22 +0000 (18:10 +0000)] 
Add missing attribute in hybrid.py docs

(cherry picked from commit 4f62c23cf3ce667376ceb6b0a50240c4f1c19220)

6 years agoAdd port comparison in __eq__() and __ne__() method to URL
Sanjana [Thu, 28 Feb 2019 15:16:13 +0000 (10:16 -0500)] 
Add port comparison in __eq__() and __ne__() method to URL

Comparing two objects of :class:`.URL` using ``__eq__()`` did not take port
number into consideration, two objects differing only by port number were
considered equal. Port comparison is now added in ``__eq__()`` method of
:class:`.URL`, objects differing by port number are now not equal.
Additionally, ``__ne__()`` was not implemented for :class:`.URL` which
caused unexpected result when ``!=`` was used in Python2, since there are no
implied relationships among the comparison operators in Python2.

Fixes: #4406
Closes: #4515
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4515
Pull-request-sha: 0f15b805f07e7fca1f82ca6c3aad98d50ea705b8

Change-Id: Iba7d224f1282dc3f4b884d1a746f2d46669f551e
(cherry picked from commit 9268c320bf6ea35696951875df518286dd79ad54)

6 years agoMerge "Add NCHAR to Oracle dialect" into rel_1_2
mike bayer [Wed, 20 Feb 2019 17:54:20 +0000 (17:54 +0000)] 
Merge "Add NCHAR to Oracle dialect" into rel_1_2

6 years agorevise timestamp correction scheme
Mike Bayer [Wed, 20 Feb 2019 17:52:40 +0000 (12:52 -0500)] 
revise timestamp correction scheme

For very slow CI this test still fails so establish the date
as being between the range of what the operation took

Change-Id: I9204cd1915777ebc58bd598065b9015befb93345
(cherry picked from commit a3135c494e510095c938d0e7a08c4ffc0b4bb364)

6 years agoEnsure _simple_lazy_clause bind names are fixed before cloning
Mike Bayer [Wed, 20 Feb 2019 00:46:17 +0000 (19:46 -0500)] 
Ensure _simple_lazy_clause bind names are fixed before cloning

Fixed a regression in 1.2 due to the introduction of baked queries for
relationship lazy loaders, where a race condition is created during the
generation of the "lazy clause" which occurs within a memoized attribute. If
two threads initialize the memoized attribute concurrently, the baked query
could be generated with bind parameter keys that are then replaced with new
keys by the next run, leading to a lazy load query that specifies the
related criteria as ``None``. The fix establishes that the parameter names
are fixed before the new clause and parameter objects are generated, so that
the names are the same every time.

Fixes: #4507
Change-Id: I605b824e028c87bc20ca8c2577227cdf6a591064
(cherry picked from commit d71f34cb2a28e8dfc410bc5bec68372be6d7c333)

6 years agoAdd NCHAR to Oracle dialect
Mike Bayer [Tue, 19 Feb 2019 17:13:04 +0000 (12:13 -0500)] 
Add NCHAR to Oracle dialect

Added support for reflection of the :class:`.NCHAR` datatype to the Oracle
dialect, and added :class:`.NCHAR` to the list of types exported by the
Oracle dialect.

Fixes: #4506
Change-Id: I3a120b9ad714cbd0ebd8064519f43cf57e99d920
(cherry picked from commit 5fe9da55c72effe8f8425be339375dd904277ef2)

6 years agoVersion 1.2.19 placeholder
Mike Bayer [Fri, 15 Feb 2019 18:08:58 +0000 (13:08 -0500)] 
Version 1.2.19 placeholder

6 years ago- 1.2.18 rel_1_2_18
Mike Bayer [Fri, 15 Feb 2019 17:39:47 +0000 (12:39 -0500)] 
- 1.2.18

6 years ago- formatting fix
Mike Bayer [Fri, 15 Feb 2019 17:38:49 +0000 (12:38 -0500)] 
- formatting fix

Change-Id: I93126865ffb5cc6486464402ed7ef17027441886
(cherry picked from commit c1b87bc95dbd79cb9e3fb83992295a9189ec7645)

6 years agoAdding setter to should_evaluate_none property
sanjana [Wed, 13 Feb 2019 15:17:46 +0000 (10:17 -0500)] 
Adding setter to should_evaluate_none property

Fixed issue where the :class:`.JSON` type had a read-only
:attr:`.JSON.should_evaluate_none` attribute, which would cause failures
when making use of the :meth:`.TypeEngine.evaluates_none` method in
conjunction with this type.  Pull request courtesy Sanjana S.

Fixes: #4485
Closes: #4496
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4496
Pull-request-sha: 044beb23982d411be6fe640716b1b693df0f7189

Change-Id: I1f3e1d7dec9d2ceb6ccaaa8cac158a062cf02710
(cherry picked from commit 12dad561a77506fe262d791d3135babc0be50e66)