commit python-Flask-Migrate for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-Flask-Migrate for openSUSE:Factory checked in at 2024-03-26 19:26:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Flask-Migrate (Old) and /work/SRC/openSUSE:Factory/.python-Flask-Migrate.new.1905 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-Flask-Migrate" Tue Mar 26 19:26:12 2024 rev:13 rq:1161524 version:4.0.7 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Flask-Migrate/python-Flask-Migrate.changes 2024-02-12 18:55:24.169416895 +0100 +++ /work/SRC/openSUSE:Factory/.python-Flask-Migrate.new.1905/python-Flask-Migrate.changes 2024-03-26 19:29:53.254734580 +0100 @@ -1,0 +2,9 @@ +Mon Mar 25 17:33:37 UTC 2024 - Dirk Müller <dmueller@suse.com> + +- update to 4.0.7: + * Regression from #438: check `g.x_arg` exists before accessing + it #541 (commit) (thanks **Skye Im**!) + * Accept `-x` options for all db commands #438 (commit) + * Add `--purge` flag to the `stamp` command #540 (commit) + +------------------------------------------------------------------- Old: ---- Flask-Migrate-4.0.5.tar.gz New: ---- Flask-Migrate-4.0.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Flask-Migrate.spec ++++++ --- /var/tmp/diff_new_pack.gg4ASq/_old 2024-03-26 19:29:53.682750330 +0100 +++ /var/tmp/diff_new_pack.gg4ASq/_new 2024-03-26 19:29:53.686750477 +0100 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-Flask-Migrate -Version: 4.0.5 +Version: 4.0.7 Release: 0 Summary: SQLAlchemy database migrations for Flask applications using Alembic License: MIT ++++++ Flask-Migrate-4.0.5.tar.gz -> Flask-Migrate-4.0.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Migrate-4.0.5/CHANGES.md new/Flask-Migrate-4.0.7/CHANGES.md --- old/Flask-Migrate-4.0.5/CHANGES.md 2023-09-12 13:21:22.000000000 +0200 +++ new/Flask-Migrate-4.0.7/CHANGES.md 2024-03-11 19:42:55.000000000 +0100 @@ -1,5 +1,14 @@ # Flask-Migrate Change Log +**Release 4.0.7** - 2024-03-11 + +- Regression from #438: check `g.x_arg` exists before accessing it [#541](https://github.com/miguelgrinberg/flask-migrate/issues/541) ([commit](https://github.com/miguelgrinberg/flask-migrate/commit/7e8032c61e5c47f4e50b0...)) (thanks **Skye Im**!) + +**Release 4.0.6** - 2024-03-09 + +- Accept `-x` options for all db commands [#438](https://github.com/miguelgrinberg/flask-migrate/issues/438) ([commit](https://github.com/miguelgrinberg/flask-migrate/commit/6f3f889c36030134f87dc...)) +- Add `--purge` flag to the `stamp` command [#540](https://github.com/miguelgrinberg/flask-migrate/issues/540) ([commit](https://github.com/miguelgrinberg/flask-migrate/commit/af67bb093df5652c867b8...)) (thanks **Jono N**!) + **Release 4.0.5** - 2023-09-12 - Compatiblity fixes for Flask-SQLAlchemy >= 3.1 [#526](https://github.com/miguelgrinberg/flask-migrate/issues/526) ([commit](https://github.com/miguelgrinberg/flask-migrate/commit/f562178bbe1912912f3cb...)) (thanks **David Lord**!) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Migrate-4.0.5/MANIFEST.in new/Flask-Migrate-4.0.7/MANIFEST.in --- old/Flask-Migrate-4.0.5/MANIFEST.in 2023-09-12 13:21:22.000000000 +0200 +++ new/Flask-Migrate-4.0.7/MANIFEST.in 2024-03-11 19:42:55.000000000 +0100 @@ -1,5 +1,8 @@ -include README.md -include LICENSE +include README.md LICENSE tox.ini +recursive-include docs * +recursive-exclude docs/_build * +recursive-include tests * +exclude **/*.pyc include src/flask_migrate/templates/flask/* include src/flask_migrate/templates/flask-multidb/* include src/flask_migrate/templates/aioflask/* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Migrate-4.0.5/docs/index.rst new/Flask-Migrate-4.0.7/docs/index.rst --- old/Flask-Migrate-4.0.5/docs/index.rst 2023-09-12 13:21:22.000000000 +0200 +++ new/Flask-Migrate-4.0.7/docs/index.rst 2024-03-11 19:42:55.000000000 +0100 @@ -157,10 +157,10 @@ - ``flask db edit <revision>`` Edit a revision script using $EDITOR. -- ``flask db upgrade [--sql] [--tag TAG] [--x-arg ARG] <revision>`` +- ``flask db upgrade [--sql] [--tag TAG] <revision>`` Upgrades the database. If ``revision`` isn't given then ``"head"`` is assumed. -- ``flask db downgrade [--sql] [--tag TAG] [--x-arg ARG] <revision>`` +- ``flask db downgrade [--sql] [--tag TAG] <revision>`` Downgrades the database. If ``revision`` isn't given then ``-1`` is assumed. - ``flask db stamp [--sql] [--tag TAG] <revision>`` @@ -186,7 +186,8 @@ Notes: -- All commands also take a ``--directory DIRECTORY`` option that points to the directory containing the migration scripts. If this argument is omitted the directory used is ``migrations``. +- All commands take one or more ``--x-arg ARG=VALUE`` or ``-x ARG=VALUE`` options with custom arguments that can be used in ``env.py``. +- All commands take a ``--directory DIRECTORY`` option that points to the directory containing the migration scripts. If this argument is omitted the directory used is ``migrations``. - The default directory can also be specified as a ``directory`` argument to the ``Migrate`` constructor. - The ``--sql`` option present in several commands performs an 'offline' mode migration. Instead of executing the database commands the SQL statements that need to be executed are printed to the console. - Detailed documentation on these commands can be found in the `Alembic's command reference page <http://alembic.zzzcomputing.com/en/latest/api/commands.html>`_. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Migrate-4.0.5/pyproject.toml new/Flask-Migrate-4.0.7/pyproject.toml --- old/Flask-Migrate-4.0.5/pyproject.toml 2023-09-12 13:21:22.000000000 +0200 +++ new/Flask-Migrate-4.0.7/pyproject.toml 2024-03-11 19:42:55.000000000 +0100 @@ -1,6 +1,50 @@ +[project] +name = "Flask-Migrate" +version = "4.0.7" +authors = [ + { name = "Miguel Grinberg", email = "miguel.grinberg@gmail.com" }, +] +description = "SQLAlchemy database migrations for Flask applications using Alembic." +classifiers = [ + "Environment :: Web Environment", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] +requires-python = ">=3.6" +dependencies = [ + "Flask >= 0.9", + "Flask-SQLAlchemy >= 1.0", + "alembic >= 1.9.0", +] + +[project.license] +text = "MIT" + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.urls] +Homepage = "https://github.com/miguelgrinberg/flask-migrate" +"Bug Tracker" = "https://github.com/miguelgrinberg/flask-migrate/issues" + +[tool.setuptools] +zip-safe = false +include-package-data = true + +[tool.setuptools.package-dir] +"" = "src" + +[tool.setuptools.packages.find] +where = [ + "src", +] +namespaces = true + [build-system] requires = [ - "setuptools>=42", - "wheel" + "setuptools>=61.2", ] build-backend = "setuptools.build_meta" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Migrate-4.0.5/setup.cfg new/Flask-Migrate-4.0.7/setup.cfg --- old/Flask-Migrate-4.0.5/setup.cfg 2023-09-12 13:21:22.000000000 +0200 +++ new/Flask-Migrate-4.0.7/setup.cfg 1970-01-01 01:00:00.000000000 +0100 @@ -1,33 +0,0 @@ -[metadata] -name = Flask-Migrate -version = 4.0.5 -author = Miguel Grinberg -author_email = miguel.grinberg@gmail.com -license = MIT -description = SQLAlchemy database migrations for Flask applications using Alembic. -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/miguelgrinberg/flask-migrate -project_urls = - Bug Tracker = https://github.com/miguelgrinberg/flask-migrate/issues -classifiers = - Environment :: Web Environment - Intended Audience :: Developers - Programming Language :: Python :: 3 - License :: OSI Approved :: MIT License - Operating System :: OS Independent - -[options] -zip_safe = False -include_package_data = True -package_dir = - = src -packages = find_namespace: -python_requires = >=3.6 -install_requires = - Flask >= 0.9 - Flask-SQLAlchemy >= 1.0 - alembic >= 1.9.0 - -[options.packages.find] -where = src diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Migrate-4.0.5/setup.py new/Flask-Migrate-4.0.7/setup.py --- old/Flask-Migrate-4.0.5/setup.py 2023-09-12 13:21:22.000000000 +0200 +++ new/Flask-Migrate-4.0.7/setup.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -import setuptools - -setuptools.setup() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Migrate-4.0.5/src/flask_migrate/__init__.py new/Flask-Migrate-4.0.7/src/flask_migrate/__init__.py --- old/Flask-Migrate-4.0.5/src/flask_migrate/__init__.py 2023-09-12 13:21:22.000000000 +0200 +++ new/Flask-Migrate-4.0.7/src/flask_migrate/__init__.py 2024-03-11 19:42:55.000000000 +0100 @@ -3,7 +3,7 @@ import logging import os import sys -from flask import current_app +from flask import current_app, g from alembic import __version__ as __alembic_version__ from alembic.config import Config as AlembicConfig from alembic import command @@ -92,15 +92,15 @@ for opt in opts or []: setattr(config.cmd_opts, opt, True) if not hasattr(config.cmd_opts, 'x'): + setattr(config.cmd_opts, 'x', []) + for x in getattr(g, 'x_arg', []): + config.cmd_opts.x.append(x) if x_arg is not None: - setattr(config.cmd_opts, 'x', []) if isinstance(x_arg, list) or isinstance(x_arg, tuple): for x in x_arg: config.cmd_opts.x.append(x) else: config.cmd_opts.x.append(x_arg) - else: - setattr(config.cmd_opts, 'x', None) return self.call_configure_callbacks(config) @@ -252,11 +252,11 @@ @catch_errors -def stamp(directory=None, revision='head', sql=False, tag=None): +def stamp(directory=None, revision='head', sql=False, tag=None, purge=False): """'stamp' the revision table with the given revision; don't run any migrations""" config = current_app.extensions['migrate'].migrate.get_config(directory) - command.stamp(config, revision, sql=sql, tag=tag) + command.stamp(config, revision, sql=sql, tag=tag, purge=purge) @catch_errors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Migrate-4.0.5/src/flask_migrate/cli.py new/Flask-Migrate-4.0.7/src/flask_migrate/cli.py --- old/Flask-Migrate-4.0.5/src/flask_migrate/cli.py 2023-09-12 13:21:22.000000000 +0200 +++ new/Flask-Migrate-4.0.7/src/flask_migrate/cli.py 2024-03-11 19:42:55.000000000 +0100 @@ -1,4 +1,5 @@ import click +from flask import g from flask.cli import with_appcontext from flask_migrate import list_templates as _list_templates from flask_migrate import init as _init @@ -18,9 +19,12 @@ @click.group() -def db(): +@click.option('-x', '--x-arg', multiple=True, + help='Additional arguments consumed by custom env.py scripts') +@with_appcontext +def db(x_arg): """Perform database migrations.""" - pass + g.x_arg = x_arg # these will be picked up by Migrate.get_config() @db.command() @@ -234,12 +238,15 @@ @click.option('--tag', default=None, help=('Arbitrary "tag" name - can be used by custom env.py ' 'scripts')) +@click.option('--purge', is_flag=True, + help=('Delete the version in the alembic_version table before ' + 'stamping')) @click.argument('revision', default='head') @with_appcontext -def stamp(directory, sql, tag, revision): +def stamp(directory, sql, tag, revision, purge): """'stamp' the revision table with the given revision; don't run any migrations""" - _stamp(directory, revision, sql, tag) + _stamp(directory, revision, sql, tag, purge) @db.command()
participants (1)
-
Source-Sync