Path to this page:
Subject: CVS commit: pkgsrc/databases/py-alembic
From: Adam Ciarcinski
Date: 2019-10-10 20:26:53
Message id: 20191010182653.83A38FBF4@cvs.NetBSD.org
Log Message:
py-alembic: updated to 1.2.1
1.2.1
bug
[bug] [command]
Reverted the name change of the “revisions” argument to command.stamp() to \
“revision” as apparently applications are calling upon this argument as a \
keyword name. Pull request courtesy Thomas Bechtold. Special translations are \
also added to the command line interface so that it is still known as \
“revisions” in the CLI.
[bug] [tests]
Removed the “test requirements” from “setup.py test”, as this command \
now only emits a removal error in any case and these requirements are unused.
1.2.0
feature
[feature] [command]
Added new --purge flag to the alembic stamp command, which will unconditionally \
erase the version table before stamping anything. This is useful for development \
where non-existent version identifiers might be left within the table. \
Additionally, alembic.stamp now supports a list of revision identifiers, which \
are intended to allow setting up muliple heads at once. Overall handling of \
version identifiers within the alembic.stamp command has been improved with many \
new tests and use cases added.
[feature] [runtime]
Added new feature MigrationContext.autocommit_block(), a special directive which \
will provide for a non-transactional block inside of a migration script. The \
feature requres that: the database driver (e.g. DBAPI) supports the AUTOCOMMIT \
isolation mode. The directive also necessarily needs to COMMIT the existing \
transaction in progress in order to enter autocommit mode.
[feature] [commands]
Added “post write hooks” to revision generation. These allow custom logic to \
run after a revision Python script is generated, typically for the purpose of \
running code formatters such as “Black” or “autopep8”, but may be used \
for any arbitrary post-render hook as well, including custom Python functions or \
scripts. The hooks are enabled by providing a [post_write_hooks] section in the \
alembic.ini file. A single hook is provided which runs an arbitrary Python \
executable on the newly generated revision script, which can be configured to \
run code formatters such as Black; full examples are included in the \
documentation.
[feature] [environment]
Added new flag --package to alembic init. For environments where the Alembic \
migration files and such are within the package tree and importable as modules, \
this flag can be specified which will add the additional __init__.py files in \
the version location and the environment location.
Files: