Skip to content

Commit 2c5752e

Browse files
committed
- 1.7.0
1 parent 2c96569 commit 2c5752e

File tree

13 files changed

+127
-116
lines changed

13 files changed

+127
-116
lines changed

docs/build/changelog.rst

Lines changed: 125 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,131 @@ Changelog
55

66
.. changelog::
77
:version: 1.7.0
8-
:include_notes_from: unreleased
8+
:released: August 30, 2021
9+
10+
.. change::
11+
:tags: bug, operations
12+
:tickets: 879
13+
14+
Fixed regression due to :ticket:`803` where the ``.info`` and ``.comment``
15+
attributes of ``Table`` would be lost inside of the :class:`.DropTableOp`
16+
class, which when "reversed" into a :class:`.CreateTableOp` would then have
17+
lost these elements. Pull request courtesy Nicolas CANIART.
18+
19+
20+
.. change::
21+
:tags: feature, environment
22+
:tickets: 842
23+
24+
Enhance ``version_locations`` parsing to handle paths containing spaces.
25+
The new configuration option ``version_path_separator`` specifies the
26+
character to use when splitting the ``version_locations`` string. The
27+
default for new configurations is ``version_path_separator = os``,
28+
which will use ``os.pathsep`` (e.g., ``;`` on Windows).
29+
30+
.. change::
31+
:tags: installation, changed
32+
33+
Alembic 1.7 now supports Python 3.6 and above; support for prior versions
34+
including Python 2.7 has been dropped.
35+
36+
.. change::
37+
:tags: bug, sqlite, batch
38+
:tickets: 883
39+
40+
Batch "auto" mode will now select for "recreate" if the ``add_column()``
41+
operation is used on SQLite, and the column itself meets the criteria for
42+
SQLite where ADD COLUMN is not allowed, in this case a functional or
43+
parenthesized SQL expression or a ``Computed`` (i.e. generated) column.
44+
45+
.. change::
46+
:tags: changed, installation
47+
:tickets: 674
48+
49+
Make the ``python-dateutil`` library an optional dependency.
50+
This library is only required if the ``timezone`` option
51+
is used in the Alembic configuration.
52+
An extra require named ``tz`` is available with
53+
``pip install alembic[tz]`` to install it.
54+
55+
.. change::
56+
:tags: bug, commands
57+
:tickets: 856
58+
59+
Re-implemented the ``python-editor`` dependency as a small internal
60+
function to avoid the need for external dependencies.
61+
62+
.. change::
63+
:tags: usecase, batch
64+
:tickets: 884
65+
66+
Named CHECK constraints are now supported by batch mode, and will
67+
automatically be part of the recreated table assuming they are named. They
68+
also can be explicitly dropped using ``op.drop_constraint()``. For
69+
"unnamed" CHECK constraints, these are still skipped as they cannot be
70+
distinguished from the CHECK constraints that are generated by the
71+
``Boolean`` and ``Enum`` datatypes.
72+
73+
Note that this change may require adjustments to migrations that drop or
74+
rename columns which feature an associated named check constraint, such
75+
that an additional ``op.drop_constraint()`` directive should be added for
76+
that named constraint as there will no longer be an associated column
77+
for it; for the ``Boolean`` and ``Enum`` datatypes, an ``existing_type``
78+
keyword may be passed to ``BatchOperations.drop_constraint`` as well.
79+
80+
.. seealso::
81+
82+
:ref:`batch_schematype_constraints`
83+
84+
:ref:`batch_check_constraints`
85+
86+
87+
.. change::
88+
:tags: changed, installation
89+
:tickets: 885
90+
91+
The dependency on ``pkg_resources`` which is part of ``setuptools`` has
92+
been removed, so there is no longer any runtime dependency on
93+
``setuptools``. The functionality has been replaced with
94+
``importlib.metadata`` and ``importlib.resources`` which are both part of
95+
Python std.lib, or via pypy dependency ``importlib-metadata`` for Python
96+
version < 3.8 and ``importlib-resources`` for Python version < 3.9
97+
(while importlib.resources was added to Python in 3.7, it did not include
98+
the "files" API until 3.9).
99+
100+
.. change::
101+
:tags: feature, tests
102+
:tickets: 855
103+
104+
Created a "test suite" similar to the one for SQLAlchemy, allowing
105+
developers of third-party dialects to test their code against a set of
106+
Alembic tests that have been specially selected to exercise
107+
back-end database operations. At the time of release,
108+
third-party dialects that have adopted the Alembic test suite to verify
109+
compatibility include
110+
`CockroachDB <https://pypi.org/project/sqlalchemy-cockroachdb/>`_ and
111+
`SAP ASE (Sybase) <https://pypi.org/project/sqlalchemy-sybase/>`_.
112+
113+
.. change::
114+
:tags: bug, postgresql
115+
:tickets: 874
116+
117+
Fixed issue where usage of the PostgreSQL ``postgresql_include`` option
118+
within a :meth:`.Operations.create_index` would raise a KeyError, as the
119+
additional column(s) need to be added to the table object used by the
120+
construct internally. The issue is equivalent to the SQL Server issue fixed
121+
in :ticket:`513`. Pull request courtesy Steven Bronson.
122+
123+
.. change::
124+
:tags: feature, general
125+
126+
pep-484 type annotations have been added throughout the library.
127+
Additionally, stub .pyi files have been added for the "dynamically"
128+
generated Alembic modules ``alembic.op`` and ``alembic.config``, which
129+
include complete function signatures and docstrings, so that the functions
130+
in these namespaces will have both IDE support (vscode, pycharm, etc) as
131+
well as support for typing tools like Mypy. The files themselves are
132+
statically generated from their source functions within the source tree.
9133

10134
.. changelog::
11135
:version: 1.6.5

docs/build/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
# The short X.Y version.
8686
version = alembic.__version__
8787
# The full version, including alpha/beta/rc tags.
88-
release = "1.6.5"
89-
release_date = "May 27, 2021"
88+
release = "1.7.0"
89+
release_date = "August 30, 2021"
9090

9191

9292
# The language for content autogenerated by Sphinx. Refer to documentation

docs/build/unreleased/674.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/build/unreleased/842.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/build/unreleased/855.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/build/unreleased/856.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/build/unreleased/874.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/build/unreleased/879.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/build/unreleased/883.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/build/unreleased/884.rst

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/build/unreleased/885.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/build/unreleased/py3.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/build/unreleased/py3_typing.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)