summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-03-20 22:46:23 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-03-20 22:46:23 -0400
commita22927b80915d15375b675f57c88b194fbdc2259 (patch)
treea9c5bde00b83081e91a2375d5cb16e9235b87aae
parent2a1a79b6ce53f2e1dc4cd48bbca5c5a148b8b285 (diff)
downloadsqlalchemy-a22927b80915d15375b675f57c88b194fbdc2259.tar.gz
- reword the paragraph which talks about web framework integration for sessions:
1. fix the typo in the paragraph, fixes #2998 2. as zope-sqlalchemy only provides transaction integration and not session scoping, dial back the language here as people are probably using scoped_session with pyramid anyway 3. as I'm going to again start recommending people don't cling to flask-sqlalchemy so hard, take out the word "strongly" from the recommendation. 4. as flask is the only framework I can think of that actually has an explicit SQLAlchemy layer that handles setting up scoped_session, take out the word "most", now it's "some web frameworks" (by which it means "only flask...and flask-sqlalchemy is probably not worth using anyway")
-rw-r--r--doc/build/orm/session.rst17
1 files changed, 7 insertions, 10 deletions
diff --git a/doc/build/orm/session.rst b/doc/build/orm/session.rst
index f4583ad1e..a3870f35e 100644
--- a/doc/build/orm/session.rst
+++ b/doc/build/orm/session.rst
@@ -301,19 +301,16 @@ opt for an explicit commit pattern, only committing for those requests
where one is warranted, but still always tearing down the :class:`.Session`
unconditionally at the end.
-Most web frameworks include infrastructure to establish a single
-:class:`.Session`, associated with the request, which is correctly
-constructed and torn down corresponding
-torn down at the end of a request. Such infrastructure pieces
-include products such as `Flask-SQLAlchemy <http://packages.python.org/Flask-SQLAlchemy/>`_,
+Some web frameworks include infrastructure to assist in the task
+of aligning the lifespan of a :class:`.Session` with that of a web request.
+This includes products such as `Flask-SQLAlchemy <http://packages.python.org/Flask-SQLAlchemy/>`_,
for usage in conjunction with the Flask web framework,
and `Zope-SQLAlchemy <http://pypi.python.org/pypi/zope.sqlalchemy>`_,
-for usage in conjunction with the Pyramid and Zope frameworks.
-SQLAlchemy strongly recommends that these products be used as
-available.
+typically used with the Pyramid framework.
+SQLAlchemy recommends that these products be used as available.
-In those situations where integration libraries are not available,
-SQLAlchemy includes its own "helper" class known as
+In those situations where the integration libraries are not
+provided or are insufficient, SQLAlchemy includes its own "helper" class known as
:class:`.scoped_session`. A tutorial on the usage of this object
is at :ref:`unitofwork_contextual`. It provides both a quick way
to associate a :class:`.Session` with the current thread, as well as