commit python-sqlalchemy-migrate for openSUSE:Factory
Hello community, here is the log from the commit of package python-sqlalchemy-migrate for openSUSE:Factory checked in at 2015-02-25 02:18:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sqlalchemy-migrate (Old) and /work/SRC/openSUSE:Factory/.python-sqlalchemy-migrate.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-sqlalchemy-migrate" Changes: -------- --- /work/SRC/openSUSE:Factory/python-sqlalchemy-migrate/python-sqlalchemy-migrate.changes 2014-09-17 17:27:28.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-sqlalchemy-migrate.new/python-sqlalchemy-migrate.changes 2015-02-25 02:18:37.000000000 +0100 @@ -1,0 +2,10 @@ +Tue Feb 24 13:22:05 UTC 2015 - tbechtold@suse.com + +- update to version 0.9.4: + * Remove svn version tag setting + * Ignore transaction management statements in SQL scripts + * Use native sqlalchemy 0.9 quote attribute with ibmdb2 + * Don't add warnings filter on import + * pep8: mark all pep8 checks that currently fail as ignored + +------------------------------------------------------------------- Old: ---- sqlalchemy-migrate-0.9.2.tar.gz New: ---- sqlalchemy-migrate-0.9.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sqlalchemy-migrate.spec ++++++ --- /var/tmp/diff_new_pack.BCrh6T/_old 2015-02-25 02:18:38.000000000 +0100 +++ /var/tmp/diff_new_pack.BCrh6T/_new 2015-02-25 02:18:38.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-sqlalchemy-migrate # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright 2011 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: python-sqlalchemy-migrate -Version: 0.9.2 +Version: 0.9.4 Release: 0 Summary: Database schema migration for SQLAlchemy License: MIT ++++++ sqlalchemy-migrate-0.9.2.tar.gz -> sqlalchemy-migrate-0.9.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/AUTHORS new/sqlalchemy-migrate-0.9.4/AUTHORS --- old/sqlalchemy-migrate-0.9.2/AUTHORS 2014-09-11 18:42:29.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/AUTHORS 2015-01-13 02:35:52.000000000 +0100 @@ -1,5 +1,6 @@ Alex Favaro <alexfav619@gmail.com> Bob Farrell <robertanthonyfarrell@gmail.com> +Brant Knudson <bknudson@us.ibm.com> Chris Withers <chris@simplistix.co.uk> Cyril Roelandt <cyril.roelandt@enovance.com> Dan Prince <dprince@redhat.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/ChangeLog new/sqlalchemy-migrate-0.9.4/ChangeLog --- old/sqlalchemy-migrate-0.9.2/ChangeLog 2014-09-11 18:42:29.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/ChangeLog 2015-01-13 02:35:52.000000000 +0100 @@ -1,12 +1,26 @@ CHANGES ======= +0.9.4 +----- + +* Remove svn version tag setting + +0.9.3 +----- + +* Ignore transaction management statements in SQL scripts +* Use native sqlalchemy 0.9 quote attribute with ibmdb2 +* Don't add warnings filter on import +* pep8: mark all pep8 checks that currently fail as ignored + 0.9.2 ----- * SqlScript: execute multiple statements one by one * Make sure we don't throw away exception on SQL script failure * Pin testtools to < 0.9.36 +* Fix ibmdb2 unique constraint handling for sqlalchemy 0.9 0.9.1 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/PKG-INFO new/sqlalchemy-migrate-0.9.4/PKG-INFO --- old/sqlalchemy-migrate-0.9.2/PKG-INFO 2014-09-11 18:42:29.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/PKG-INFO 2015-01-13 02:35:52.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: sqlalchemy-migrate -Version: 0.9.2 +Version: 0.9.4 Summary: Database schema migration for SQLAlchemy Home-page: http://www.openstack.org/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/migrate/changeset/__init__.py new/sqlalchemy-migrate-0.9.4/migrate/changeset/__init__.py --- old/sqlalchemy-migrate-0.9.2/migrate/changeset/__init__.py 2014-09-11 18:41:48.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/migrate/changeset/__init__.py 2015-01-13 02:35:13.000000000 +0100 @@ -5,13 +5,10 @@ .. [#] SQL Data Definition Language """ import re -import warnings import sqlalchemy from sqlalchemy import __version__ as _sa_version -warnings.simplefilter('always', DeprecationWarning) - _sa_version = tuple(int(re.match("\d+", x).group(0)) for x in _sa_version.split(".")) SQLA_07 = _sa_version >= (0, 7) SQLA_08 = _sa_version >= (0, 8) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/migrate/changeset/databases/ibmdb2.py new/sqlalchemy-migrate-0.9.4/migrate/changeset/databases/ibmdb2.py --- old/sqlalchemy-migrate-0.9.2/migrate/changeset/databases/ibmdb2.py 2014-09-11 18:41:48.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/migrate/changeset/databases/ibmdb2.py 2015-01-13 02:35:13.000000000 +0100 @@ -14,6 +14,7 @@ from migrate.changeset import ansisql from migrate.changeset import constraint +from migrate.changeset import util from migrate import exceptions @@ -107,7 +108,8 @@ """Rename a table; #38. Other ops aren't supported.""" self._rename_table(table) - self.append("TO %s" % self.preparer.quote(table.new_name, table.quote)) + q = util.safe_quote(table) + self.append("TO %s" % self.preparer.quote(table.new_name, q)) self.execute() self.append("COMMIT") self.execute() @@ -128,10 +130,11 @@ def _run_subvisit(self, delta, func, start_alter=True): """Runs visit method based on what needs to be changed on column""" table = delta.table + q = util.safe_quote(table) if start_alter: self.start_alter_table(table) ret = func(table, - self.preparer.quote(delta.current_name, delta.quote), + self.preparer.quote(delta.current_name, q), delta) self.execute() self._reorg_table(self.preparer.format_table(delta.table)) @@ -262,13 +265,13 @@ if (isinstance(constraint, UniqueConstraint) and is_unique_constraint_with_null_columns_supported( self.dialect)): - for column in constraint.columns._all_cols: + for column in constraint: if column.nullable: constraint.exclude_nulls = True break if getattr(constraint, 'exclude_nulls', None): index = Index(constraint.name, - *(column for column in constraint.columns._all_cols), + *(column for column in constraint), unique=True) sql = self.process(CreateIndex(index)) sql += ' EXCLUDE NULL KEYS' @@ -285,7 +288,7 @@ if (isinstance(constraint, UniqueConstraint) and is_unique_constraint_with_null_columns_supported( self.dialect)): - for column in constraint.columns._all_cols: + for column in constraint: if column.nullable: constraint.exclude_nulls = True break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/migrate/tests/versioning/test_script.py new/sqlalchemy-migrate-0.9.4/migrate/tests/versioning/test_script.py --- old/sqlalchemy-migrate-0.9.2/migrate/tests/versioning/test_script.py 2014-09-11 18:41:49.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/migrate/tests/versioning/test_script.py 2015-01-13 02:35:13.000000000 +0100 @@ -271,3 +271,25 @@ sqls = SqlScript(src) sqls.run(self.engine) tmp_sql_table.metadata.drop_all(self.engine, checkfirst=True) + + @fixture.usedb() + def test_transaction_management_statements(self): + """ + Test that we can successfully execute SQL scripts with transaction + management statements. + """ + for script_pattern in ( + "BEGIN TRANSACTION; %s; COMMIT;", + "BEGIN; %s; END TRANSACTION;", + ): + + test_statement = ("CREATE TABLE TEST1 (field1 int); " + "DROP TABLE TEST1") + script = script_pattern % test_statement + src = self.tmp() + + with open(src, 'wt') as f: + f.write(script) + + sqls = SqlScript(src) + sqls.run(self.engine) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/migrate/tests/versioning/test_shell.py new/sqlalchemy-migrate-0.9.4/migrate/tests/versioning/test_shell.py --- old/sqlalchemy-migrate-0.9.2/migrate/tests/versioning/test_shell.py 2014-09-11 18:41:48.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/migrate/tests/versioning/test_shell.py 2015-01-13 02:35:13.000000000 +0100 @@ -485,7 +485,6 @@ result = self.env.run('migrate compare_model_to_db %s %s --model=%s' \ % (self.url, repos_path, model_module.replace(":", ".")), expect_error=True) self.assertEqual(result.returncode, 0) - self.assertTrue("DeprecationWarning" in result.stderr) self.assertTrue("tables missing from database: tmp_account_rundiffs" in result.stdout) # Update db to latest model. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/migrate/versioning/script/sql.py new/sqlalchemy-migrate-0.9.4/migrate/versioning/script/sql.py --- old/sqlalchemy-migrate-0.9.2/migrate/versioning/script/sql.py 2014-09-11 18:41:49.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/migrate/versioning/script/sql.py 2015-01-13 02:35:13.000000000 +0100 @@ -1,6 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- import logging +import re import shutil import sqlparse @@ -36,13 +37,29 @@ try: trans = conn.begin() try: + # ignore transaction management statements that are + # redundant in SQL script context and result in + # operational error being returned. + # + # Note: we don't ignore ROLLBACK in migration scripts + # since its usage would be insane anyway, and we're + # better to fail on its occurance instead of ignoring it + # (and committing transaction, which is contradictory to + # the whole idea of ROLLBACK) + ignored_statements = ('BEGIN', 'END', 'COMMIT') + ignored_regex = re.compile('^\s*(%s).*;?$' % '|'.join(ignored_statements), + re.IGNORECASE) + # NOTE(ihrachys): script may contain multiple statements, and # not all drivers reliably handle multistatement queries or # commands passed to .execute(), so split them and execute one # by one for statement in sqlparse.split(text): if statement: - conn.execute(statement) + if re.match(ignored_regex, statement): + log.warning('"%s" found in SQL script; ignoring' % statement) + else: + conn.execute(statement) trans.commit() except Exception as e: log.error("SQL script %s failed: %s", self.path, e) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/setup.cfg new/sqlalchemy-migrate-0.9.4/setup.cfg --- old/sqlalchemy-migrate-0.9.2/setup.cfg 2014-09-11 18:42:29.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/setup.cfg 2015-01-13 02:35:52.000000000 +0100 @@ -32,7 +32,7 @@ source-dir = doc/source [egg_info] -tag_svn_revision = 0 tag_build = +tag_svn_revision = 0 tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/sqlalchemy_migrate.egg-info/PKG-INFO new/sqlalchemy-migrate-0.9.4/sqlalchemy_migrate.egg-info/PKG-INFO --- old/sqlalchemy-migrate-0.9.2/sqlalchemy_migrate.egg-info/PKG-INFO 2014-09-11 18:42:29.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/sqlalchemy_migrate.egg-info/PKG-INFO 2015-01-13 02:35:52.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: sqlalchemy-migrate -Version: 0.9.2 +Version: 0.9.4 Summary: Database schema migration for SQLAlchemy Home-page: http://www.openstack.org/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/sqlalchemy_migrate.egg-info/SOURCES.txt new/sqlalchemy-migrate-0.9.4/sqlalchemy_migrate.egg-info/SOURCES.txt --- old/sqlalchemy-migrate-0.9.2/sqlalchemy_migrate.egg-info/SOURCES.txt 2014-09-11 18:42:29.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/sqlalchemy_migrate.egg-info/SOURCES.txt 2015-01-13 02:35:52.000000000 +0100 @@ -126,5 +126,6 @@ sqlalchemy_migrate.egg-info/dependency_links.txt sqlalchemy_migrate.egg-info/entry_points.txt sqlalchemy_migrate.egg-info/not-zip-safe +sqlalchemy_migrate.egg-info/pbr.json sqlalchemy_migrate.egg-info/requires.txt sqlalchemy_migrate.egg-info/top_level.txt \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/sqlalchemy_migrate.egg-info/pbr.json new/sqlalchemy-migrate-0.9.4/sqlalchemy_migrate.egg-info/pbr.json --- old/sqlalchemy-migrate-0.9.2/sqlalchemy_migrate.egg-info/pbr.json 1970-01-01 01:00:00.000000000 +0100 +++ new/sqlalchemy-migrate-0.9.4/sqlalchemy_migrate.egg-info/pbr.json 2015-01-13 02:35:52.000000000 +0100 @@ -0,0 +1 @@ +{"is_release": true, "git_version": "b011e6c"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/sqlalchemy_migrate.egg-info/requires.txt new/sqlalchemy-migrate-0.9.4/sqlalchemy_migrate.egg-info/requires.txt --- old/sqlalchemy-migrate-0.9.2/sqlalchemy_migrate.egg-info/requires.txt 2014-09-11 18:42:29.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/sqlalchemy_migrate.egg-info/requires.txt 2015-01-13 02:35:52.000000000 +0100 @@ -3,4 +3,4 @@ decorator six>=1.4.1 sqlparse -Tempita >= 0.4 \ No newline at end of file +Tempita >= 0.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.9.2/tox.ini new/sqlalchemy-migrate-0.9.4/tox.ini --- old/sqlalchemy-migrate-0.9.2/tox.ini 2014-09-11 18:41:48.000000000 +0200 +++ new/sqlalchemy-migrate-0.9.4/tox.ini 2015-01-13 02:35:13.000000000 +0100 @@ -75,12 +75,51 @@ python setup.py testr --slowest --testr-args='{posargs}' [flake8] -# F841 local variable 'json_template' is assigned to but never used +# E121 continuation line indentation is not a multiple of four +# E122 continuation line missing indentation or outdented +# E123 closing bracket does not match indentation of opening bracket's line +# E124 closing bracket does not match visual indentation +# E125 continuation line does not distinguish itself from next logical line +# E126 continuation line over-indented for hanging indent +# E127 continuation line over-indented for visual indent +# E128 continuation line under-indented for visual indent +# E202 whitespace before ')' +# E203 whitespace before ',' +# E225 missing whitespace around operator +# E226 missing whitespace around arithmetic operator +# E228 missing whitespace around modulo operator +# E231 missing whitespace after ',' +# H234 assertEquals is deprecated, use assertEqual +# E251 unexpected spaces around keyword / parameter equals +# E261 at least two spaces before inline comment +# E272 multiple spaces before keyword +# E301 expected 1 blank line, found 0 +# E302 expected 2 blank lines, found 1 +# E303 too many blank lines (3) +# E401 multiple imports on one line +# E501 line too long (<number-of-chars> > 79 characters) +# E502 the backslash is redundant between brackets +# E702 multiple statements on one line (semicolon) +# E712 comparison to True should be 'if cond is True:' or 'if cond:' +# F401 '<module>' imported but unused +# F403 'from migrate.exceptions import *' used; unable to detect undefined names +# F811 redefinition of unused '<type>' from line <lineno> +# F821 undefined name '<name>' +# F841 local variable '<variable>' is assigned to but never used +# H101 Use TODO(NAME) # H201 no 'except:' at least use 'except Exception:' -# H302 import only modules.'bla..' does not import a module +# H202 assertRaises Exception too broad +# H233 Python 3.x incompatible use of print operator +# H301 one import per line +# H302 import only modules. '<import>' does not import a module # H306 imports not in alphabetical order +# H401 docstring should not start with a space +# H402 one line docstring needs punctuation. +# H403 multi line docstring end on new line # H404 multi line docstring should start with a summary -ignore = F841,H201,H302,H306,H404 +# H501 Do not use locals() for string formatting +# W391 blank line at end of file +ignore = E121,E122,E123,E124,E125,E126,E127,E128,E202,E203,E225,E226,E228,E231,E251,E261,E272,E301,E302,E303,E401,E501,E502,E702,E712,F401,F403,F811,F821,F841,H101,H201,H202,H233,H234,H301,H302,H306,H401,H402,H403,H404,H501,W391 show-source = true builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,build -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de