Changelog
### 8.2
```
- **NEW**: Snippets: now accepts a list of base paths which will be resolved in the order they are specified.
Compatibility is present with legacy behavior, and a single string path will still be accepted.
- **NEW**: Snippets: allow for specifying certain snippets to auto-append to every file. Useful for appending
abbreviations, reference links, etc.
- **NEW**: Snippets: a snippet base path can be a full path to a file. When a base path is a full path to a file, only
that file will be included from the specified folder. This allows for targeting a one off file outside of the normal
snippet paths(s).
- **NEW**: MagicLink: add GitHub Discussions support to MagicLink. Can now use `?<num>` to link discussions. Full
discussion links will also be shortened if shortening is enabled. (1187)
- **NEW**: MagicLink: add new `normalize_issue_symbols` option to make issues, pull request, and discussion links all
render with `` instead of ``, `!`, and `?` respectively. Input syntax is still the same. Great if you want a GitHub
style look where all issue types are just rendered with ``.
- **FIX**: MagicLink: documentation will not render links with special icons added via CSS so as not to confuse users
that may think that is part of MagicLink. While possible with CSS, MagicLink provides no CSS automatically.
- **FIX**: Tabbed & Details: Fix corner case with lists. (1225)
- **FIX**: Fix issue with unescaping logic in code blocks.
```
### 8.1.1
```
- **FIX**: Ensure content immediately before Details content or Tabbed content gets preserved.
- **FIX**: StripHTML: Fix some corner cases related to stripping comments.
```
### 8.1
```
- **NEW**: Drop support for Python 3.5.
- **NEW**: Officially support Python 3.9.
- **NEW**: Tabbed titles can now have simple Markdown in them which can be parsed and rendered (like emoji, bold, etc.).
- **FIX**: Avoid parsing script tags in PathConverter and B64 extensions.
```
### 8.0.1
```
- **FIX**: Fix issue with `pymdownx-inline` an Pygments 2.7+.
```
### 8.0
```
Please see [Release Notes](./releases/8.0.md8.0) for details on upgrading to 8.0.
- **NEW**: Added SaneHeaders extension.
- **NEW**: SuperFences \& InlineHilite: gracefully handle failing custom formatters and/or validators. Users should add their own debug code to their formatter/validator if they suspect it isn't working.
- **NEW**: SuperFences: if a custom fence validator fails, try the next custom fence until all are exhausted.
- **NEW**: SuperFences: no longer allow custom options in the form `key=` (no value). Only keys with values or keys with no value and no `=` are accepted. Keys with no value will now assume the value to be the key name.
- **NEW**: SuperFences: if `attr_list` extension is enabled, fenced code that use brace attribute list style headers (` {lang id .class attr=value}`) will attach arbitrary attributes that are included in the header to the code element.
- **NEW**: SuperFences: when Pygments is disabled, options (such as `linenums`) included in fenced code headers no longer do anything. If `attr_list` is enabled, and the brace header is used, such options will be treated as HTML attributes. JavaScript highlighter options should be defined in the brace header form with `attr_list` enabled in order to generate appropriate, compatible HTML with the chosen JavaScript highlighter.
- **NEW**: SuperFences: backwards incompatible changes where made to custom fence API. See [Release Notes](./releases/8.0.md8.0) for instructions on how to migrate to the new API. Some temporary support for most of the old format is in place, but is deprecated.
- **NEW**: SuperFences: has removed legacy code tab feature. Associated `legacy_tab_classes` option has been removed. Please use the Tabbed extension to create general purpose tabs for code blocks or other content.
- **NEW**: Highlight: add new option `language_prefix` which controls the prefix applied to language classes when Pygments is not being used.
- **NEW**: Highlight: A new option called `code_attr_on_pre` was added to the Highlight extension and controls whether language classes, and any ids, attributes, and classes that are defined in fenced code attribute list style headers, are attached to the code element or pre element. This has effect when using Pygments.
- **NEW**: Highlight: option `linenums` now defaults to `None` and accepts `None`, `True`, or `False`. `None` is disabled by default, but can be enabled per code block. `True` enables line numbers globally. `False` disables globally and cannot be enabled manually per code block.
- **NEW**: ExtraRawHTML: remove extension.
- **FIX**: Fix issues with complex emphasis combinations in BetterEm.
- **FIX**: Details: fix corner cases related to extension and lists.
- **FIX**: Tabbed: fix corner cases related to extension and lists.
- **FIX**: EscapeAll: Handle HTML entities special.
- **FIX**: SuperFences: Fix parameter unpacking bug.
```
Links
- PyPI: https://pypi.org/project/pymdown-extensions
- Changelog: https://pyup.io/changelogs/pymdown-extensions/
- Repo: https://github.com/facelessuser/pymdown-extensions
Changelog
### 7.1.6
```
* Deprecated seealso admonition qualifier
* Added Mongolian and updated Chinese translations
* Fixed 2429: Version selector not touch-friendly on Android devices
* Fixed 2703: Printed 'Initializing search' albeit ready on mobile
mkdocs-material-7.1.5+insiders.2.9.1 (2021-05-24)
* Added missing guard for linking of content tabs
mkdocs-material-7.1.5+insiders.2.9.0 (2021-05-23)
* Added support for linking of content tabs
```
### 7.1.5
```
* Fixed 2655: Details breaking page margins on print
mkdocs-material-7.1.4+insiders.2.8.0 (2021-05-12)
* Added support for boosting pages in search
mkdocs-material-7.1.4+insiders.2.7.2 (2021-05-08)
* Fixed 2638: Warnings shown when using tags plugin without directory URLs
```
### 7.1.4
```
* Added support for git-revision-date-localized plugin creation date
* Improved footnote styles on :target and :focus
mkdocs-material-7.1.3+insiders.2.7.1 (2021-05-03)
* Fixed git-revision-date-localized plugin integration (2.7.0 regression)
mkdocs-material-7.1.3+insiders.2.7.0 (2021-05-01)
* Added support for tags (with search integration)
```
### 7.1.3
```
* Fixed 2586: Empty table of contents shown (7.1.2 regression)
```
### 7.1.2
```
* Fixed 2554: List markers sometimes overlap floated elements
* Fixed 2563: Adding a class to a h1 breaks the table of contents
* Fixed 2566: Back-to-top button clickable when invisible
mkdocs-material-7.1.1+insiders-2.6.0 (2021-04-11)
* Stay on page when switching versions
```
### 7.1.1
```
* Fixed 2501: Nested definition lists compound bottom margin
* Fixed 2508: Switch extracopyright block to template variable
* Fixed 2533: Search (and other parts) not working in Safari <14
* Fixed 2538: Visual quirk when opening language selector
```
### 7.1.0
```
* Added support for color palette toggle
* Added support for back-to-top button
* Added latest release to repository info (GitHub)
* Slight facelift of repository info (lighter fonts, spacing and icons)
mkdocs-material-7.0.7+insiders-2.5.0 (2021-03-28)
* Added support for version warning
```
### 7.0.7
```
* Updated Hungarian translations
* Fixed 2466: Docker image not based on latest Python and Alpine
* Fixed 2488: Inconsistent header shadow behavior
* Fixed 2492: Inline code blocks in admonition titles missing background
mkdocs-material-7.0.6+insiders-2.4.0 (2021-03-20)
* Added support for custom admonition icons
* Fixed 2444: Code block annotations with extra comments have wrong index
mkdocs-material-7.0.6+insiders-2.3.1 (2021-03-14)
* Fixed anchor offset for permalinks when using sticky navigation tabs
```
Links
- PyPI: https://pypi.org/project/mkdocs-material
- Changelog: https://pyup.io/changelogs/mkdocs-material/
- Repo: https://squidfunk.github.io/mkdocs-material/
Changelog
### 21.5b2
```
_Black_
- A space is no longer inserted into empty docstrings (2249)
- Fix handling of .gitignore files containing non-ASCII characters on Windows (2229)
- Respect `.gitignore` files in all levels, not only `root/.gitignore` file (apply
`.gitignore` rules like `git` does) (2225)
- Restored compatibility with Click 8.0 on Python 3.6 when LANG=C used (2227)
- Add extra uvloop install + import support if in python env (2258)
- Fix --experimental-string-processing crash when matching parens are not found (2283)
- Make sure to split lines that start with a string operator (2286)
- Fix regular expression that black uses to identify f-expressions (2287)
_Blackd_
- Add a lower bound for the `aiohttp-cors` dependency. Only 0.4.0 or higher is
supported. (2231)
_Packaging_
- Release self-contained x86_64 MacOS binaries as part of the GitHub release pipeline
(2198)
- Always build binaries with the latest available Python (2260)
Documentation
- Add discussion of magic comments to FAQ page (2272)
- `--experimental-string-processing` will be enabled by default in the future (2273)
- Fix typos discovered by codespell (2228)
- Fix Vim plugin installation instructions. (2235)
- Add new Frequently Asked Questions page (2247)
- Fix encoding + symlink issues preventing proper build on Windows (2262)
```
### 21.5b1
```
_Black_
- Refactor `src/black/__init__.py` into many files (2206)
Documentation
- Replaced all remaining references to the
[`master`](https://github.com/psf/black/tree/main) branch with the
[`main`](https://github.com/psf/black/tree/main) branch. Some additional changes in
the source code were also made. (2210)
- Sigificantly reorganized the documentation to make much more sense. Check them out by
heading over to [the stable docs on RTD](https://black.readthedocs.io/en/stable/).
(2174)
```
### 21.5b0
```
_Black_
- Set `--pyi` mode if `--stdin-filename` ends in `.pyi` (2169)
- Stop detecting target version as Python 3.9+ with pre-PEP-614 decorators that are
being called but with no arguments (2182)
_Black-Primer_
- Add `--no-diff` to black-primer to suppress formatting changes (2187)
```
### 21.4b2
```
_Black_
- Fix crash if the user configuration directory is inaccessible. (2158)
- Clarify
[circumstances](https://github.com/psf/black/blob/master/docs/the_black_code_style.md#pragmatism)
in which _Black_ may change the AST (2159)
- Allow `.gitignore` rules to be overridden by specifying `exclude` in `pyproject.toml`
or on the command line. (2170)
_Packaging_
- Install `primer.json` (used by `black-primer` by default) with black. (2154)
```
### 21.4b1
```
_Black_
- Fix crash on docstrings ending with "\\ ". (2142)
- Fix crash when atypical whitespace is cleaned out of dostrings (2120)
- Reflect the `--skip-magic-trailing-comma` and `--experimental-string-processing` flags
in the name of the cache file. Without this fix, changes in these flags would not take
effect if the cache had already been populated. (2131)
- Don't remove necessary parentheses from assignment expression containing assert /
return statements. (2143)
_Packaging_
- Bump pathspec to >= 0.8.1 to solve invalid .gitignore exclusion handling
```
### 21.4b0
```
_Black_
- Fixed a rare but annoying formatting instability created by the combination of
optional trailing commas inserted by `Black` and optional parentheses looking at
pre-existing "magic" trailing commas. This fixes issue 1629 and all of its many many
duplicates. (2126)
- `Black` now processes one-line docstrings by stripping leading and trailing spaces,
and adding a padding space when needed to break up """". (1740)
- `Black` now cleans up leading non-breaking spaces in comments (2092)
- `Black` now respects `--skip-string-normalization` when normalizing multiline
docstring quotes (1637)
- `Black` no longer removes all empty lines between non-function code and decorators
when formatting typing stubs. Now `Black` enforces a single empty line. (1646)
- `Black` no longer adds an incorrect space after a parenthesized assignment expression
in if/while statements (1655)
- Added `--skip-magic-trailing-comma` / `-C` to avoid using trailing commas as a reason
to split lines (1824)
- fixed a crash when PWD=/ on POSIX (1631)
- fixed "I/O operation on closed file" when using --diff (1664)
- Prevent coloured diff output being interleaved with multiple files (1673)
- Added support for PEP 614 relaxed decorator syntax on python 3.9 (1711)
- Added parsing support for unparenthesized tuples and yield expressions in annotated
assignments (1835)
- added `--extend-exclude` argument (PR 2005)
- speed up caching by avoiding pathlib (1950)
- `--diff` correctly indicates when a file doesn't end in a newline (1662)
- Added `--stdin-filename` argument to allow stdin to respect `--force-exclude` rules
(1780)
- Lines ending with `fmt: skip` will now be not formatted (1800)
- PR 2053: Black no longer relies on typed-ast for Python 3.8 and higher
- PR 2053: Python 2 support is now optional, install with
`python3 -m pip install black[python2]` to maintain support.
- Exclude `venv` directory by default (1683)
- Fixed "Black produced code that is not equivalent to the source" when formatting
Python 2 docstrings (2037)
_Packaging_
- Self-contained native _Black_ binaries are now provided for releases via GitHub
Releases (1743)
```
### 20.8b1
```
_Packaging_
- explicitly depend on Click 7.1.2 or newer as `Black` no longer works with versions
older than 7.0
```
### 20.8b0
```
_Black_
- re-implemented support for explicit trailing commas: now it works consistently within
any bracket pair, including nested structures (1288 and duplicates)
- `Black` now reindents docstrings when reindenting code around it (1053)
- `Black` now shows colored diffs (1266)
- `Black` is now packaged using 'py3' tagged wheels (1388)
- `Black` now supports Python 3.8 code, e.g. star expressions in return statements
(1121)
- `Black` no longer normalizes capital R-string prefixes as those have a
community-accepted meaning (1244)
- `Black` now uses exit code 2 when specified configuration file doesn't exit (1361)
- `Black` now works on AWS Lambda (1141)
- added `--force-exclude` argument (1032)
- removed deprecated `--py36` option (1236)
- fixed `--diff` output when EOF is encountered (526)
- fixed ` fmt: off` handling around decorators (560)
- fixed unstable formatting with some ` type: ignore` comments (1113)
- fixed invalid removal on organizing brackets followed by indexing (1575)
- introduced `black-primer`, a CI tool that allows us to run regression tests against
existing open source users of Black (1402)
- introduced property-based fuzzing to our test suite based on Hypothesis and
Hypothersmith (1566)
- implemented experimental and disabled by default long string rewrapping (1132),
hidden under a `--experimental-string-processing` flag while it's being worked on;
this is an undocumented and unsupported feature, you lose Internet points for
depending on it (1609)
Vim plugin
- prefer virtualenv packages over global packages (1383)
```
Links
- PyPI: https://pypi.org/project/black
- Changelog: https://pyup.io/changelogs/black/
- Repo: https://github.com/psf/black
Changelog
### 0.36.2
```
- Updated vendored ``packaging`` library to v20.8
- Fixed wheel sdist missing ``LICENSE.txt``
- Don't use default ``macos/arm64`` deployment target in calculating the
platform tag for fat binaries (PR by Ronald Oussoren)
```
### 0.36.1
```
- Fixed ``AssertionError`` when ``MACOSX_DEPLOYMENT_TARGET`` was set to ``11``
(PR by Grzegorz Bokota and François-Xavier Coudert)
- Fixed regression introduced in 0.36.0 on Python 2.7 when a custom generator
name was passed as unicode (Scikit-build)
(``TypeError: 'unicode' does not have the buffer interface``)
```
### 0.36.0
```
- Added official Python 3.9 support
- Updated vendored ``packaging`` library to v20.7
- Switched to always using LF as line separator when generating ``WHEEL`` files
(on Windows, CRLF was being used instead)
- The ABI tag is taken from the sysconfig SOABI value. On PyPy the SOABI value
is ``pypy37-pp73`` which is not compliant with PEP 3149, as it should have
both the API tag and the platform tag. This change future-proofs any change
in PyPy's SOABI tag to make sure only the ABI tag is used by wheel.
- Fixed regression and test for ``bdist_wheel --plat-name``. It was ignored for
C extensions in v0.35, but the regression was not detected by tests.
```
### 0.35.1
```
- Replaced install dependency on ``packaging`` with a vendored copy of its
``tags`` module
- Fixed ``bdist_wheel`` not working on FreeBSD due to mismatching platform tag
name (it was not being converted to lowercase)
```
### 0.35.0
```
- Switched to the packaging_ library for computing wheel tags
- Fixed a resource leak in ``WheelFile.open()`` (PR by Jon Dufresne)
.. _packaging: https://pypi.org/project/packaging/
```
Links
- PyPI: https://pypi.org/project/wheel
- Changelog: https://pyup.io/changelogs/wheel/
- Repo: https://github.com/pypa/wheel
Changelog
### 1.6.5
```
:released: May 27, 2021
.. change::
:tags: bug, autogenerate
:tickets: 849
Fixed issue where dialect-specific keyword arguments within the
:class:`.DropIndex` operation directive would not render in the
autogenerated Python code. As support was improved for adding dialect
specific arguments to directives as part of :ticket:`803`, in particular
arguments such as "postgresql_concurrently" which apply to the actual
create/drop of the index, support was needed for these to render even in a
drop index operation. Pull request courtesy Jet Zhou.
.. changelog::
```
### 1.6.4
```
:released: May 24, 2021
.. change::
:tags: bug, regression, op directives
:tickets: 848
Fixed regression caused by just fixed :ticket:`844` that scaled back the
filter for ``unique=True/index=True`` too far such that these directives no
longer worked for the ``op.create_table()`` op, this has been fixed.
.. changelog::
```
### 1.6.3
```
:released: May 21, 2021
.. change::
:tags: bug, regression, autogenerate
:tickets: 844
Fixed 1.6-series regression where ``UniqueConstraint`` and to a lesser
extent ``Index`` objects would be doubled up in the generated model when
the ``unique=True`` / ``index=True`` flags were used.
.. change::
:tags: bug, autogenerate
:tickets: 839
Fixed a bug where paths defined in post-write hook options
would be wrongly escaped in non posix environment (Windows).
.. change::
:tags: bug, regression, versioning
:tickets: 843
Fixed regression where a revision file that contained its own down revision
as a dependency would cause an endless loop in the traversal logic.
.. changelog::
```
### 1.6.2
```
:released: May 6, 2021
.. change::
:tags: bug, versioning, regression
:tickets: 839
Fixed additional regression nearly the same as that of :ticket:`838` just
released in 1.6.1 but within a slightly different codepath, where "alembic
downgrade head" (or equivalent) would fail instead of iterating no
revisions.
.. changelog::
```
### 1.6.1
```
:released: May 6, 2021
.. change::
:tags: bug, versioning, regression
:tickets: 838
Fixed regression in new revisioning traversal where "alembic downgrade
base" would fail if the database itself were clean and unversioned;
additionally repairs the case where downgrade would fail if attempting
to downgrade to the current head that is already present.
.. changelog::
```
### 1.6.0
```
:released: May 3, 2021
.. change::
:tags: bug, autogenerate
:tickets: 803
Refactored the implementation of :class:`.MigrateOperation` constructs such
as :class:`.CreateIndexOp`, :class:`.CreateTableOp`, etc. so that they no
longer rely upon maintaining a persistent version of each schema object
internally; instead, the state variables of each operation object will be
used to produce the corresponding construct when the operation is invoked.
The rationale is so that environments which make use of
operation-manipulation schemes such as those those discussed in
:ref:`autogen_rewriter` are better supported, allowing end-user code to
manipulate the public attributes of these objects which will then be
expressed in the final output, an example is
``some_create_index_op.kw["postgresql_concurrently"] = True``.
Previously, these objects when generated from autogenerate would typically
hold onto the original, reflected element internally without honoring the
other state variables of each construct, preventing the public API from
working.
.. change::
:tags: bug, environment
:tickets: 829
Fixed regression caused by the SQLAlchemy 1.4/2.0 compatibility switch
where calling ``.rollback()`` or ``.commit()`` explicitly within the
``context.begin_transaction()`` context manager would cause it to fail when
the block ended, as it did not expect that the transaction was manually
closed.
.. change::
:tags: bug, autogenerate
:tickets: 827
Improved the rendering of ``op.add_column()`` operations when adding
multiple columns to an existing table, so that the order of these
statements matches the order in which the columns were declared in the
application's table metadata. Previously the added columns were being
sorted alphabetically.
.. change::
:tags: feature, autogenerate
:tickets: 819
Fix the documentation regarding the default command-line argument position of
the revision script filename within the post-write hook arguments. Implement a
``REVISION_SCRIPT_FILENAME`` token, enabling the position to be changed. Switch
from ``str.split()`` to ``shlex.split()`` for more robust command-line argument
parsing.
.. change::
:tags: feature
:tickets: 822
Implement a ``.cwd`` (current working directory) suboption for post-write hooks
(of type ``console_scripts``). This is useful for tools like pre-commit, which
rely on the working directory to locate the necessary config files. Add
pre-commit as an example to the documentation. Minor change: rename some variables
from ticket 819 to improve readability.
.. change::
:tags: bug, versioning
:tickets: 765, 464
The algorithm used for calculating downgrades/upgrades/iterating
revisions has been rewritten, to resolve ongoing issues of branches
not being handled consistently particularly within downgrade operations,
as well as for overall clarity and maintainability. This change includes
that a deprecation warning is emitted if an ambiguous command such
as "downgrade -1" when multiple heads are present is given.
In particular, the change implements a long-requested use case of allowing
downgrades of a single branch to a branchpoint.
Huge thanks to Simon Bowly for their impressive efforts in successfully
tackling this very difficult problem.
.. change::
:tags: bug, batch
:tickets: 799
Added missing ``batch_op.create_table_comment()``,
``batch_op.drop_table_comment()`` directives to batch ops.
.. changelog::
```
### 1.5.8
```
:released: March 23, 2021
.. change::
:tags: bug, environment
:tickets: 816
Fixed regression caused by SQLAlchemy 1.4 where the "alembic current"
command would fail due to changes in the ``URL`` object.
.. changelog::
```
### 1.5.7
```
:released: March 11, 2021
.. change::
:tags: bug, autogenerate
:tickets: 813
Adjusted the recently added
:paramref:`.EnvironmentContext.configure.include_name` hook to accommodate
for additional object types such as "views" that don't have a parent table,
to support third party recipes and extensions. Pull request courtesy Oliver
Rice.
.. changelog::
```
### 1.5.6
```
:released: March 5, 2021
.. change::
:tags: bug, mssql, operations
:tickets: 812
Fixed bug where the "existing_type" parameter, which the MSSQL dialect
requires in order to change the nullability of a column in the absence of
also changing the column type, would cause an ALTER COLUMN operation to
incorrectly render a second ALTER statement without the nullability if a
new type were also present, as the MSSQL-specific contract did not
anticipate all three of "nullability", "type_" and "existing_type" being
sent at the same time.
.. change::
:tags: template
:ticket: 805
Add async template to Alembic to bootstrap environments that use
async DBAPI. Updated the cookbook to include a migration guide
on how to adapt an existing enviroment for use with DBAPI drivers.
.. changelog::
```
### 1.5.5
```
:released: February 20, 2021
.. change::
:tags: bug
Adjusted the use of SQLAlchemy's ".copy()" internals to use "._copy()"
for version 1.4.0, as this method is being renamed.
.. change::
:tags: bug, environment
:tickets: 797
Added new config file option ``prepend_sys_path``, which is a series of
paths that will be prepended to sys.path; the default value in newly
generated alembic.ini files is ".". This fixes a long-standing issue
where for some reason running the alembic command line would not place the
local "." path in sys.path, meaning an application locally present in "."
and importable through normal channels, e.g. python interpreter, pytest,
etc. would not be located by Alembic, even though the ``env.py`` file is
loaded relative to the current path when ``alembic.ini`` contains a
relative path. To enable for existing installations, add the option to the
alembic.ini file as follows::
sys.path path, will be prepended to sys.path if present.
defaults to the current working directory.
prepend_sys_path = .
.. seealso::
:ref:`installation` - updated documentation reflecting that local
installation of the project is not necessary if running the Alembic cli
from the local path.
.. changelog::
```
### 1.5.4
```
:released: February 3, 2021
.. change::
:tags: bug, versioning
:tickets: 789
Fixed bug in versioning model where a downgrade across a revision with a
dependency on another branch, yet an ancestor is also dependent on that
branch, would produce an erroneous state in the alembic_version table,
making upgrades impossible without manually repairing the table.
.. changelog::
```
### 1.5.3
```
:released: January 29, 2021
.. change::
:tags: bug, autogenerate
:tickets: 786
Changed the default ordering of "CREATE" and "DROP" statements indexes and
unique constraints within the autogenerate process, so that for example in
an upgrade() operation, a particular index or constraint that is to be
replaced such as for a casing convention change will not produce any naming
conflicts. For foreign key constraint objects, this is already how
constraints are ordered, and for table objects, users would normally want
to use :meth:`.Operations.rename_table` in any case.
.. change::
:tags: bug, autogenerate, mssql
:tickets: 787
Fixed assorted autogenerate issues with SQL Server:
* ignore default reflected identity on primary_key columns
* improve server default comparison
.. change::
:tags: bug, mysql, autogenerate
:tickets: 788
Fixed issue where autogenerate rendering of ``op.alter_column()`` would
fail to include MySQL ``existing_nullable=False`` if the column were part
of a primary key constraint within the table metadata.
.. changelog::
```
### 1.5.2
```
:released: January 20, 2021
.. change::
:tags: bug, versioning, regression
:tickets: 784
Fixed regression where new "loop detection" feature introduced in
:ticket:`757` produced false positives for revision names that have
overlapping substrings between revision number and down revision and/or
dependency, if the downrev/dependency were not in sequence form.
.. change::
:tags: bug, environment
:tickets: 782
Fixed regression where Alembic would fail to create a transaction properly
if the :class:`sqlalchemy.engine.Connection` were a so-called "branched"
connection, that is, one where the ``.connect()`` method had been called to
create a "sub" connection.
.. changelog::
```
### 1.5.1
```
:released: January 19, 2021
.. change::
:tags: bug, installation, commands
:tickets: 780
Fixed installation issue where the "templates" directory was not being
installed, preventing commands like "list_templates" and "init" from
working.
.. changelog::
```
### 1.5.0
```
:released: January 18, 2021
.. change::
:tags: usecase, operations
:tickets: 730
Added support for rendering of "identity" elements on
:class:`.Column` objects, supported in SQLAlchemy via
the :class:`.Identity` element introduced in version 1.4.
Adding columns with identity is supported on PostgreSQL,
MSSQL and Oracle. Changing the identity options or removing
it is supported only on PostgreSQL and Oracle.
.. change::
:tags: changed, environment
To accommodate SQLAlchemy 1.4 and 2.0, the migration model now no longer
assumes that the SQLAlchemy Connection will autocommit an individual
operation. This essentially means that for databases that use
non-transactional DDL (pysqlite current driver behavior, MySQL), there is
still a BEGIN/COMMIT block that will surround each individual migration.
Databases that support transactional DDL should continue to have the
same flow, either per migration or per-entire run, depending on the
value of the :paramref:`.Environment.configure.transaction_per_migration`
flag.
.. change::
:tags: changed, environment
A :class:`.CommandError` is raised if a ``sqlalchemy.engine.Engine`` is
passed to the :meth:`.MigrationContext.configure` method instead of a
``sqlalchemy.engine.Connection`` object. Previously, this would be a
warning only.
.. change::
:tags: bug, operations
:tickets: 753
Modified the ``add_column()`` operation such that the ``Column`` object in
use is shallow copied to a new instance if that ``Column`` is already
attached to a ``table()`` or ``Table``. This accommodates for the change
made in SQLAlchemy issue 5618 which prohibits a ``Column`` from being
associated with multiple ``table()`` objects. This resumes support for
using a ``Column`` inside of an Alembic operation that already refers to a
parent ``table()`` or ``Table`` as well as allows operation objects just
autogenerated to work.
.. change::
:tags: feature, autogenerate
:tickets: 650
Added new hook :paramref:`.EnvironmentContext.configure.include_name`,
which complements the
:paramref:`.EnvironmentContext.configure.include_object` hook by providing
a means of preventing objects of a certain name from being autogenerated
**before** the SQLAlchemy reflection process takes place, and notably
includes explicit support for passing each schema name when
:paramref:`.EnvironmentContext.configure.include_schemas` is set to True.
This is most important especially for enviroments that make use of
:paramref:`.EnvironmentContext.configure.include_schemas` where schemas are
actually databases (e.g. MySQL) in order to prevent reflection sweeps of
the entire server.
.. seealso::
:ref:`autogenerate_include_hooks` - new documentation section
.. change::
:tags: removed, autogenerate
The long deprecated
:paramref:`.EnvironmentContext.configure.include_symbol` hook is removed.
The :paramref:`.EnvironmentContext.configure.include_object`
and :paramref:`.EnvironmentContext.configure.include_name`
hooks both achieve the goals of this hook.
.. change::
:tags: bug, autogenerate
:tickets: 721
Added rendering for the ``Table.prefixes`` element to autogenerate so that
the rendered Python code includes these directives. Pull request courtesy
Rodrigo Ce Moretto.
.. change::
:tags: bug, batch
:tickets: 761
Added missing "create comment" feature for columns that are altered in
batch migrations.
.. change::
:tags: changed
:tickets: 748
Alembic 1.5.0 now supports **Python 2.7 and Python 3.6 and above**, as well
as **SQLAlchemy 1.3.0 and above**. Support is removed for Python 3
versions prior to 3.6 and SQLAlchemy versions prior to the 1.3 series.
.. change::
:tags: bug, batch
:tickets: 773
Made an adjustment to the PostgreSQL dialect to allow it to work more
effectively in batch mode, where a datatype like Boolean or non-native Enum
that may have embedded rules to generate CHECK constraints will be more
correctly handled in that these constraints usually will not have been
generated on the PostgreSQL backend; previously it would inadvertently
assume they existed unconditionally in a special PG-only "drop constraint"
step.
.. change::
:tags: feature, versioning
:tickets: 757
The revision tree is now checked for cycles and loops between revision
files when the revision environment is loaded up. Scenarios such as a
revision pointing to itself, or a revision that can reach itself via a
loop, are handled and will raise the :class:`.CycleDetected` exception when
the environment is loaded (expressed from the Alembic commandline as a
failure message and nonzero return code). Previously, these situations were
silently ignored up front, and the behavior of revision traversal would
either be silently incorrect, or would produce errors such as
:class:`.RangeNotAncestorError`. Pull request courtesy Koichiro Den.
.. change::
:tags: usecase, commands
Add ``__main__.py`` file to alembic package to support invocation
with ``python -m alembic``.
.. change::
:tags: removed, commands
Removed deprecated ``--head_only`` option to the ``alembic current``
command
.. change::
:tags: removed, operations
Removed legacy parameter names from operations, these have been emitting
warnings since version 0.8. In the case that legacy version files have not
yet been updated, these can be modified directly in order to maintain
compatibility:
* :meth:`.Operations.drop_constraint` - "type" (use "type_") and "name"
(use "constraint_name")
* :meth:`.Operations.create_primary_key` - "cols" (use "columns") and
"name" (use "constraint_name")
* :meth:`.Operations.create_unique_constraint` - "name" (use
"constraint_name"), "source" (use "table_name") and "local_cols" (use
"columns")
* :meth:`.Operations.batch_create_unique_constraint` - "name" (use
"constraint_name")
* :meth:`.Operations.create_foreign_key` - "name" (use "constraint_name"),
"source" (use "source_table"), "referent" (use "referent_table")
* :meth:`.Operations.batch_create_foreign_key` - "name" (use
"constraint_name"), "referent" (use "referent_table")
* :meth:`.Operations.create_check_constraint` - "name" (use
"constraint_name"), "source" (use "table_name")
* :meth:`.Operations.batch_create_check_constraint` - "name" (use
"constraint_name")
* :meth:`.Operations.create_index` - "name" (use "index_name")
* :meth:`.Operations.drop_index` - "name" (use "index_name"), "tablename"
(use "table_name")
* :meth:`.Operations.batch_drop_index` - "name" (use "index_name"),
* :meth:`.Operations.create_table` - "name" (use "table_name")
* :meth:`.Operations.drop_table` - "name" (use "table_name")
* :meth:`.Operations.alter_column` - "name" (use "new_column_name")
.. changelog::
```
### 1.4.3
```
:released: September 11, 2020
.. change::
:tags: bug, sqlite, batch
:tickets: 711
Added support to drop named CHECK constraints that are specified as part of
a column, rather than table wide. Previously, only constraints associated
with the table were considered.
.. change::
:tags: bug, ops, mysql
:tickets: 736
Fixed issue where the MySQL dialect would not correctly render the server
default of a column in an alter operation, if the operation were
programmatically generated from an autogenerate pass as it would not
accommodate for the full structure of the DefaultClause construct.
.. change::
:tags: bug, sqlite, batch
:tickets: 697
Fixed issue where the CAST applied to a JSON column when copying a SQLite
table during batch mode would cause the data to be lost, as SQLite's CAST
with JSON appears to convert the data to the value "0". The CAST is now
skipped in a dialect-specific manner, including for JSON columns on SQLite.
Pull request courtesy Sebastián RamÃrez.
.. change::
:tags: bug, commands
:tickets: 694
The ``alembic current`` command no longer creates an ``alembic_version``
table in the database if one does not exist already, returning no version
as the current version. This allows checking for migrations in parallel
without introducing race conditions. Pull request courtesy Nikolay
Edigaryev.
.. change::
:tags: bug, batch
Fixed issue where columns in a foreign-key referenced table would be
replaced with null-type columns during a batch operation; while this did
not generally have any side effects, it could theoretically impact a batch
operation that also targets that table directly and also would interfere
with future changes to the ``.append_column()`` method to disallow implicit
replacement of columns.
.. change::
:tags: bug, mssql
:tickets: 716
Fixed issue where the ``mssql_drop_foreign_key=True`` flag on
``op.drop_column`` would lead to incorrect syntax error due to a typo in the
SQL emitted, same typo was present in the test as well so it was not
detected. Pull request courtesy Oleg Shigorin.
.. changelog::
```
Links
- PyPI: https://pypi.org/project/alembic
- Changelog: https://pyup.io/changelogs/alembic/
- Homepage: https://alembic.sqlalchemy.org
- Docs: https://pythonhosted.org/alembic/
Changelog
### 1.4.17
```
:released: May 29, 2021
.. change::
:tags: bug, orm, regression
:tickets: 6558
Fixed regression caused by just-released performance fix mentioned in 6550
where a query.join() to a relationship could produce an AttributeError if
the query were made against non-ORM structures only, a fairly unusual
calling pattern.
.. changelog::
```
### 1.4.16
```
:released: May 28, 2021
.. change::
:tags: bug, engine
:tickets: 6482
Fixed issue where an ` sign in the database portion of a URL would not
be interpreted correctly if the URL also had a username:password section.
.. change::
:tags: bug, ext
:tickets: 6529
Fixed a deprecation warning that was emitted when using
:func:`_automap.automap_base` without passing an existing
``Base``.
.. change::
:tags: bug, pep484
:tickets: 6461
Remove pep484 types from the code.
Current effort is around the stub package, and having typing in
two places makes thing worse, since the types in the SQLAlchemy
source were usually outdated compared to the version in the stubs.
.. change::
:tags: usecase, mssql
:tickets: 6464
Implemented support for a :class:`_sql.CTE` construct to be used directly
as the target of a :func:`_sql.delete` construct, i.e. "WITH ... AS cte
DELETE FROM cte". This appears to be a useful feature of SQL Server.
.. change::
:tags: bug, general
:tickets: 6540, 6543
Resolved various deprecation warnings which were appearing as of Python
version 3.10.0b1.
.. change::
:tags: bug, orm
:tickets: 6471
Fixed issue when using :paramref:`_orm.relationship.cascade_backrefs`
parameter set to ``False``, which per :ref:`change_5150` is set to become
the standard behavior in SQLAlchemy 2.0, where adding the item to a
collection that uniquifies, such as ``set`` or ``dict`` would fail to fire
a cascade event if the object were already associated in that collection
via the backref. This fix represents a fundamental change in the collection
mechanics by introducing a new event state which can fire off for a
collection mutation even if there is no net change on the collection; the
action is now suited using a new event hook
:meth:`_orm.AttributeEvents.append_wo_mutation`.
.. change::
:tags: bug, orm, regression
:tickets: 6550
Fixed regression involving clause adaption of labeled ORM compound
elements, such as single-table inheritance discriminator expressions with
conditionals or CASE expressions, which could cause aliased expressions
such as those used in ORM join / joinedload operations to not be adapted
correctly, such as referring to the wrong table in the ON clause in a join.
This change also improves a performance bump that was located within the
process of invoking :meth:`_sql.Select.join` given an ORM attribute
as a target.
.. change::
:tags: bug, orm, regression
:tickets: 6495
Fixed regression where the full combination of joined inheritance, global
with_polymorphic, self-referential relationship and joined loading would
fail to be able to produce a query with the scope of lazy loads and object
refresh operations that also attempted to render the joined loader.
.. change::
:tags: bug, engine
:tickets: 6329
Fixed a long-standing issue with :class:`.URL` where query parameters
following the question mark would not be parsed correctly if the URL did
not contain a database portion with a backslash.
.. change::
:tags: bug, sql, regression
:tickets: 6549
Fixed regression in dynamic loader strategy and :func:`_orm.relationship`
overall where the :paramref:`_orm.relationship.order_by` parameter were
stored as a mutable list, which could then be mutated when combined with
additional "order_by" methods used against the dynamic query object,
causing the ORDER BY criteria to continue to grow repetitively.
.. change::
:tags: bug, orm
:tickets: 6484
Enhanced the bind resolution rules for :meth:`_orm.Session.execute` so that
when a non-ORM statement such as an :func:`_sql.insert` construct
nonetheless is built against ORM objects, to the greatest degree possible
the ORM entity will be used to resolve the bind, such as for a
:class:`_orm.Session` that has a bind map set up on a common superclass
without specific mappers or tables named in the map.
.. change::
:tags: bug, regression, ext
:tickets: 6390
Fixed regression in the ``sqlalchemy.ext.instrumentation`` extension that
prevented instrumentation disposal from working completely. This fix
includes both a 1.4 regression fix as well as a fix for a related issue
that existed in 1.3 also. As part of this change, the
:class:`sqlalchemy.ext.instrumentation.InstrumentationManager` class now
has a new method ``unregister()``, which replaces the previous method
``dispose()``, which was not called as of version 1.4.
.. changelog::
```
### 1.4.15
```
:released: May 11, 2021
.. change::
:tags: bug, documentation, mysql
:tickets: 5397
Added support for the ``ssl_check_hostname=`` parameter in mysql connection
URIs and updated the mysql dialect documentation regarding secure
connections. Original pull request courtesy of Jerry Zhao.
.. change::
:tags: bug, orm, regression
:tickets: 6449
Fixed additional regression caused by "eager loaders run on unexpire"
feature :ticket:`1763` where the feature would run for a
``contains_eager()`` eagerload option in the case that the
``contains_eager()`` were chained to an additional eager loader option,
which would then produce an incorrect query as the original query-bound
join criteria were no longer present.
.. change::
:tags: feature, general
:tickets: 6241
A new approach has been applied to the warnings system in SQLAlchemy to
accurately predict the appropriate stack level for each warning
dynamically. This allows evaluating the source of SQLAlchemy-generated
warnings and deprecation warnings to be more straightforward as the warning
will indicate the source line within end-user code, rather than from an
arbitrary level within SQLAlchemy's own source code.
.. change::
:tags: bug, orm
:tickets: 6459
Fixed issue in subquery loader strategy which prevented caching from
working correctly. This would have been seen in the logs as a "generated"
message instead of "cached" for all subqueryload SQL emitted, which by
saturating the cache with new keys would degrade overall performance; it
also would produce "LRU size alert" warnings.
.. change::
:tags: bug, sql
:tickets: 6460
Adjusted the logic added as part of :ticket:`6397` in 1.4.12 so that
internal mutation of the :class:`.BindParameter` object occurs within the
clause construction phase as it did before, rather than in the compilation
phase. In the latter case, the mutation still produced side effects against
the incoming construct and additionally could potentially interfere with
other internal mutation routines.
.. changelog::
```
### 1.4.14
```
:released: May 6, 2021
.. change::
:tags: bug, regression, orm
:tickets: 6426
Fixed regression involving ``lazy='dynamic'`` loader in conjunction with a
detached object. The previous behavior was that the dynamic loader upon
calling methods like ``.all()`` returns empty lists for detached objects
without error, this has been restored; however a warning is now emitted as
this is not the correct result. Other dynamic loader scenarios correctly
raise ``DetachedInstanceError``.
.. change::
:tags: bug, regression, sql
:tickets: 6428
Fixed regression caused by the "empty in" change just made in
:ticket:`6397` 1.4.12 where the expression needs to be parenthesized for
the "not in" use case, otherwise the condition will interfere with the
other filtering criteria.
.. change::
:tags: bug, sql, regression
:tickets: 6436
The :class:`.TypeDecorator` class will now emit a warning when used in SQL
compilation with caching unless the ``.cache_ok`` flag is set to ``True``
or ``False``. A new class-level attribute :attr:`.TypeDecorator.cache_ok`
may be set which will be used as an indication that all the parameters
passed to the object are safe to be used as a cache key if set to ``True``,
``False`` means they are not.
.. change::
:tags: engine, bug, regression
:tickets: 6427
Established a deprecation path for calling upon the
:meth:`_cursor.CursorResult.keys` method for a statement that returns no
rows to provide support for legacy patterns used by the "records" package
as well as any other non-migrated applications. Previously, this would
raise :class:`.ResourceClosedException` unconditionally in the same way as
it does when attempting to fetch rows. While this is the correct behavior
going forward, the :class:`_cursor.LegacyCursorResult` object will now in
this case return an empty list for ``.keys()`` as it did in 1.3, while also
emitting a 2.0 deprecation warning. The :class:`_cursor.CursorResult`, used
when using a 2.0-style "future" engine, will continue to raise as it does
now.
.. change::
:tags: usecase, engine, orm
:tickets: 6288
Applied consistent behavior to the use case of
calling ``.commit()`` or ``.rollback()`` inside of an existing
``.begin()`` context manager, with the addition of potentially
emitting SQL within the block subsequent to the commit or rollback.
This change continues upon the change first added in
:ticket:`6155` where the use case of calling "rollback" inside of
a ``.begin()`` contextmanager block was proposed:
* calling ``.commit()`` or ``.rollback()`` will now be allowed
without error or warning within all scopes, including
that of legacy and future :class:`_engine.Engine`, ORM
:class:`_orm.Session`, asyncio :class:`.AsyncEngine`. Previously,
the :class:`_orm.Session` disallowed this.
* The remaining scope of the context manager is then closed;
when the block ends, a check is emitted to see if the transaction
was already ended, and if so the block returns without action.
* It will now raise **an error** if subsequent SQL of any kind
is emitted within the block, **after** ``.commit()`` or
``.rollback()`` is called. The block should be closed as
the state of the executable object would otherwise be undefined
in this state.
.. changelog::
```
### 1.4.13
```
:released: May 3, 2021
.. change::
:tags: bug, regression, orm
:tickets: 6410
Fixed regression in ``selectinload`` loader strategy that would cause it to
cache its internal state incorrectly when handling relationships that join
across more than one column, such as when using a composite foreign key.
The invalid caching would then cause other unrelated loader operations to
fail.
.. change::
:tags: bug, orm, regression
:tickets: 6414
Fixed regression where :meth:`_orm.Query.filter_by` would not work if the
lead entity were a SQL function or other expression derived from the
primary entity in question, rather than a simple entity or column of that
entity. Additionally, improved the behavior of
:meth:`_sql.Select.filter_by` overall to work with column expressions even
in a non-ORM context.
.. change::
:tags: bug, engine, regression
:tickets: 6408
Restored a legacy transactional behavior that was inadvertently removed
from the :class:`_engine.Connection` as it was never tested as a known use
case in previous versions, where calling upon the
:meth:`_engine.Connection.begin_nested` method, when no transaction is
present, does not create a SAVEPOINT at all and instead starts an outer
transaction, returning a :class:`.RootTransaction` object instead of a
:class:`.NestedTransaction` object. This :class:`.RootTransaction` then
will emit a real COMMIT on the database connection when committed.
Previously, the 2.0 style behavior was present in all cases that would
autobegin a transaction but not commit it, which is a behavioral change.
When using a :term:`2.0 style` connection object, the behavior is unchanged
from previous 1.4 versions; calling :meth:`_future.Connection.begin_nested`
will "autobegin" the outer transaction if not already present, and then as
instructed emit a SAVEPOINT, returning the :class:`.NestedTransaction`
object. The outer transaction is committed by calling upon
:meth:`_future.Connection.commit`, as is "commit-as-you-go" style usage.
In non-"future" mode, while the old behavior is restored, it also
emits a 2.0 deprecation warning as this is a legacy behavior.
.. change::
:tags: bug, asyncio, regression
:tickets: 6409
Fixed a regression introduced by :ticket:`6337` that would create an
``asyncio.Lock`` which could be attached to the wrong loop when
instantiating the async engine before any asyncio loop was started, leading
to an asyncio error message when attempting to use the engine under certain
circumstances.
.. change::
:tags: bug, orm, regression
:tickets: 6419
Fixed regression where using :func:`_orm.selectinload` and
:func:`_orm.subqueryload` to load a two-level-deep path would lead to an
attribute error.
.. change::
:tags: bug, orm, regression
:tickets: 6420
Fixed regression where using the :func:`_orm.noload` loader strategy in
conjunction with a "dynamic" relationship would lead to an attribute error
as the noload strategy would attempt to apply itself to the dynamic loader.
.. change::
:tags: usecase, postgresql
:tickets: 6198
Add support for server side cursors in the pg8000 dialect for PostgreSQL.
This allows use of the
:paramref:`.Connection.execution_options.stream_results` option.
.. changelog::
```
### 1.4.12
```
:released: April 29, 2021
.. change::
:tags: bug, orm, regression, caching
:tickets: 6391
Fixed critical regression where bound parameter tracking as used in the SQL
caching system could fail to track all parameters for the case where the
same SQL expression containing a parameter were used in an ORM-related
query using a feature such as class inheritance, which was then embedded in
an enclosing expression which would make use of that same expression
multiple times, such as a UNION. The ORM would individually copy the
individual SELECT statements as part of compilation with class inheritance,
which then embedded in the enclosing statement would fail to accommodate
for all parameters. The logic that tracks this condition has been adjusted
to work for multiple copies of a parameter.
.. change::
:tags: bug, sql
:tickets: 6258, 6397
Revised the "EMPTY IN" expression to no longer rely upon using a subquery,
as this was causing some compatibility and performance problems. The new
approach for selected databases takes advantage of using a NULL-returning
IN expression combined with the usual "1 != 1" or "1 = 1" expression
appended by AND or OR. The expression is now the default for all backends
other than SQLite, which still had some compatibility issues regarding
tuple "IN" for older SQLite versions.
Third party dialects can still override how the "empty set" expression
renders by implementing a new compiler method
``def visit_empty_set_op_expr(self, type_, expand_op)``, which takes
precedence over the existing
``def visit_empty_set_expr(self, element_types)`` which remains in place.
.. change::
:tags: bug, orm
:tickets: 6350
Fixed two distinct issues mostly affecting
:class:`_hybrid.hybrid_property`, which would come into play under common
mis-configuration scenarios that were silently ignored in 1.3, and now
failed in 1.4, where the "expression" implementation would return a non
:class:`_sql.ClauseElement` such as a boolean value. For both issues, 1.3's
behavior was to silently ignore the mis-configuration and ultimately
attempt to interpret the value as a SQL expression, which would lead to an
incorrect query.
* Fixed issue regarding interaction of the attribute system with
hybrid_property, where if the ``__clause_element__()`` method of the
attribute returned a non-:class:`_sql.ClauseElement` object, an internal
``AttributeError`` would lead the attribute to return the ``expression``
function on the hybrid_property itself, as the attribute error was
against the name ``.expression`` which would invoke the ``__getattr__()``
method as a fallback. This now raises explicitly. In 1.3 the
non-:class:`_sql.ClauseElement` was returned directly.
* Fixed issue in SQL argument coercions system where passing the wrong
kind of object to methods that expect column expressions would fail if
the object were altogether not a SQLAlchemy object, such as a Python
function, in cases where the object were not just coerced into a bound
value. Again 1.3 did not have a comprehensive argument coercion system
so this case would also pass silently.
.. change::
:tags: bug, orm
:tickets: 6378
Fixed issue where using a :class:`_sql.Select` as a subquery in an ORM
context would modify the :class:`_sql.Select` in place to disable
eagerloads on that object, which would then cause that same
:class:`_sql.Select` to not eagerload if it were then re-used in a
top-level execution context.
.. change::
:tags: bug, regression, sql
:tickets: 6343
Fixed regression where usage of the :func:`_sql.text` construct inside the
columns clause of a :class:`_sql.Select` construct, which is better handled
by using a :func:`_sql.literal_column` construct, would nonetheless prevent
constructs like :func:`_sql.union` from working correctly. Other use cases,
such as constructing subuqeries, continue to work the same as in prior
versions where the :func:`_sql.text` construct is silently omitted from the
collection of exported columns. Also repairs similar use within the
ORM.
.. change::
:tags: bug, regression, sql
:tickets: 6261
Fixed regression involving legacy methods such as
:meth:`_sql.Select.append_column` where internal assertions would fail.
.. change::
:tags: usecase, sqlite
:tickets: 6379
Default to using ``SingletonThreadPool`` for in-memory SQLite databases
created using URI filenames. Previously the default pool used was the
``NullPool`` that precented sharing the same database between multiple
engines.
.. change::
:tags: bug, regression, sql
:tickets: 6300
Fixed regression caused by :ticket:`5395` where tuning back the check for
sequences in :func:`_sql.select` now caused failures when doing 2.0-style
querying with a mapped class that also happens to have an ``__iter__()``
method. Tuned the check some more to accommodate this as well as some other
interesting ``__iter__()`` scenarios.
.. change::
:tags: bug, mssql, schema
:tickets: 6345
Add :meth:`_types.TypeEngine.as_generic` support for
:class:`sqlalchemy.dialects.mysql.BIT` columns, mapping
them to :class:`_sql.sqltypes.Boolean`.
.. change::
:tags: bug, orm, regression
:tickets: 6360, 6359
Fixed issue where the new :ref:`autobegin <session_autobegin>` behavior
failed to "autobegin" in the case where an existing persistent object has
an attribute change, which would then impact the behavior of
:meth:`_orm.Session.rollback` in that no snapshot was created to be rolled
back. The "attribute modify" mechanics have been updated to ensure
"autobegin", which does not perform any database work, does occur when
persistent attributes change in the same manner as when
:meth:`_orm.Session.add` is called. This is a regression as in 1.3, the
rollback() method always had a transaction to
Update pymdown-extensions from 7.1 to 8.2.
Changelog
### 8.2 ``` - **NEW**: Snippets: now accepts a list of base paths which will be resolved in the order they are specified. Compatibility is present with legacy behavior, and a single string path will still be accepted. - **NEW**: Snippets: allow for specifying certain snippets to auto-append to every file. Useful for appending abbreviations, reference links, etc. - **NEW**: Snippets: a snippet base path can be a full path to a file. When a base path is a full path to a file, only that file will be included from the specified folder. This allows for targeting a one off file outside of the normal snippet paths(s). - **NEW**: MagicLink: add GitHub Discussions support to MagicLink. Can now use `?<num>` to link discussions. Full discussion links will also be shortened if shortening is enabled. (1187) - **NEW**: MagicLink: add new `normalize_issue_symbols` option to make issues, pull request, and discussion links all render with `` instead of ``, `!`, and `?` respectively. Input syntax is still the same. Great if you want a GitHub style look where all issue types are just rendered with ``. - **FIX**: MagicLink: documentation will not render links with special icons added via CSS so as not to confuse users that may think that is part of MagicLink. While possible with CSS, MagicLink provides no CSS automatically. - **FIX**: Tabbed & Details: Fix corner case with lists. (1225) - **FIX**: Fix issue with unescaping logic in code blocks. ``` ### 8.1.1 ``` - **FIX**: Ensure content immediately before Details content or Tabbed content gets preserved. - **FIX**: StripHTML: Fix some corner cases related to stripping comments. ``` ### 8.1 ``` - **NEW**: Drop support for Python 3.5. - **NEW**: Officially support Python 3.9. - **NEW**: Tabbed titles can now have simple Markdown in them which can be parsed and rendered (like emoji, bold, etc.). - **FIX**: Avoid parsing script tags in PathConverter and B64 extensions. ``` ### 8.0.1 ``` - **FIX**: Fix issue with `pymdownx-inline` an Pygments 2.7+. ``` ### 8.0 ``` Please see [Release Notes](./releases/8.0.md8.0) for details on upgrading to 8.0. - **NEW**: Added SaneHeaders extension. - **NEW**: SuperFences \& InlineHilite: gracefully handle failing custom formatters and/or validators. Users should add their own debug code to their formatter/validator if they suspect it isn't working. - **NEW**: SuperFences: if a custom fence validator fails, try the next custom fence until all are exhausted. - **NEW**: SuperFences: no longer allow custom options in the form `key=` (no value). Only keys with values or keys with no value and no `=` are accepted. Keys with no value will now assume the value to be the key name. - **NEW**: SuperFences: if `attr_list` extension is enabled, fenced code that use brace attribute list style headers (` {lang id .class attr=value}`) will attach arbitrary attributes that are included in the header to the code element. - **NEW**: SuperFences: when Pygments is disabled, options (such as `linenums`) included in fenced code headers no longer do anything. If `attr_list` is enabled, and the brace header is used, such options will be treated as HTML attributes. JavaScript highlighter options should be defined in the brace header form with `attr_list` enabled in order to generate appropriate, compatible HTML with the chosen JavaScript highlighter. - **NEW**: SuperFences: backwards incompatible changes where made to custom fence API. See [Release Notes](./releases/8.0.md8.0) for instructions on how to migrate to the new API. Some temporary support for most of the old format is in place, but is deprecated. - **NEW**: SuperFences: has removed legacy code tab feature. Associated `legacy_tab_classes` option has been removed. Please use the Tabbed extension to create general purpose tabs for code blocks or other content. - **NEW**: Highlight: add new option `language_prefix` which controls the prefix applied to language classes when Pygments is not being used. - **NEW**: Highlight: A new option called `code_attr_on_pre` was added to the Highlight extension and controls whether language classes, and any ids, attributes, and classes that are defined in fenced code attribute list style headers, are attached to the code element or pre element. This has effect when using Pygments. - **NEW**: Highlight: option `linenums` now defaults to `None` and accepts `None`, `True`, or `False`. `None` is disabled by default, but can be enabled per code block. `True` enables line numbers globally. `False` disables globally and cannot be enabled manually per code block. - **NEW**: ExtraRawHTML: remove extension. - **FIX**: Fix issues with complex emphasis combinations in BetterEm. - **FIX**: Details: fix corner cases related to extension and lists. - **FIX**: Tabbed: fix corner cases related to extension and lists. - **FIX**: EscapeAll: Handle HTML entities special. - **FIX**: SuperFences: Fix parameter unpacking bug. ```Links
- PyPI: https://pypi.org/project/pymdown-extensions - Changelog: https://pyup.io/changelogs/pymdown-extensions/ - Repo: https://github.com/facelessuser/pymdown-extensionsUpdate mkdocs-material from 7.0.6 to 7.1.6.
Changelog
### 7.1.6 ``` * Deprecated seealso admonition qualifier * Added Mongolian and updated Chinese translations * Fixed 2429: Version selector not touch-friendly on Android devices * Fixed 2703: Printed 'Initializing search' albeit ready on mobile mkdocs-material-7.1.5+insiders.2.9.1 (2021-05-24) * Added missing guard for linking of content tabs mkdocs-material-7.1.5+insiders.2.9.0 (2021-05-23) * Added support for linking of content tabs ``` ### 7.1.5 ``` * Fixed 2655: Details breaking page margins on print mkdocs-material-7.1.4+insiders.2.8.0 (2021-05-12) * Added support for boosting pages in search mkdocs-material-7.1.4+insiders.2.7.2 (2021-05-08) * Fixed 2638: Warnings shown when using tags plugin without directory URLs ``` ### 7.1.4 ``` * Added support for git-revision-date-localized plugin creation date * Improved footnote styles on :target and :focus mkdocs-material-7.1.3+insiders.2.7.1 (2021-05-03) * Fixed git-revision-date-localized plugin integration (2.7.0 regression) mkdocs-material-7.1.3+insiders.2.7.0 (2021-05-01) * Added support for tags (with search integration) ``` ### 7.1.3 ``` * Fixed 2586: Empty table of contents shown (7.1.2 regression) ``` ### 7.1.2 ``` * Fixed 2554: List markers sometimes overlap floated elements * Fixed 2563: Adding a class to a h1 breaks the table of contents * Fixed 2566: Back-to-top button clickable when invisible mkdocs-material-7.1.1+insiders-2.6.0 (2021-04-11) * Stay on page when switching versions ``` ### 7.1.1 ``` * Fixed 2501: Nested definition lists compound bottom margin * Fixed 2508: Switch extracopyright block to template variable * Fixed 2533: Search (and other parts) not working in Safari <14 * Fixed 2538: Visual quirk when opening language selector ``` ### 7.1.0 ``` * Added support for color palette toggle * Added support for back-to-top button * Added latest release to repository info (GitHub) * Slight facelift of repository info (lighter fonts, spacing and icons) mkdocs-material-7.0.7+insiders-2.5.0 (2021-03-28) * Added support for version warning ``` ### 7.0.7 ``` * Updated Hungarian translations * Fixed 2466: Docker image not based on latest Python and Alpine * Fixed 2488: Inconsistent header shadow behavior * Fixed 2492: Inline code blocks in admonition titles missing background mkdocs-material-7.0.6+insiders-2.4.0 (2021-03-20) * Added support for custom admonition icons * Fixed 2444: Code block annotations with extra comments have wrong index mkdocs-material-7.0.6+insiders-2.3.1 (2021-03-14) * Fixed anchor offset for permalinks when using sticky navigation tabs ```Links
- PyPI: https://pypi.org/project/mkdocs-material - Changelog: https://pyup.io/changelogs/mkdocs-material/ - Repo: https://squidfunk.github.io/mkdocs-material/Update mkdocstrings from 0.12.0 to 0.15.1.
The bot wasn't able to find a changelog for this release. Got an idea?
Links
- PyPI: https://pypi.org/project/mkdocstrings - Repo: https://github.com/mkdocstrings/mkdocstringsUpdate black from 19.10b0 to 21.5b2.
Changelog
### 21.5b2 ``` _Black_ - A space is no longer inserted into empty docstrings (2249) - Fix handling of .gitignore files containing non-ASCII characters on Windows (2229) - Respect `.gitignore` files in all levels, not only `root/.gitignore` file (apply `.gitignore` rules like `git` does) (2225) - Restored compatibility with Click 8.0 on Python 3.6 when LANG=C used (2227) - Add extra uvloop install + import support if in python env (2258) - Fix --experimental-string-processing crash when matching parens are not found (2283) - Make sure to split lines that start with a string operator (2286) - Fix regular expression that black uses to identify f-expressions (2287) _Blackd_ - Add a lower bound for the `aiohttp-cors` dependency. Only 0.4.0 or higher is supported. (2231) _Packaging_ - Release self-contained x86_64 MacOS binaries as part of the GitHub release pipeline (2198) - Always build binaries with the latest available Python (2260) Documentation - Add discussion of magic comments to FAQ page (2272) - `--experimental-string-processing` will be enabled by default in the future (2273) - Fix typos discovered by codespell (2228) - Fix Vim plugin installation instructions. (2235) - Add new Frequently Asked Questions page (2247) - Fix encoding + symlink issues preventing proper build on Windows (2262) ``` ### 21.5b1 ``` _Black_ - Refactor `src/black/__init__.py` into many files (2206) Documentation - Replaced all remaining references to the [`master`](https://github.com/psf/black/tree/main) branch with the [`main`](https://github.com/psf/black/tree/main) branch. Some additional changes in the source code were also made. (2210) - Sigificantly reorganized the documentation to make much more sense. Check them out by heading over to [the stable docs on RTD](https://black.readthedocs.io/en/stable/). (2174) ``` ### 21.5b0 ``` _Black_ - Set `--pyi` mode if `--stdin-filename` ends in `.pyi` (2169) - Stop detecting target version as Python 3.9+ with pre-PEP-614 decorators that are being called but with no arguments (2182) _Black-Primer_ - Add `--no-diff` to black-primer to suppress formatting changes (2187) ``` ### 21.4b2 ``` _Black_ - Fix crash if the user configuration directory is inaccessible. (2158) - Clarify [circumstances](https://github.com/psf/black/blob/master/docs/the_black_code_style.md#pragmatism) in which _Black_ may change the AST (2159) - Allow `.gitignore` rules to be overridden by specifying `exclude` in `pyproject.toml` or on the command line. (2170) _Packaging_ - Install `primer.json` (used by `black-primer` by default) with black. (2154) ``` ### 21.4b1 ``` _Black_ - Fix crash on docstrings ending with "\\ ". (2142) - Fix crash when atypical whitespace is cleaned out of dostrings (2120) - Reflect the `--skip-magic-trailing-comma` and `--experimental-string-processing` flags in the name of the cache file. Without this fix, changes in these flags would not take effect if the cache had already been populated. (2131) - Don't remove necessary parentheses from assignment expression containing assert / return statements. (2143) _Packaging_ - Bump pathspec to >= 0.8.1 to solve invalid .gitignore exclusion handling ``` ### 21.4b0 ``` _Black_ - Fixed a rare but annoying formatting instability created by the combination of optional trailing commas inserted by `Black` and optional parentheses looking at pre-existing "magic" trailing commas. This fixes issue 1629 and all of its many many duplicates. (2126) - `Black` now processes one-line docstrings by stripping leading and trailing spaces, and adding a padding space when needed to break up """". (1740) - `Black` now cleans up leading non-breaking spaces in comments (2092) - `Black` now respects `--skip-string-normalization` when normalizing multiline docstring quotes (1637) - `Black` no longer removes all empty lines between non-function code and decorators when formatting typing stubs. Now `Black` enforces a single empty line. (1646) - `Black` no longer adds an incorrect space after a parenthesized assignment expression in if/while statements (1655) - Added `--skip-magic-trailing-comma` / `-C` to avoid using trailing commas as a reason to split lines (1824) - fixed a crash when PWD=/ on POSIX (1631) - fixed "I/O operation on closed file" when using --diff (1664) - Prevent coloured diff output being interleaved with multiple files (1673) - Added support for PEP 614 relaxed decorator syntax on python 3.9 (1711) - Added parsing support for unparenthesized tuples and yield expressions in annotated assignments (1835) - added `--extend-exclude` argument (PR 2005) - speed up caching by avoiding pathlib (1950) - `--diff` correctly indicates when a file doesn't end in a newline (1662) - Added `--stdin-filename` argument to allow stdin to respect `--force-exclude` rules (1780) - Lines ending with `fmt: skip` will now be not formatted (1800) - PR 2053: Black no longer relies on typed-ast for Python 3.8 and higher - PR 2053: Python 2 support is now optional, install with `python3 -m pip install black[python2]` to maintain support. - Exclude `venv` directory by default (1683) - Fixed "Black produced code that is not equivalent to the source" when formatting Python 2 docstrings (2037) _Packaging_ - Self-contained native _Black_ binaries are now provided for releases via GitHub Releases (1743) ``` ### 20.8b1 ``` _Packaging_ - explicitly depend on Click 7.1.2 or newer as `Black` no longer works with versions older than 7.0 ``` ### 20.8b0 ``` _Black_ - re-implemented support for explicit trailing commas: now it works consistently within any bracket pair, including nested structures (1288 and duplicates) - `Black` now reindents docstrings when reindenting code around it (1053) - `Black` now shows colored diffs (1266) - `Black` is now packaged using 'py3' tagged wheels (1388) - `Black` now supports Python 3.8 code, e.g. star expressions in return statements (1121) - `Black` no longer normalizes capital R-string prefixes as those have a community-accepted meaning (1244) - `Black` now uses exit code 2 when specified configuration file doesn't exit (1361) - `Black` now works on AWS Lambda (1141) - added `--force-exclude` argument (1032) - removed deprecated `--py36` option (1236) - fixed `--diff` output when EOF is encountered (526) - fixed ` fmt: off` handling around decorators (560) - fixed unstable formatting with some ` type: ignore` comments (1113) - fixed invalid removal on organizing brackets followed by indexing (1575) - introduced `black-primer`, a CI tool that allows us to run regression tests against existing open source users of Black (1402) - introduced property-based fuzzing to our test suite based on Hypothesis and Hypothersmith (1566) - implemented experimental and disabled by default long string rewrapping (1132), hidden under a `--experimental-string-processing` flag while it's being worked on; this is an undocumented and unsupported feature, you lose Internet points for depending on it (1609) Vim plugin - prefer virtualenv packages over global packages (1383) ```Links
- PyPI: https://pypi.org/project/black - Changelog: https://pyup.io/changelogs/black/ - Repo: https://github.com/psf/blackUpdate wheel from 0.34.2 to 0.36.2.
Changelog
### 0.36.2 ``` - Updated vendored ``packaging`` library to v20.8 - Fixed wheel sdist missing ``LICENSE.txt`` - Don't use default ``macos/arm64`` deployment target in calculating the platform tag for fat binaries (PR by Ronald Oussoren) ``` ### 0.36.1 ``` - Fixed ``AssertionError`` when ``MACOSX_DEPLOYMENT_TARGET`` was set to ``11`` (PR by Grzegorz Bokota and François-Xavier Coudert) - Fixed regression introduced in 0.36.0 on Python 2.7 when a custom generator name was passed as unicode (Scikit-build) (``TypeError: 'unicode' does not have the buffer interface``) ``` ### 0.36.0 ``` - Added official Python 3.9 support - Updated vendored ``packaging`` library to v20.7 - Switched to always using LF as line separator when generating ``WHEEL`` files (on Windows, CRLF was being used instead) - The ABI tag is taken from the sysconfig SOABI value. On PyPy the SOABI value is ``pypy37-pp73`` which is not compliant with PEP 3149, as it should have both the API tag and the platform tag. This change future-proofs any change in PyPy's SOABI tag to make sure only the ABI tag is used by wheel. - Fixed regression and test for ``bdist_wheel --plat-name``. It was ignored for C extensions in v0.35, but the regression was not detected by tests. ``` ### 0.35.1 ``` - Replaced install dependency on ``packaging`` with a vendored copy of its ``tags`` module - Fixed ``bdist_wheel`` not working on FreeBSD due to mismatching platform tag name (it was not being converted to lowercase) ``` ### 0.35.0 ``` - Switched to the packaging_ library for computing wheel tags - Fixed a resource leak in ``WheelFile.open()`` (PR by Jon Dufresne) .. _packaging: https://pypi.org/project/packaging/ ```Links
- PyPI: https://pypi.org/project/wheel - Changelog: https://pyup.io/changelogs/wheel/ - Repo: https://github.com/pypa/wheelUpdate alembic from 1.4.2 to 1.6.5.
Changelog
### 1.6.5 ``` :released: May 27, 2021 .. change:: :tags: bug, autogenerate :tickets: 849 Fixed issue where dialect-specific keyword arguments within the :class:`.DropIndex` operation directive would not render in the autogenerated Python code. As support was improved for adding dialect specific arguments to directives as part of :ticket:`803`, in particular arguments such as "postgresql_concurrently" which apply to the actual create/drop of the index, support was needed for these to render even in a drop index operation. Pull request courtesy Jet Zhou. .. changelog:: ``` ### 1.6.4 ``` :released: May 24, 2021 .. change:: :tags: bug, regression, op directives :tickets: 848 Fixed regression caused by just fixed :ticket:`844` that scaled back the filter for ``unique=True/index=True`` too far such that these directives no longer worked for the ``op.create_table()`` op, this has been fixed. .. changelog:: ``` ### 1.6.3 ``` :released: May 21, 2021 .. change:: :tags: bug, regression, autogenerate :tickets: 844 Fixed 1.6-series regression where ``UniqueConstraint`` and to a lesser extent ``Index`` objects would be doubled up in the generated model when the ``unique=True`` / ``index=True`` flags were used. .. change:: :tags: bug, autogenerate :tickets: 839 Fixed a bug where paths defined in post-write hook options would be wrongly escaped in non posix environment (Windows). .. change:: :tags: bug, regression, versioning :tickets: 843 Fixed regression where a revision file that contained its own down revision as a dependency would cause an endless loop in the traversal logic. .. changelog:: ``` ### 1.6.2 ``` :released: May 6, 2021 .. change:: :tags: bug, versioning, regression :tickets: 839 Fixed additional regression nearly the same as that of :ticket:`838` just released in 1.6.1 but within a slightly different codepath, where "alembic downgrade head" (or equivalent) would fail instead of iterating no revisions. .. changelog:: ``` ### 1.6.1 ``` :released: May 6, 2021 .. change:: :tags: bug, versioning, regression :tickets: 838 Fixed regression in new revisioning traversal where "alembic downgrade base" would fail if the database itself were clean and unversioned; additionally repairs the case where downgrade would fail if attempting to downgrade to the current head that is already present. .. changelog:: ``` ### 1.6.0 ``` :released: May 3, 2021 .. change:: :tags: bug, autogenerate :tickets: 803 Refactored the implementation of :class:`.MigrateOperation` constructs such as :class:`.CreateIndexOp`, :class:`.CreateTableOp`, etc. so that they no longer rely upon maintaining a persistent version of each schema object internally; instead, the state variables of each operation object will be used to produce the corresponding construct when the operation is invoked. The rationale is so that environments which make use of operation-manipulation schemes such as those those discussed in :ref:`autogen_rewriter` are better supported, allowing end-user code to manipulate the public attributes of these objects which will then be expressed in the final output, an example is ``some_create_index_op.kw["postgresql_concurrently"] = True``. Previously, these objects when generated from autogenerate would typically hold onto the original, reflected element internally without honoring the other state variables of each construct, preventing the public API from working. .. change:: :tags: bug, environment :tickets: 829 Fixed regression caused by the SQLAlchemy 1.4/2.0 compatibility switch where calling ``.rollback()`` or ``.commit()`` explicitly within the ``context.begin_transaction()`` context manager would cause it to fail when the block ended, as it did not expect that the transaction was manually closed. .. change:: :tags: bug, autogenerate :tickets: 827 Improved the rendering of ``op.add_column()`` operations when adding multiple columns to an existing table, so that the order of these statements matches the order in which the columns were declared in the application's table metadata. Previously the added columns were being sorted alphabetically. .. change:: :tags: feature, autogenerate :tickets: 819 Fix the documentation regarding the default command-line argument position of the revision script filename within the post-write hook arguments. Implement a ``REVISION_SCRIPT_FILENAME`` token, enabling the position to be changed. Switch from ``str.split()`` to ``shlex.split()`` for more robust command-line argument parsing. .. change:: :tags: feature :tickets: 822 Implement a ``.cwd`` (current working directory) suboption for post-write hooks (of type ``console_scripts``). This is useful for tools like pre-commit, which rely on the working directory to locate the necessary config files. Add pre-commit as an example to the documentation. Minor change: rename some variables from ticket 819 to improve readability. .. change:: :tags: bug, versioning :tickets: 765, 464 The algorithm used for calculating downgrades/upgrades/iterating revisions has been rewritten, to resolve ongoing issues of branches not being handled consistently particularly within downgrade operations, as well as for overall clarity and maintainability. This change includes that a deprecation warning is emitted if an ambiguous command such as "downgrade -1" when multiple heads are present is given. In particular, the change implements a long-requested use case of allowing downgrades of a single branch to a branchpoint. Huge thanks to Simon Bowly for their impressive efforts in successfully tackling this very difficult problem. .. change:: :tags: bug, batch :tickets: 799 Added missing ``batch_op.create_table_comment()``, ``batch_op.drop_table_comment()`` directives to batch ops. .. changelog:: ``` ### 1.5.8 ``` :released: March 23, 2021 .. change:: :tags: bug, environment :tickets: 816 Fixed regression caused by SQLAlchemy 1.4 where the "alembic current" command would fail due to changes in the ``URL`` object. .. changelog:: ``` ### 1.5.7 ``` :released: March 11, 2021 .. change:: :tags: bug, autogenerate :tickets: 813 Adjusted the recently added :paramref:`.EnvironmentContext.configure.include_name` hook to accommodate for additional object types such as "views" that don't have a parent table, to support third party recipes and extensions. Pull request courtesy Oliver Rice. .. changelog:: ``` ### 1.5.6 ``` :released: March 5, 2021 .. change:: :tags: bug, mssql, operations :tickets: 812 Fixed bug where the "existing_type" parameter, which the MSSQL dialect requires in order to change the nullability of a column in the absence of also changing the column type, would cause an ALTER COLUMN operation to incorrectly render a second ALTER statement without the nullability if a new type were also present, as the MSSQL-specific contract did not anticipate all three of "nullability", "type_" and "existing_type" being sent at the same time. .. change:: :tags: template :ticket: 805 Add async template to Alembic to bootstrap environments that use async DBAPI. Updated the cookbook to include a migration guide on how to adapt an existing enviroment for use with DBAPI drivers. .. changelog:: ``` ### 1.5.5 ``` :released: February 20, 2021 .. change:: :tags: bug Adjusted the use of SQLAlchemy's ".copy()" internals to use "._copy()" for version 1.4.0, as this method is being renamed. .. change:: :tags: bug, environment :tickets: 797 Added new config file option ``prepend_sys_path``, which is a series of paths that will be prepended to sys.path; the default value in newly generated alembic.ini files is ".". This fixes a long-standing issue where for some reason running the alembic command line would not place the local "." path in sys.path, meaning an application locally present in "." and importable through normal channels, e.g. python interpreter, pytest, etc. would not be located by Alembic, even though the ``env.py`` file is loaded relative to the current path when ``alembic.ini`` contains a relative path. To enable for existing installations, add the option to the alembic.ini file as follows:: sys.path path, will be prepended to sys.path if present. defaults to the current working directory. prepend_sys_path = . .. seealso:: :ref:`installation` - updated documentation reflecting that local installation of the project is not necessary if running the Alembic cli from the local path. .. changelog:: ``` ### 1.5.4 ``` :released: February 3, 2021 .. change:: :tags: bug, versioning :tickets: 789 Fixed bug in versioning model where a downgrade across a revision with a dependency on another branch, yet an ancestor is also dependent on that branch, would produce an erroneous state in the alembic_version table, making upgrades impossible without manually repairing the table. .. changelog:: ``` ### 1.5.3 ``` :released: January 29, 2021 .. change:: :tags: bug, autogenerate :tickets: 786 Changed the default ordering of "CREATE" and "DROP" statements indexes and unique constraints within the autogenerate process, so that for example in an upgrade() operation, a particular index or constraint that is to be replaced such as for a casing convention change will not produce any naming conflicts. For foreign key constraint objects, this is already how constraints are ordered, and for table objects, users would normally want to use :meth:`.Operations.rename_table` in any case. .. change:: :tags: bug, autogenerate, mssql :tickets: 787 Fixed assorted autogenerate issues with SQL Server: * ignore default reflected identity on primary_key columns * improve server default comparison .. change:: :tags: bug, mysql, autogenerate :tickets: 788 Fixed issue where autogenerate rendering of ``op.alter_column()`` would fail to include MySQL ``existing_nullable=False`` if the column were part of a primary key constraint within the table metadata. .. changelog:: ``` ### 1.5.2 ``` :released: January 20, 2021 .. change:: :tags: bug, versioning, regression :tickets: 784 Fixed regression where new "loop detection" feature introduced in :ticket:`757` produced false positives for revision names that have overlapping substrings between revision number and down revision and/or dependency, if the downrev/dependency were not in sequence form. .. change:: :tags: bug, environment :tickets: 782 Fixed regression where Alembic would fail to create a transaction properly if the :class:`sqlalchemy.engine.Connection` were a so-called "branched" connection, that is, one where the ``.connect()`` method had been called to create a "sub" connection. .. changelog:: ``` ### 1.5.1 ``` :released: January 19, 2021 .. change:: :tags: bug, installation, commands :tickets: 780 Fixed installation issue where the "templates" directory was not being installed, preventing commands like "list_templates" and "init" from working. .. changelog:: ``` ### 1.5.0 ``` :released: January 18, 2021 .. change:: :tags: usecase, operations :tickets: 730 Added support for rendering of "identity" elements on :class:`.Column` objects, supported in SQLAlchemy via the :class:`.Identity` element introduced in version 1.4. Adding columns with identity is supported on PostgreSQL, MSSQL and Oracle. Changing the identity options or removing it is supported only on PostgreSQL and Oracle. .. change:: :tags: changed, environment To accommodate SQLAlchemy 1.4 and 2.0, the migration model now no longer assumes that the SQLAlchemy Connection will autocommit an individual operation. This essentially means that for databases that use non-transactional DDL (pysqlite current driver behavior, MySQL), there is still a BEGIN/COMMIT block that will surround each individual migration. Databases that support transactional DDL should continue to have the same flow, either per migration or per-entire run, depending on the value of the :paramref:`.Environment.configure.transaction_per_migration` flag. .. change:: :tags: changed, environment A :class:`.CommandError` is raised if a ``sqlalchemy.engine.Engine`` is passed to the :meth:`.MigrationContext.configure` method instead of a ``sqlalchemy.engine.Connection`` object. Previously, this would be a warning only. .. change:: :tags: bug, operations :tickets: 753 Modified the ``add_column()`` operation such that the ``Column`` object in use is shallow copied to a new instance if that ``Column`` is already attached to a ``table()`` or ``Table``. This accommodates for the change made in SQLAlchemy issue 5618 which prohibits a ``Column`` from being associated with multiple ``table()`` objects. This resumes support for using a ``Column`` inside of an Alembic operation that already refers to a parent ``table()`` or ``Table`` as well as allows operation objects just autogenerated to work. .. change:: :tags: feature, autogenerate :tickets: 650 Added new hook :paramref:`.EnvironmentContext.configure.include_name`, which complements the :paramref:`.EnvironmentContext.configure.include_object` hook by providing a means of preventing objects of a certain name from being autogenerated **before** the SQLAlchemy reflection process takes place, and notably includes explicit support for passing each schema name when :paramref:`.EnvironmentContext.configure.include_schemas` is set to True. This is most important especially for enviroments that make use of :paramref:`.EnvironmentContext.configure.include_schemas` where schemas are actually databases (e.g. MySQL) in order to prevent reflection sweeps of the entire server. .. seealso:: :ref:`autogenerate_include_hooks` - new documentation section .. change:: :tags: removed, autogenerate The long deprecated :paramref:`.EnvironmentContext.configure.include_symbol` hook is removed. The :paramref:`.EnvironmentContext.configure.include_object` and :paramref:`.EnvironmentContext.configure.include_name` hooks both achieve the goals of this hook. .. change:: :tags: bug, autogenerate :tickets: 721 Added rendering for the ``Table.prefixes`` element to autogenerate so that the rendered Python code includes these directives. Pull request courtesy Rodrigo Ce Moretto. .. change:: :tags: bug, batch :tickets: 761 Added missing "create comment" feature for columns that are altered in batch migrations. .. change:: :tags: changed :tickets: 748 Alembic 1.5.0 now supports **Python 2.7 and Python 3.6 and above**, as well as **SQLAlchemy 1.3.0 and above**. Support is removed for Python 3 versions prior to 3.6 and SQLAlchemy versions prior to the 1.3 series. .. change:: :tags: bug, batch :tickets: 773 Made an adjustment to the PostgreSQL dialect to allow it to work more effectively in batch mode, where a datatype like Boolean or non-native Enum that may have embedded rules to generate CHECK constraints will be more correctly handled in that these constraints usually will not have been generated on the PostgreSQL backend; previously it would inadvertently assume they existed unconditionally in a special PG-only "drop constraint" step. .. change:: :tags: feature, versioning :tickets: 757 The revision tree is now checked for cycles and loops between revision files when the revision environment is loaded up. Scenarios such as a revision pointing to itself, or a revision that can reach itself via a loop, are handled and will raise the :class:`.CycleDetected` exception when the environment is loaded (expressed from the Alembic commandline as a failure message and nonzero return code). Previously, these situations were silently ignored up front, and the behavior of revision traversal would either be silently incorrect, or would produce errors such as :class:`.RangeNotAncestorError`. Pull request courtesy Koichiro Den. .. change:: :tags: usecase, commands Add ``__main__.py`` file to alembic package to support invocation with ``python -m alembic``. .. change:: :tags: removed, commands Removed deprecated ``--head_only`` option to the ``alembic current`` command .. change:: :tags: removed, operations Removed legacy parameter names from operations, these have been emitting warnings since version 0.8. In the case that legacy version files have not yet been updated, these can be modified directly in order to maintain compatibility: * :meth:`.Operations.drop_constraint` - "type" (use "type_") and "name" (use "constraint_name") * :meth:`.Operations.create_primary_key` - "cols" (use "columns") and "name" (use "constraint_name") * :meth:`.Operations.create_unique_constraint` - "name" (use "constraint_name"), "source" (use "table_name") and "local_cols" (use "columns") * :meth:`.Operations.batch_create_unique_constraint` - "name" (use "constraint_name") * :meth:`.Operations.create_foreign_key` - "name" (use "constraint_name"), "source" (use "source_table"), "referent" (use "referent_table") * :meth:`.Operations.batch_create_foreign_key` - "name" (use "constraint_name"), "referent" (use "referent_table") * :meth:`.Operations.create_check_constraint` - "name" (use "constraint_name"), "source" (use "table_name") * :meth:`.Operations.batch_create_check_constraint` - "name" (use "constraint_name") * :meth:`.Operations.create_index` - "name" (use "index_name") * :meth:`.Operations.drop_index` - "name" (use "index_name"), "tablename" (use "table_name") * :meth:`.Operations.batch_drop_index` - "name" (use "index_name"), * :meth:`.Operations.create_table` - "name" (use "table_name") * :meth:`.Operations.drop_table` - "name" (use "table_name") * :meth:`.Operations.alter_column` - "name" (use "new_column_name") .. changelog:: ``` ### 1.4.3 ``` :released: September 11, 2020 .. change:: :tags: bug, sqlite, batch :tickets: 711 Added support to drop named CHECK constraints that are specified as part of a column, rather than table wide. Previously, only constraints associated with the table were considered. .. change:: :tags: bug, ops, mysql :tickets: 736 Fixed issue where the MySQL dialect would not correctly render the server default of a column in an alter operation, if the operation were programmatically generated from an autogenerate pass as it would not accommodate for the full structure of the DefaultClause construct. .. change:: :tags: bug, sqlite, batch :tickets: 697 Fixed issue where the CAST applied to a JSON column when copying a SQLite table during batch mode would cause the data to be lost, as SQLite's CAST with JSON appears to convert the data to the value "0". The CAST is now skipped in a dialect-specific manner, including for JSON columns on SQLite. Pull request courtesy Sebastián RamÃrez. .. change:: :tags: bug, commands :tickets: 694 The ``alembic current`` command no longer creates an ``alembic_version`` table in the database if one does not exist already, returning no version as the current version. This allows checking for migrations in parallel without introducing race conditions. Pull request courtesy Nikolay Edigaryev. .. change:: :tags: bug, batch Fixed issue where columns in a foreign-key referenced table would be replaced with null-type columns during a batch operation; while this did not generally have any side effects, it could theoretically impact a batch operation that also targets that table directly and also would interfere with future changes to the ``.append_column()`` method to disallow implicit replacement of columns. .. change:: :tags: bug, mssql :tickets: 716 Fixed issue where the ``mssql_drop_foreign_key=True`` flag on ``op.drop_column`` would lead to incorrect syntax error due to a typo in the SQL emitted, same typo was present in the test as well so it was not detected. Pull request courtesy Oleg Shigorin. .. changelog:: ```Links
- PyPI: https://pypi.org/project/alembic - Changelog: https://pyup.io/changelogs/alembic/ - Homepage: https://alembic.sqlalchemy.org - Docs: https://pythonhosted.org/alembic/Update SQLAlchemy from 1.3.18 to 1.4.17.
Changelog
### 1.4.17 ``` :released: May 29, 2021 .. change:: :tags: bug, orm, regression :tickets: 6558 Fixed regression caused by just-released performance fix mentioned in 6550 where a query.join() to a relationship could produce an AttributeError if the query were made against non-ORM structures only, a fairly unusual calling pattern. .. changelog:: ``` ### 1.4.16 ``` :released: May 28, 2021 .. change:: :tags: bug, engine :tickets: 6482 Fixed issue where an ` sign in the database portion of a URL would not be interpreted correctly if the URL also had a username:password section. .. change:: :tags: bug, ext :tickets: 6529 Fixed a deprecation warning that was emitted when using :func:`_automap.automap_base` without passing an existing ``Base``. .. change:: :tags: bug, pep484 :tickets: 6461 Remove pep484 types from the code. Current effort is around the stub package, and having typing in two places makes thing worse, since the types in the SQLAlchemy source were usually outdated compared to the version in the stubs. .. change:: :tags: usecase, mssql :tickets: 6464 Implemented support for a :class:`_sql.CTE` construct to be used directly as the target of a :func:`_sql.delete` construct, i.e. "WITH ... AS cte DELETE FROM cte". This appears to be a useful feature of SQL Server. .. change:: :tags: bug, general :tickets: 6540, 6543 Resolved various deprecation warnings which were appearing as of Python version 3.10.0b1. .. change:: :tags: bug, orm :tickets: 6471 Fixed issue when using :paramref:`_orm.relationship.cascade_backrefs` parameter set to ``False``, which per :ref:`change_5150` is set to become the standard behavior in SQLAlchemy 2.0, where adding the item to a collection that uniquifies, such as ``set`` or ``dict`` would fail to fire a cascade event if the object were already associated in that collection via the backref. This fix represents a fundamental change in the collection mechanics by introducing a new event state which can fire off for a collection mutation even if there is no net change on the collection; the action is now suited using a new event hook :meth:`_orm.AttributeEvents.append_wo_mutation`. .. change:: :tags: bug, orm, regression :tickets: 6550 Fixed regression involving clause adaption of labeled ORM compound elements, such as single-table inheritance discriminator expressions with conditionals or CASE expressions, which could cause aliased expressions such as those used in ORM join / joinedload operations to not be adapted correctly, such as referring to the wrong table in the ON clause in a join. This change also improves a performance bump that was located within the process of invoking :meth:`_sql.Select.join` given an ORM attribute as a target. .. change:: :tags: bug, orm, regression :tickets: 6495 Fixed regression where the full combination of joined inheritance, global with_polymorphic, self-referential relationship and joined loading would fail to be able to produce a query with the scope of lazy loads and object refresh operations that also attempted to render the joined loader. .. change:: :tags: bug, engine :tickets: 6329 Fixed a long-standing issue with :class:`.URL` where query parameters following the question mark would not be parsed correctly if the URL did not contain a database portion with a backslash. .. change:: :tags: bug, sql, regression :tickets: 6549 Fixed regression in dynamic loader strategy and :func:`_orm.relationship` overall where the :paramref:`_orm.relationship.order_by` parameter were stored as a mutable list, which could then be mutated when combined with additional "order_by" methods used against the dynamic query object, causing the ORDER BY criteria to continue to grow repetitively. .. change:: :tags: bug, orm :tickets: 6484 Enhanced the bind resolution rules for :meth:`_orm.Session.execute` so that when a non-ORM statement such as an :func:`_sql.insert` construct nonetheless is built against ORM objects, to the greatest degree possible the ORM entity will be used to resolve the bind, such as for a :class:`_orm.Session` that has a bind map set up on a common superclass without specific mappers or tables named in the map. .. change:: :tags: bug, regression, ext :tickets: 6390 Fixed regression in the ``sqlalchemy.ext.instrumentation`` extension that prevented instrumentation disposal from working completely. This fix includes both a 1.4 regression fix as well as a fix for a related issue that existed in 1.3 also. As part of this change, the :class:`sqlalchemy.ext.instrumentation.InstrumentationManager` class now has a new method ``unregister()``, which replaces the previous method ``dispose()``, which was not called as of version 1.4. .. changelog:: ``` ### 1.4.15 ``` :released: May 11, 2021 .. change:: :tags: bug, documentation, mysql :tickets: 5397 Added support for the ``ssl_check_hostname=`` parameter in mysql connection URIs and updated the mysql dialect documentation regarding secure connections. Original pull request courtesy of Jerry Zhao. .. change:: :tags: bug, orm, regression :tickets: 6449 Fixed additional regression caused by "eager loaders run on unexpire" feature :ticket:`1763` where the feature would run for a ``contains_eager()`` eagerload option in the case that the ``contains_eager()`` were chained to an additional eager loader option, which would then produce an incorrect query as the original query-bound join criteria were no longer present. .. change:: :tags: feature, general :tickets: 6241 A new approach has been applied to the warnings system in SQLAlchemy to accurately predict the appropriate stack level for each warning dynamically. This allows evaluating the source of SQLAlchemy-generated warnings and deprecation warnings to be more straightforward as the warning will indicate the source line within end-user code, rather than from an arbitrary level within SQLAlchemy's own source code. .. change:: :tags: bug, orm :tickets: 6459 Fixed issue in subquery loader strategy which prevented caching from working correctly. This would have been seen in the logs as a "generated" message instead of "cached" for all subqueryload SQL emitted, which by saturating the cache with new keys would degrade overall performance; it also would produce "LRU size alert" warnings. .. change:: :tags: bug, sql :tickets: 6460 Adjusted the logic added as part of :ticket:`6397` in 1.4.12 so that internal mutation of the :class:`.BindParameter` object occurs within the clause construction phase as it did before, rather than in the compilation phase. In the latter case, the mutation still produced side effects against the incoming construct and additionally could potentially interfere with other internal mutation routines. .. changelog:: ``` ### 1.4.14 ``` :released: May 6, 2021 .. change:: :tags: bug, regression, orm :tickets: 6426 Fixed regression involving ``lazy='dynamic'`` loader in conjunction with a detached object. The previous behavior was that the dynamic loader upon calling methods like ``.all()`` returns empty lists for detached objects without error, this has been restored; however a warning is now emitted as this is not the correct result. Other dynamic loader scenarios correctly raise ``DetachedInstanceError``. .. change:: :tags: bug, regression, sql :tickets: 6428 Fixed regression caused by the "empty in" change just made in :ticket:`6397` 1.4.12 where the expression needs to be parenthesized for the "not in" use case, otherwise the condition will interfere with the other filtering criteria. .. change:: :tags: bug, sql, regression :tickets: 6436 The :class:`.TypeDecorator` class will now emit a warning when used in SQL compilation with caching unless the ``.cache_ok`` flag is set to ``True`` or ``False``. A new class-level attribute :attr:`.TypeDecorator.cache_ok` may be set which will be used as an indication that all the parameters passed to the object are safe to be used as a cache key if set to ``True``, ``False`` means they are not. .. change:: :tags: engine, bug, regression :tickets: 6427 Established a deprecation path for calling upon the :meth:`_cursor.CursorResult.keys` method for a statement that returns no rows to provide support for legacy patterns used by the "records" package as well as any other non-migrated applications. Previously, this would raise :class:`.ResourceClosedException` unconditionally in the same way as it does when attempting to fetch rows. While this is the correct behavior going forward, the :class:`_cursor.LegacyCursorResult` object will now in this case return an empty list for ``.keys()`` as it did in 1.3, while also emitting a 2.0 deprecation warning. The :class:`_cursor.CursorResult`, used when using a 2.0-style "future" engine, will continue to raise as it does now. .. change:: :tags: usecase, engine, orm :tickets: 6288 Applied consistent behavior to the use case of calling ``.commit()`` or ``.rollback()`` inside of an existing ``.begin()`` context manager, with the addition of potentially emitting SQL within the block subsequent to the commit or rollback. This change continues upon the change first added in :ticket:`6155` where the use case of calling "rollback" inside of a ``.begin()`` contextmanager block was proposed: * calling ``.commit()`` or ``.rollback()`` will now be allowed without error or warning within all scopes, including that of legacy and future :class:`_engine.Engine`, ORM :class:`_orm.Session`, asyncio :class:`.AsyncEngine`. Previously, the :class:`_orm.Session` disallowed this. * The remaining scope of the context manager is then closed; when the block ends, a check is emitted to see if the transaction was already ended, and if so the block returns without action. * It will now raise **an error** if subsequent SQL of any kind is emitted within the block, **after** ``.commit()`` or ``.rollback()`` is called. The block should be closed as the state of the executable object would otherwise be undefined in this state. .. changelog:: ``` ### 1.4.13 ``` :released: May 3, 2021 .. change:: :tags: bug, regression, orm :tickets: 6410 Fixed regression in ``selectinload`` loader strategy that would cause it to cache its internal state incorrectly when handling relationships that join across more than one column, such as when using a composite foreign key. The invalid caching would then cause other unrelated loader operations to fail. .. change:: :tags: bug, orm, regression :tickets: 6414 Fixed regression where :meth:`_orm.Query.filter_by` would not work if the lead entity were a SQL function or other expression derived from the primary entity in question, rather than a simple entity or column of that entity. Additionally, improved the behavior of :meth:`_sql.Select.filter_by` overall to work with column expressions even in a non-ORM context. .. change:: :tags: bug, engine, regression :tickets: 6408 Restored a legacy transactional behavior that was inadvertently removed from the :class:`_engine.Connection` as it was never tested as a known use case in previous versions, where calling upon the :meth:`_engine.Connection.begin_nested` method, when no transaction is present, does not create a SAVEPOINT at all and instead starts an outer transaction, returning a :class:`.RootTransaction` object instead of a :class:`.NestedTransaction` object. This :class:`.RootTransaction` then will emit a real COMMIT on the database connection when committed. Previously, the 2.0 style behavior was present in all cases that would autobegin a transaction but not commit it, which is a behavioral change. When using a :term:`2.0 style` connection object, the behavior is unchanged from previous 1.4 versions; calling :meth:`_future.Connection.begin_nested` will "autobegin" the outer transaction if not already present, and then as instructed emit a SAVEPOINT, returning the :class:`.NestedTransaction` object. The outer transaction is committed by calling upon :meth:`_future.Connection.commit`, as is "commit-as-you-go" style usage. In non-"future" mode, while the old behavior is restored, it also emits a 2.0 deprecation warning as this is a legacy behavior. .. change:: :tags: bug, asyncio, regression :tickets: 6409 Fixed a regression introduced by :ticket:`6337` that would create an ``asyncio.Lock`` which could be attached to the wrong loop when instantiating the async engine before any asyncio loop was started, leading to an asyncio error message when attempting to use the engine under certain circumstances. .. change:: :tags: bug, orm, regression :tickets: 6419 Fixed regression where using :func:`_orm.selectinload` and :func:`_orm.subqueryload` to load a two-level-deep path would lead to an attribute error. .. change:: :tags: bug, orm, regression :tickets: 6420 Fixed regression where using the :func:`_orm.noload` loader strategy in conjunction with a "dynamic" relationship would lead to an attribute error as the noload strategy would attempt to apply itself to the dynamic loader. .. change:: :tags: usecase, postgresql :tickets: 6198 Add support for server side cursors in the pg8000 dialect for PostgreSQL. This allows use of the :paramref:`.Connection.execution_options.stream_results` option. .. changelog:: ``` ### 1.4.12 ``` :released: April 29, 2021 .. change:: :tags: bug, orm, regression, caching :tickets: 6391 Fixed critical regression where bound parameter tracking as used in the SQL caching system could fail to track all parameters for the case where the same SQL expression containing a parameter were used in an ORM-related query using a feature such as class inheritance, which was then embedded in an enclosing expression which would make use of that same expression multiple times, such as a UNION. The ORM would individually copy the individual SELECT statements as part of compilation with class inheritance, which then embedded in the enclosing statement would fail to accommodate for all parameters. The logic that tracks this condition has been adjusted to work for multiple copies of a parameter. .. change:: :tags: bug, sql :tickets: 6258, 6397 Revised the "EMPTY IN" expression to no longer rely upon using a subquery, as this was causing some compatibility and performance problems. The new approach for selected databases takes advantage of using a NULL-returning IN expression combined with the usual "1 != 1" or "1 = 1" expression appended by AND or OR. The expression is now the default for all backends other than SQLite, which still had some compatibility issues regarding tuple "IN" for older SQLite versions. Third party dialects can still override how the "empty set" expression renders by implementing a new compiler method ``def visit_empty_set_op_expr(self, type_, expand_op)``, which takes precedence over the existing ``def visit_empty_set_expr(self, element_types)`` which remains in place. .. change:: :tags: bug, orm :tickets: 6350 Fixed two distinct issues mostly affecting :class:`_hybrid.hybrid_property`, which would come into play under common mis-configuration scenarios that were silently ignored in 1.3, and now failed in 1.4, where the "expression" implementation would return a non :class:`_sql.ClauseElement` such as a boolean value. For both issues, 1.3's behavior was to silently ignore the mis-configuration and ultimately attempt to interpret the value as a SQL expression, which would lead to an incorrect query. * Fixed issue regarding interaction of the attribute system with hybrid_property, where if the ``__clause_element__()`` method of the attribute returned a non-:class:`_sql.ClauseElement` object, an internal ``AttributeError`` would lead the attribute to return the ``expression`` function on the hybrid_property itself, as the attribute error was against the name ``.expression`` which would invoke the ``__getattr__()`` method as a fallback. This now raises explicitly. In 1.3 the non-:class:`_sql.ClauseElement` was returned directly. * Fixed issue in SQL argument coercions system where passing the wrong kind of object to methods that expect column expressions would fail if the object were altogether not a SQLAlchemy object, such as a Python function, in cases where the object were not just coerced into a bound value. Again 1.3 did not have a comprehensive argument coercion system so this case would also pass silently. .. change:: :tags: bug, orm :tickets: 6378 Fixed issue where using a :class:`_sql.Select` as a subquery in an ORM context would modify the :class:`_sql.Select` in place to disable eagerloads on that object, which would then cause that same :class:`_sql.Select` to not eagerload if it were then re-used in a top-level execution context. .. change:: :tags: bug, regression, sql :tickets: 6343 Fixed regression where usage of the :func:`_sql.text` construct inside the columns clause of a :class:`_sql.Select` construct, which is better handled by using a :func:`_sql.literal_column` construct, would nonetheless prevent constructs like :func:`_sql.union` from working correctly. Other use cases, such as constructing subuqeries, continue to work the same as in prior versions where the :func:`_sql.text` construct is silently omitted from the collection of exported columns. Also repairs similar use within the ORM. .. change:: :tags: bug, regression, sql :tickets: 6261 Fixed regression involving legacy methods such as :meth:`_sql.Select.append_column` where internal assertions would fail. .. change:: :tags: usecase, sqlite :tickets: 6379 Default to using ``SingletonThreadPool`` for in-memory SQLite databases created using URI filenames. Previously the default pool used was the ``NullPool`` that precented sharing the same database between multiple engines. .. change:: :tags: bug, regression, sql :tickets: 6300 Fixed regression caused by :ticket:`5395` where tuning back the check for sequences in :func:`_sql.select` now caused failures when doing 2.0-style querying with a mapped class that also happens to have an ``__iter__()`` method. Tuned the check some more to accommodate this as well as some other interesting ``__iter__()`` scenarios. .. change:: :tags: bug, mssql, schema :tickets: 6345 Add :meth:`_types.TypeEngine.as_generic` support for :class:`sqlalchemy.dialects.mysql.BIT` columns, mapping them to :class:`_sql.sqltypes.Boolean`. .. change:: :tags: bug, orm, regression :tickets: 6360, 6359 Fixed issue where the new :ref:`autobegin <session_autobegin>` behavior failed to "autobegin" in the case where an existing persistent object has an attribute change, which would then impact the behavior of :meth:`_orm.Session.rollback` in that no snapshot was created to be rolled back. The "attribute modify" mechanics have been updated to ensure "autobegin", which does not perform any database work, does occur when persistent attributes change in the same manner as when :meth:`_orm.Session.add` is called. This is a regression as in 1.3, the rollback() method always had a transaction to