From: Mike Bayer Date: Fri, 20 Sep 2019 14:29:00 +0000 (-0400) Subject: - 1.2.0 X-Git-Tag: rel_1_2_0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=871ae3d5a9f8b31f6276c9c831719fd205b47e89;p=thirdparty%2Fsqlalchemy%2Falembic.git - 1.2.0 --- diff --git a/docs/build/changelog.rst b/docs/build/changelog.rst index e82f581a..ce5a937c 100644 --- a/docs/build/changelog.rst +++ b/docs/build/changelog.rst @@ -5,7 +5,133 @@ Changelog .. changelog:: :version: 1.2.0 - :include_notes_from: unreleased + :released: September 20, 2019 + + .. change:: + :tags: feature, command + :tickets: 473 + + Added new ``--purge`` flag to the ``alembic stamp`` command, which will + unconditionally erase the version table before stamping anything. This is + useful for development where non-existent version identifiers might be left + within the table. Additionally, ``alembic.stamp`` now supports a list of + revision identifiers, which are intended to allow setting up muliple heads + at once. Overall handling of version identifiers within the + ``alembic.stamp`` command has been improved with many new tests and + use cases added. + + .. change:: + :tags: bug, autogenerate + :tickets: 550 + + Improved the Python rendering of a series of migration operations such that + a single "pass" is rendered for a :class:`.UpgradeOps` or + :class:`.DowngradeOps` based on if no lines of Python code actually + rendered under the operation, rather than whether or not sub-directives + exist. Removed extra "pass" lines that would generate from the + :class:`.ModifyTableOps` directive so that these aren't duplicated under + operation rewriting scenarios. + + + .. change:: + :tags: feature, runtime + :tickets: 123 + + Added new feature :meth:`.MigrationContext.autocommit_block`, a special + directive which will provide for a non-transactional block inside of a + migration script. The feature requres that: the database driver + (e.g. DBAPI) supports the AUTOCOMMIT isolation mode. The directive + also necessarily needs to COMMIT the existing transaction in progress + in order to enter autocommit mode. + + .. seealso:: + + :meth:`.MigrationContext.autocommit_block` + + .. change:: + :tags: change: py3k + + Python 3.4 support is dropped, as the upstream tooling (pip, mysqlclient) + etc are already dropping support for Python 3.4, which itself is no longer + maintained. + + .. change:: + :tags: usecase, autogenerate + :tickets: 518 + + Added autogenerate support for :class:`.Column` objects that have + dialect-specific ``**kwargs``, support first added in SQLAlchemy 1.3. + This includes SQLite "on conflict" as well as options used by some + third party dialects. + + .. change:: + :tags: usecase, autogenerate + :tickets: 131 + + Added rendering for SQLAlchemy ``Variant`` datatypes, which render as the + base type plus one or more ``.with_variant()`` method calls. + + + .. change:: + :tags: usecase, commands + :tickets: 534 + + Made the command interface revision lookup behavior more strict in that an + Alembic revision number is only resolved based on a partial match rules if + it has at least four characters, to prevent simple typographical issues + from inadvertently running migrations. + + .. change:: + :tags: feature, commands + :tickets: 307 + + Added "post write hooks" to revision generation. These allow custom logic + to run after a revision Python script is generated, typically for the + purpose of running code formatters such as "Black" or "autopep8", but may + be used for any arbitrary post-render hook as well, including custom Python + functions or scripts. The hooks are enabled by providing a + ``[post_write_hooks]`` section in the alembic.ini file. A single hook + is provided which runs an arbitrary Python executable on the newly + generated revision script, which can be configured to run code formatters + such as Black; full examples are included in the documentation. + + .. seealso:: + + :ref:`post_write_hooks` + + + .. change:: + :tags: feature, environment + :tickets: 463 + + Added new flag ``--package`` to ``alembic init``. For environments where + the Alembic migration files and such are within the package tree and + importable as modules, this flag can be specified which will add the + additional ``__init__.py`` files in the version location and the + environment location. + + .. change:: + :tags: bug, autogenerate + :tickets: 549 + + Fixed bug where rendering of comment text for table-level comments within + :meth:`.Operations.create_table_comment` and + :meth:`.Operations.drop_table_comment` was not properly quote-escaped + within rendered Python code for autogenerate. + + .. change:: + :tags: bug, autogenerate + :tickets: 505 + + Modified the logic of the :class:`.Rewriter` object such that it keeps a + memoization of which directives it has processed, so that it can ensure it + processes a particular directive only once, and additionally fixed + :class:`.Rewriter` so that it functions correctly for multiple-pass + autogenerate schemes, such as the one illustrated in the "multidb" + template. By tracking which directives have been processed, a + multiple-pass scheme which calls upon the :class:`.Rewriter` multiple times + for the same structure as elements are added can work without running + duplicate operations on the same elements more than once. .. changelog:: :version: 1.1.0 diff --git a/docs/build/conf.py b/docs/build/conf.py index f6cfe136..ab5c4b64 100644 --- a/docs/build/conf.py +++ b/docs/build/conf.py @@ -85,8 +85,8 @@ copyright = u"2010-2019, Mike Bayer" # noqa # The short X.Y version. version = alembic.__version__ # The full version, including alpha/beta/rc tags. -release = "1.1.0" -release_date = "August 26, 2019" +release = "1.2.0" +release_date = "September 20, 2019" # The language for content autogenerated by Sphinx. Refer to documentation diff --git a/docs/build/unreleased/123.rst b/docs/build/unreleased/123.rst deleted file mode 100644 index 1d0e8d44..00000000 --- a/docs/build/unreleased/123.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. change:: - :tags: feature, runtime - :tickets: 123 - - Added new feature :meth:`.MigrationContext.autocommit_block`, a special - directive which will provide for a non-transactional block inside of a - migration script. The feature requres that: the database driver - (e.g. DBAPI) supports the AUTOCOMMIT isolation mode. The directive - also necessarily needs to COMMIT the existing transaction in progress - in order to enter autocommit mode. - - .. seealso:: - - :meth:`.MigrationContext.autocommit_block` diff --git a/docs/build/unreleased/131.rst b/docs/build/unreleased/131.rst deleted file mode 100644 index f37edcec..00000000 --- a/docs/build/unreleased/131.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. change:: - :tags: usecase, autogenerate - :tickets: 131 - - Added rendering for SQLAlchemy ``Variant`` datatypes, which render as the - base type plus one or more ``.with_variant()`` method calls. - diff --git a/docs/build/unreleased/307.rst b/docs/build/unreleased/307.rst deleted file mode 100644 index 988e7a49..00000000 --- a/docs/build/unreleased/307.rst +++ /dev/null @@ -1,18 +0,0 @@ - .. change:: - :tags: feature, commands - :tickets: 307 - - Added "post write hooks" to revision generation. These allow custom logic - to run after a revision Python script is generated, typically for the - purpose of running code formatters such as "Black" or "autopep8", but may - be used for any arbitrary post-render hook as well, including custom Python - functions or scripts. The hooks are enabled by providing a - ``[post_write_hooks]`` section in the alembic.ini file. A single hook - is provided which runs an arbitrary Python executable on the newly - generated revision script, which can be configured to run code formatters - such as Black; full examples are included in the documentation. - - .. seealso:: - - :ref:`post_write_hooks` - diff --git a/docs/build/unreleased/463.rst b/docs/build/unreleased/463.rst deleted file mode 100644 index a428bfc9..00000000 --- a/docs/build/unreleased/463.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. change:: - :tags: feature, environment - :tickets: 463 - - Added new flag ``--package`` to ``alembic init``. For environments where - the Alembic migration files and such are within the package tree and - importable as modules, this flag can be specified which will add the - additional ``__init__.py`` files in the version location and the - environment location. diff --git a/docs/build/unreleased/473.rst b/docs/build/unreleased/473.rst deleted file mode 100644 index c5a5d536..00000000 --- a/docs/build/unreleased/473.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. change:: - :tags: feature, command - :tickets: 473 - - Added new ``--purge`` flag to the ``alembic stamp`` command, which will - unconditionally erase the version table before stamping anything. This is - useful for development where non-existent version identifiers might be left - within the table. Additionally, ``alembic.stamp`` now supports a list of - revision identifiers, which are intended to allow setting up muliple heads - at once. Overall handling of version identifiers within the - ``alembic.stamp`` command has been improved with many new tests and - use cases added. diff --git a/docs/build/unreleased/505.rst b/docs/build/unreleased/505.rst deleted file mode 100644 index 44816a28..00000000 --- a/docs/build/unreleased/505.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. change:: - :tags: bug, autogenerate - :tickets: 505 - - Modified the logic of the :class:`.Rewriter` object such that it keeps a - memoization of which directives it has processed, so that it can ensure it - processes a particular directive only once, and additionally fixed - :class:`.Rewriter` so that it functions correctly for multiple-pass - autogenerate schemes, such as the one illustrated in the "multidb" - template. By tracking which directives have been processed, a - multiple-pass scheme which calls upon the :class:`.Rewriter` multiple times - for the same structure as elements are added can work without running - duplicate operations on the same elements more than once. diff --git a/docs/build/unreleased/518.rst b/docs/build/unreleased/518.rst deleted file mode 100644 index 46094d3b..00000000 --- a/docs/build/unreleased/518.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: usecase, autogenerate - :tickets: 518 - - Added autogenerate support for :class:`.Column` objects that have - dialect-specific ``**kwargs``, support first added in SQLAlchemy 1.3. - This includes SQLite "on conflict" as well as options used by some - third party dialects. diff --git a/docs/build/unreleased/534.rst b/docs/build/unreleased/534.rst deleted file mode 100644 index 5bf93617..00000000 --- a/docs/build/unreleased/534.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: usecase, commands - :tickets: 534 - - Made the command interface revision lookup behavior more strict in that an - Alembic revision number is only resolved based on a partial match rules if - it has at least four characters, to prevent simple typographical issues - from inadvertently running migrations. diff --git a/docs/build/unreleased/549.rst b/docs/build/unreleased/549.rst deleted file mode 100644 index e9eacd58..00000000 --- a/docs/build/unreleased/549.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: bug, autogenerate - :tickets: 549 - - Fixed bug where rendering of comment text for table-level comments within - :meth:`.Operations.create_table_comment` and - :meth:`.Operations.drop_table_comment` was not properly quote-escaped - within rendered Python code for autogenerate. diff --git a/docs/build/unreleased/550.rst b/docs/build/unreleased/550.rst deleted file mode 100644 index 740f11ce..00000000 --- a/docs/build/unreleased/550.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. change:: - :tags: bug, autogenerate - :tickets: 550 - - Improved the Python rendering of a series of migration operations such that - a single "pass" is rendered for a :class:`.UpgradeOps` or - :class:`.DowngradeOps` based on if no lines of Python code actually - rendered under the operation, rather than whether or not sub-directives - exist. Removed extra "pass" lines that would generate from the - :class:`.ModifyTableOps` directive so that these aren't duplicated under - operation rewriting scenarios. - diff --git a/docs/build/unreleased/drop_py34.rst b/docs/build/unreleased/drop_py34.rst deleted file mode 100644 index 5ba5c8cc..00000000 --- a/docs/build/unreleased/drop_py34.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. change:: - :tags: change: py3k - - Python 3.4 support is dropped, as the upstream tooling (pip, mysqlclient) - etc are already dropping support for Python 3.4, which itself is no longer - maintained.