]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fixes for doc builds
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 13 Oct 2022 13:12:04 +0000 (09:12 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 13 Oct 2022 13:12:04 +0000 (09:12 -0400)
* requirements needs typing_extensions
* update all "future=True" references to be appropriate to 2.0

Change-Id: I2eeb0ae65afdb587f21aeb0020f1d8a292f67c21

13 files changed:
doc/build/conf.py
doc/build/core/operators.rst
doc/build/faq/ormconfiguration.rst
doc/build/orm/session_events.rst
doc/build/orm/session_transaction.rst
doc/build/requirements.txt
doc/build/tutorial/dbapi_transactions.rst
doc/build/tutorial/engine.rst
examples/extending_query/filter_public.py
examples/extending_query/temporal_range.py
examples/sharding/separate_databases.py
examples/sharding/separate_schema_translates.py
examples/sharding/separate_tables.py

index 7abdd45e2e4428c6f3c942d93284bcb5f9dbae09..7d1a4d4456149a5e6ea0573ff0d4ec368421ed4a 100644 (file)
@@ -109,7 +109,7 @@ changelog_render_pullreq = {
 
 changelog_render_changeset = "https://www.sqlalchemy.org/trac/changeset/%s"
 
-exclude_patterns = ["build", "**/unreleased*/*", "**/*_include.rst"]
+exclude_patterns = ["build", "**/unreleased*/*", "**/*_include.rst", ".venv"]
 
 autodoc_class_signature = "separated"
 
index dde977c9eaa096681f454e20806b4d41ab70d9f6..9bf47ec6693f3b54ffc0c2da8d3a03efda94a58e 100644 (file)
@@ -5,7 +5,7 @@ Operator Reference
 
     >>> from sqlalchemy import column, select
     >>> from sqlalchemy import create_engine
-    >>> engine = create_engine("sqlite+pysqlite:///:memory:", echo=True, future=True)
+    >>> engine = create_engine("sqlite+pysqlite:///:memory:", echo=True)
     >>> from sqlalchemy import MetaData, Table, Column, Integer, String, Numeric
     >>> metadata_obj = MetaData()
     >>> user_table = Table(
index d3c9dba85db52ed7040694277c48a5224e984b07..3ff3c93b8004bfed63f85b630eb7f4e39862bf21 100644 (file)
@@ -347,4 +347,4 @@ loads directly to primary key values just loaded.
 
 .. seealso::
 
-    :ref:`subqueryload_ordering`
+    :ref:`subquery_eager_loading`
index b502191e575181187eb0182631e0908d1c474bfa..980e301d1379c37f2a9526a928e594a76f7f0dcb 100644 (file)
@@ -45,7 +45,7 @@ interception of a query, which includes those emitted by
 provides accessors to allow modifications to statements, parameters, and
 options::
 
-    Session = sessionmaker(engine, future=True)
+    Session = sessionmaker(engine)
 
 
     @event.listens_for(Session, "do_orm_execute")
@@ -84,7 +84,7 @@ may be used on its own, or is ideally suited to be used within the
 
     from sqlalchemy.orm import with_loader_criteria
 
-    Session = sessionmaker(engine, future=True)
+    Session = sessionmaker(engine)
 
 
     @event.listens_for(Session, "do_orm_execute")
index be45906709063d688ae21bf8afffd13aaeaa8b5c..aca558d6ff5f0aaaa9e7b7af287f857e0ae594ad 100644 (file)
@@ -221,21 +221,16 @@ without the need for refreshing it from the database.
 Session-level vs. Engine level transaction control
 --------------------------------------------------
 
-As of SQLAlchemy 1.4, the :class:`_orm.sessionmaker` and Core
-:class:`_engine.Engine` objects both support :term:`2.0 style` operation,
-by making use of the :paramref:`_orm.Session.future` flag as well as the
-:paramref:`_engine.create_engine.future` flag so that these two objects
-assume 2.0-style semantics.
-
-When using future mode, there should be equivalent semantics between
-the two packages, at the level of the :class:`_orm.sessionmaker` vs.
+The :class:`_engine.Connection` in Core and
+:class:`_session.Session` in ORM feature equivalent transactional
+semantics, both at the level of the :class:`_orm.sessionmaker` vs.
 the :class:`_engine.Engine`, as well as the :class:`_orm.Session` vs.
 the :class:`_engine.Connection`.  The following sections detail
 these scenarios based on the following scheme:
 
 .. sourcecode:: text
 
-    ORM (using future Session)                    Core (using future engine)
+    ORM                                           Core
     -----------------------------------------     -----------------------------------
     sessionmaker                                  Engine
     Session                                       Connection
@@ -297,7 +292,7 @@ that will maintain a begin/commit/rollback context for that object.
 
 Engine::
 
-    engine = create_engine("postgresql+psycopg2://user:pass@host/dbname", future=True)
+    engine = create_engine("postgresql+psycopg2://user:pass@host/dbname")
 
     with engine.begin() as conn:
         conn.execute(
@@ -312,7 +307,7 @@ Engine::
 
 Session::
 
-    Session = sessionmaker(engine, future=True)
+    Session = sessionmaker(engine)
 
     with Session.begin() as session:
         session.add_all(
@@ -336,7 +331,7 @@ specific behavior that is reversed from the 1.x series.
 
 Engine::
 
-    engine = create_engine("postgresql+psycopg2://user:pass@host/dbname", future=True)
+    engine = create_engine("postgresql+psycopg2://user:pass@host/dbname")
 
     with engine.begin() as conn:
         savepoint = conn.begin_nested()
@@ -354,7 +349,7 @@ Engine::
 
 Session::
 
-    Session = sessionmaker(engine, future=True)
+    Session = sessionmaker(engine)
 
     with Session.begin() as session:
         savepoint = session.begin_nested()
index 38511e579ddad2a1f75d15c7d7fc0d8eb577e680..eccea8b182d7e1f822aa29a83e9466c62d60baed 100644 (file)
@@ -3,3 +3,4 @@ git+https://github.com/sqlalchemyorg/sphinx-paramlinks.git#egg=sphinx-paramlinks
 git+https://github.com/sqlalchemyorg/zzzeeksphinx.git#egg=zzzeeksphinx
 sphinx-copybutton
 sphinx-autobuild
+typing-extensions
index 68fc84bcbc4dfc9314139b67b057167482b9c093..00178936b0b4e575aeff2a3715d661381db5ae97 100644 (file)
@@ -391,7 +391,7 @@ for many rows while still supporting RETURNING.
 
 .. seealso::
 
-   :term:`executemany` - in the :doc:`Glossary <glossary>`, describes the
+   :term:`executemany` - in the :doc:`Glossary </glossary>`, describes the
    DBAPI-level
    `cursor.executemany() <https://peps.python.org/pep-0249/#executemany>`_
    method that's used for most "executemany" executions.
index e42d67a022e4d45608bb20fef3aabaace28f6393..80c20e566e4f2f5129ecd55fa0bd9fcbce003bda 100644 (file)
@@ -19,14 +19,13 @@ which will describe how it should connect to the database host or backend.
 
 For this tutorial we will use an in-memory-only SQLite database. This is an
 easy way to test things without needing to have an actual pre-existing database
-set up.  The :class:`_engine.Engine` is created by using :func:`_sa.create_engine`, specifying
-the :paramref:`_sa.create_engine.future` flag set to ``True`` so that we make full use
-of :term:`2.0 style` usage:
+set up.  The :class:`_engine.Engine` is created by using the
+:func:`_sa.create_engine` function:
 
 .. sourcecode:: pycon+sql
 
     >>> from sqlalchemy import create_engine
-    >>> engine = create_engine("sqlite+pysqlite:///:memory:", echo=True, future=True)
+    >>> engine = create_engine("sqlite+pysqlite:///:memory:", echo=True)
 
 The main argument to :class:`_sa.create_engine`
 is a string URL, above passed as the string ``"sqlite+pysqlite:///:memory:"``.
index 08a0d273db27dce62a66b81965e76ebfb68a6146..a420e9da4abce2d27d74e390d6d3a33db599f486 100644 (file)
@@ -85,7 +85,7 @@ if __name__ == "__main__":
     engine = create_engine("sqlite://", echo=True)
     Base.metadata.create_all(engine)
 
-    Session = sessionmaker(bind=engine, future=True)
+    Session = sessionmaker(bind=engine)
 
     sess = Session()
 
index 3a6570ad1ecbfa69143ff09d4ba0106baae9ae0b..01d0eadf87c1b4cd064ea085d4778238d132cc5a 100644 (file)
@@ -50,7 +50,7 @@ if __name__ == "__main__":
     engine = create_engine("sqlite://", echo=True)
     Base.metadata.create_all(engine)
 
-    Session = sessionmaker(bind=engine, future=True)
+    Session = sessionmaker(bind=engine)
 
     sess = Session()
 
index 9818656c3c55f250b1e3dea5988ff15a4d4d6786..a45182f42db83399982654cb75131f38288a087b 100644 (file)
@@ -31,7 +31,6 @@ db4 = create_engine("sqlite://", echo=echo)
 # to databases within a ShardedSession and returns it.
 Session = sessionmaker(
     class_=ShardedSession,
-    future=True,
     shards={
         "north_america": db1,
         "asia": db2,
index c4f2b9e25cefaeb7cf282f599d5b4e3045ee266a..2d4c2a0464fb6ac35f6afc89ed61af4f9a6de71c 100644 (file)
@@ -45,7 +45,6 @@ db4 = engine.execution_options(schema_translate_map={None: "schema_4"})
 # to databases within a ShardedSession and returns it.
 Session = sessionmaker(
     class_=ShardedSession,
-    future=True,
     shards={
         "north_america": db1,
         "asia": db2,
index 0f6e2ffd830560ae9bf2e84ac0c022a2364f77fc..8f39471e888534a5935ffcf53b8584138caa2e05 100644 (file)
@@ -45,7 +45,6 @@ def before_cursor_execute(
 # to databases within a ShardedSession and returns it.
 Session = sessionmaker(
     class_=ShardedSession,
-    future=True,
     shards={
         "north_america": db1,
         "asia": db2,