Hello community,
here is the log from the commit of package python-sqlalchemy-migrate for openSUSE:Factory checked in at 2017-03-17 15:07:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sqlalchemy-migrate (Old)
and /work/SRC/openSUSE:Factory/.python-sqlalchemy-migrate.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sqlalchemy-migrate"
Fri Mar 17 15:07:34 2017 rev:19 rq:480738 version:0.11.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sqlalchemy-migrate/python-sqlalchemy-migrate.changes 2015-09-30 05:50:29.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-sqlalchemy-migrate.new/python-sqlalchemy-migrate.changes 2017-03-17 15:07:35.277028347 +0100
@@ -1,0 +2,11 @@
+Thu Mar 9 21:51:10 UTC 2017 - dmueller@suse.com
+
+- update to 0.11.0:
+ * Use a modern PBR package
+ * Prepare for using standard python tests
+ * Set autoincrement to False when modifying to non-Integer datatype
+ * Raise VersionNotFoundError instead of KeyError
+ * Fix DeprecationWarning on setuptools >= 11.3
+ * Update .gitreview for new namespace
+
+-------------------------------------------------------------------
Old:
----
sqlalchemy-migrate-0.10.0.tar.gz
New:
----
sqlalchemy-migrate-0.11.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-sqlalchemy-migrate.spec ++++++
--- /var/tmp/diff_new_pack.J68Qfr/_old 2017-03-17 15:07:36.032921667 +0100
+++ /var/tmp/diff_new_pack.J68Qfr/_new 2017-03-17 15:07:36.036921102 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-sqlalchemy-migrate
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright 2011 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@@ -18,13 +18,13 @@
Name: python-sqlalchemy-migrate
-Version: 0.10.0
+Version: 0.11.0
Release: 0
Summary: Database schema migration for SQLAlchemy
License: MIT
Group: Development/Libraries/Python
Url: http://pypi.python.org/pypi/sqlalchemy-migrate
-Source: https://pypi.python.org/packages/source/s/sqlalchemy-migrate/sqlalchemy-migrate-%{version}.tar.gz
+Source: https://pypi.io/packages/source/s/sqlalchemy-migrate/sqlalchemy-migrate-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-pbr
# Documentation requirements:
@@ -41,7 +41,6 @@
Requires: python-decorator
Requires: python-six >= 1.7.0
Requires: python-sqlparse
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
++++++ sqlalchemy-migrate-0.10.0.tar.gz -> sqlalchemy-migrate-0.11.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/AUTHORS new/sqlalchemy-migrate-0.11.0/AUTHORS
--- old/sqlalchemy-migrate-0.10.0/AUTHORS 2015-08-31 23:05:45.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/AUTHORS 2017-03-01 15:02:52.000000000 +0100
@@ -1,4 +1,5 @@
Alex Favaro
+Andreas Jaeger
Bob Farrell
Brant Knudson
Chris Withers
@@ -37,6 +38,7 @@
Thomas Goirand
Thomas Goirand
Thuy Christenson
+Tony Breeds
Victor Stinner
Yuval Langer
al.yazdi@gmail.com <unknown>
@@ -44,6 +46,7 @@
ches.martin <unknown>
christian.simms <unknown>
chrisw <unknown>
+dineshbhor
emil.kroymann <unknown>
hudson@fubarite.fubar.si <unknown>
iElectric <unknown>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/ChangeLog new/sqlalchemy-migrate-0.11.0/ChangeLog
--- old/sqlalchemy-migrate-0.10.0/ChangeLog 2015-08-31 23:05:45.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/ChangeLog 2017-03-01 15:02:52.000000000 +0100
@@ -1,6 +1,16 @@
CHANGES
=======
+0.11.0
+------
+
+* Use a modern PBR package
+* Prepare for using standard python tests
+* Set autoincrement to False when modifying to non-Integer datatype
+* Raise VersionNotFoundError instead of KeyError
+* Fix DeprecationWarning on setuptools >= 11.3
+* Update .gitreview for new namespace
+
0.10.0
------
@@ -488,7 +498,7 @@
* fixed a number of shell-related failures
* hopefully the last of migrate.run
* more "run" removal
-* fixes to postgres, shell. removal of "run" module
+* fixes to postgres, shell. removal of "run" module
* print statement removal
* removed driver deprecation, since that was deprecated in 0.4
* now all databases are running at once
@@ -505,7 +515,7 @@
* add --declarative option to create_model to generate new declarative style
* get test_changeset working in oracle - just more server_default issues
* add support for SA 0.5
-* - integrate patch by Toshio Kuratomi sent to migrate-users 2008/07/30 06:08 (GMT+01:00) - pylint clean migrate/versioning/migrate_repository.py
+* - integrate patch by Toshio Kuratomi sent to migrate-users 2008/07/30 06:08 (GMT+01:00) - pylint clean migrate/versioning/migrate_repository.py
* * create bugfix branch for 0.4.4 * prepare trunk for new development
* * add 0.4.5 changes to CHANGELOG
* applied patch for shell test by Toshio Kuramoti
@@ -513,8 +523,8 @@
* add unit test to make sure we can handle more than 999 revisions
* finish implementing repository migration script
* make repository format flatter and get rid of commit command
-* * applied a slightly modified version of the patch for issue #20 by Christophe de Vienne which uses a logger for 'migrate.versioning' instead of the root logger
-* almost done issue 12: generate downgrade method for schema migration
+* * applied a slightly modified version of the patch for issue #20 by Christophe de Vienne which uses a logger for 'migrate.versioning' instead of the root logger
+* almost done issue 12: generate downgrade method for schema migration
* fix issue 18 by applying given patch
* enhance command update_db_from_model to bump db_version to latest in repository
* improve diff unit tests to make sure they don't drop data when column type changes; make the code pass the tests
@@ -522,8 +532,8 @@
* Change make_update_script_for_model shell command to compare two versions of Python model (issue #12); add shell test for new diff'ing apis
* - merged CHANGELOG from bugfix branch
* - release 0.4.4
-* r1081@denkpolster: jan | 2008-04-04 18:48:20 +0200 - fix for SQLAlchemy deprecation warning when creating version table
-* r1035@denkpolster: jan | 2008-04-02 14:39:05 +0200 - fix unit tests with py-0.9.1, fixes #17
+* r1081@denkpolster: jan | 2008-04-04 18:48:20 +0200 - fix for SQLAlchemy deprecation warning when creating version table
+* r1035@denkpolster: jan | 2008-04-02 14:39:05 +0200 - fix unit tests with py-0.9.1, fixes #17
* code reorg: create new utility method loadModel for db diffing
* - patch by pwannygoodness for Issue #15 integrated
* - merge CHANGELOG from branch bugfix-0_4_2 to trunk - increase trunk and branch bugfix-0_4_2 version numbers - rename branch bugfix-0_4_2 to bugfix-0_4_3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/PKG-INFO new/sqlalchemy-migrate-0.11.0/PKG-INFO
--- old/sqlalchemy-migrate-0.10.0/PKG-INFO 2015-08-31 23:05:45.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/PKG-INFO 2017-03-01 15:02:53.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: sqlalchemy-migrate
-Version: 0.10.0
+Version: 0.11.0
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.10.0/migrate/changeset/schema.py new/sqlalchemy-migrate-0.11.0/migrate/changeset/schema.py
--- old/sqlalchemy-migrate-0.10.0/migrate/changeset/schema.py 2015-08-31 23:04:29.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/migrate/changeset/schema.py 2017-03-01 15:01:25.000000000 +0100
@@ -353,8 +353,14 @@
self.process_column(self.result_column)
# create an instance of class type if not yet
- if 'type' in diffs and callable(self.result_column.type):
- self.result_column.type = self.result_column.type()
+ if 'type' in diffs:
+ if callable(self.result_column.type):
+ self.result_column.type = self.result_column.type()
+ if self.result_column.autoincrement and \
+ not issubclass(
+ self.result_column.type._type_affinity,
+ sqlalchemy.Integer):
+ self.result_column.autoincrement = False
# add column to the table
if self.table is not None and self.alter_metadata:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/migrate/exceptions.py new/sqlalchemy-migrate-0.11.0/migrate/exceptions.py
--- old/sqlalchemy-migrate-0.10.0/migrate/exceptions.py 2015-08-31 23:04:29.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/migrate/exceptions.py 2017-03-01 15:01:25.000000000 +0100
@@ -27,6 +27,10 @@
"""Invalid version number."""
+class VersionNotFoundError(KeyError):
+ """Specified version is not present."""
+
+
class DatabaseNotControlledError(ControlledSchemaError):
"""Database should be under version control, but it's not."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/migrate/tests/changeset/test_changeset.py new/sqlalchemy-migrate-0.11.0/migrate/tests/changeset/test_changeset.py
--- old/sqlalchemy-migrate-0.10.0/migrate/tests/changeset/test_changeset.py 2015-08-31 23:04:29.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/migrate/tests/changeset/test_changeset.py 2017-03-01 15:01:25.000000000 +0100
@@ -687,12 +687,25 @@
self.assertTrue(isinstance(self.table.c.id.type, Integer))
self.assertEqual(self.table.c.id.nullable, False)
+ # SQLAlchemy 1.1 adds a third state to "autoincrement" called
+ # "auto".
+ self.assertTrue(self.table.c.id.autoincrement in ('auto', True))
+
if not self.engine.name == 'firebird':
self.table.c.id.alter(type=String(20))
self.assertEqual(self.table.c.id.nullable, False)
+
+ # a rule makes sure that autoincrement is set to False
+ # when we change off of Integer
+ self.assertEqual(self.table.c.id.autoincrement, False)
self.refresh_table(self.table.name)
self.assertTrue(isinstance(self.table.c.id.type, String))
+ # note that after reflection, "autoincrement" is likely
+ # to change back to a database-generated value. Should be
+ # False or "auto". if True, it's a bug; at least one of these
+ # exists prior to SQLAlchemy 1.1.3
+
@fixture.usedb()
def test_default(self):
"""Can change a column's server_default value (DefaultClauses only)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/migrate/tests/versioning/test_version.py new/sqlalchemy-migrate-0.11.0/migrate/tests/versioning/test_version.py
--- old/sqlalchemy-migrate-0.10.0/migrate/tests/versioning/test_version.py 2015-08-31 23:04:29.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/migrate/tests/versioning/test_version.py 2017-03-01 15:01:25.000000000 +0100
@@ -103,6 +103,10 @@
self.assertEqual(coll.latest, 4)
self.assertEqual(len(coll.versions), 4)
self.assertEqual(coll.version(4), coll.version(coll.latest))
+ # Check for non-existing version
+ self.assertRaises(VersionNotFoundError, coll.version, 5)
+ # Check for the current version
+ self.assertEqual('4', coll.version(4).version)
coll2 = Collection(self.temp_usable_dir)
self.assertEqual(coll.versions, coll2.versions)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/migrate/versioning/util/__init__.py new/sqlalchemy-migrate-0.11.0/migrate/versioning/util/__init__.py
--- old/sqlalchemy-migrate-0.10.0/migrate/versioning/util/__init__.py 2015-08-31 23:04:29.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/migrate/versioning/util/__init__.py 2017-03-01 15:01:25.000000000 +0100
@@ -33,7 +33,14 @@
warnings.warn('model should be in form of module.model:User '
'and not module.model.User', exceptions.MigrateDeprecationWarning)
dotted_name = ':'.join(dotted_name.rsplit('.', 1))
- return EntryPoint.parse('x=%s' % dotted_name).load(False)
+
+ ep = EntryPoint.parse('x=%s' % dotted_name)
+ if hasattr(ep, 'resolve'):
+ # this is available on setuptools >= 10.2
+ return ep.resolve()
+ else:
+ # this causes a DeprecationWarning on setuptools >= 11.3
+ return ep.load(False)
else:
# Assume it's already loaded.
return dotted_name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/migrate/versioning/version.py new/sqlalchemy-migrate-0.11.0/migrate/versioning/version.py
--- old/sqlalchemy-migrate-0.10.0/migrate/versioning/version.py 2015-08-31 23:04:29.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/migrate/versioning/version.py 2017-03-01 15:01:25.000000000 +0100
@@ -156,11 +156,22 @@
self.versions[ver].add_script(filepath)
def version(self, vernum=None):
- """Returns latest Version if vernum is not given.
- Otherwise, returns wanted version"""
+ """Returns required version.
+
+ If vernum is not given latest version will be returned otherwise
+ required version will be returned.
+ :raises: : exceptions.VersionNotFoundError if respective migration
+ script file of version is not present in the migration repository.
+ """
if vernum is None:
vernum = self.latest
- return self.versions[VerNum(vernum)]
+
+ try:
+ return self.versions[VerNum(vernum)]
+ except KeyError:
+ raise exceptions.VersionNotFoundError(
+ ("Database schema file with version %(args)s doesn't "
+ "exist.") % {'args': VerNum(vernum)})
@classmethod
def clear(cls):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/requirements.txt new/sqlalchemy-migrate-0.11.0/requirements.txt
--- old/sqlalchemy-migrate-0.10.0/requirements.txt 2015-08-31 23:04:29.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/requirements.txt 2017-03-01 15:01:25.000000000 +0100
@@ -1,7 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-pbr>=1.3,<2.0
+pbr>=1.8
# never put a cap on this, *ever*, sqla versions are handled via
# tox, and if SQLA is capped it will only make it so we aren't testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/setup.cfg new/sqlalchemy-migrate-0.11.0/setup.cfg
--- old/sqlalchemy-migrate-0.10.0/setup.cfg 2015-08-31 23:05:45.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/setup.cfg 2017-03-01 15:02:53.000000000 +0100
@@ -35,7 +35,6 @@
source-dir = doc/source
[egg_info]
-tag_date = 0
-tag_svn_revision = 0
tag_build =
+tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/sqlalchemy_migrate.egg-info/PKG-INFO new/sqlalchemy-migrate-0.11.0/sqlalchemy_migrate.egg-info/PKG-INFO
--- old/sqlalchemy-migrate-0.10.0/sqlalchemy_migrate.egg-info/PKG-INFO 2015-08-31 23:05:45.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/sqlalchemy_migrate.egg-info/PKG-INFO 2017-03-01 15:02:52.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: sqlalchemy-migrate
-Version: 0.10.0
+Version: 0.11.0
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.10.0/sqlalchemy_migrate.egg-info/SOURCES.txt new/sqlalchemy-migrate-0.11.0/sqlalchemy_migrate.egg-info/SOURCES.txt
--- old/sqlalchemy-migrate-0.10.0/sqlalchemy_migrate.egg-info/SOURCES.txt 2015-08-31 23:05:45.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/sqlalchemy_migrate.egg-info/SOURCES.txt 2017-03-01 15:02:53.000000000 +0100
@@ -129,4 +129,5 @@
sqlalchemy_migrate.egg-info/pbr.json
sqlalchemy_migrate.egg-info/requires.txt
sqlalchemy_migrate.egg-info/top_level.txt
-tools/pretty_tox.sh
\ No newline at end of file
+tools/pretty_tox.sh
+tools/test-setup.sh
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/sqlalchemy_migrate.egg-info/pbr.json new/sqlalchemy-migrate-0.11.0/sqlalchemy_migrate.egg-info/pbr.json
--- old/sqlalchemy-migrate-0.10.0/sqlalchemy_migrate.egg-info/pbr.json 2015-08-31 23:05:45.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/sqlalchemy_migrate.egg-info/pbr.json 2017-03-01 15:02:52.000000000 +0100
@@ -1 +1 @@
-{"git_version": "fe3e08a", "is_release": true}
\ No newline at end of file
+{"git_version": "ca6f3a9", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/sqlalchemy_migrate.egg-info/requires.txt new/sqlalchemy-migrate-0.11.0/sqlalchemy_migrate.egg-info/requires.txt
--- old/sqlalchemy-migrate-0.10.0/sqlalchemy_migrate.egg-info/requires.txt 2015-08-31 23:05:45.000000000 +0200
+++ new/sqlalchemy-migrate-0.11.0/sqlalchemy_migrate.egg-info/requires.txt 2017-03-01 15:02:52.000000000 +0100
@@ -1,4 +1,4 @@
-pbr>=1.3,<2.0
+pbr>=1.8
SQLAlchemy>=0.7.8,!=0.9.5
decorator
six>=1.7.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlalchemy-migrate-0.10.0/tools/test-setup.sh new/sqlalchemy-migrate-0.11.0/tools/test-setup.sh
--- old/sqlalchemy-migrate-0.10.0/tools/test-setup.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/sqlalchemy-migrate-0.11.0/tools/test-setup.sh 2017-03-01 15:01:25.000000000 +0100
@@ -0,0 +1,54 @@
+#!/bin/bash -xe
+
+# This script will be run by OpenStack CI before unit tests are run,
+# it sets up the test system as needed.
+# Developers should setup their test systems in a similar way.
+
+# This setup needs to be run as a user that can run sudo.
+
+# The root password for the MySQL database; pass it in via
+# MYSQL_ROOT_PW.
+DB_ROOT_PW=${MYSQL_ROOT_PW:-insecure_slave}
+
+# This user and its password are used by the tests, if you change it,
+# your tests might fail.
+DB_USER=openstack_citest
+DB_PW=openstack_citest
+
+sudo -H mysqladmin -u root password $DB_ROOT_PW
+
+# It's best practice to remove anonymous users from the database. If
+# an anonymous user exists, then it matches first for connections and
+# other connections from that host will not work.
+sudo -H mysql -u root -p$DB_ROOT_PW -h localhost -e "
+ DELETE FROM mysql.user WHERE User='';
+ FLUSH PRIVILEGES;
+ GRANT ALL PRIVILEGES ON *.*
+ TO '$DB_USER'@'%' identified by '$DB_PW' WITH GRANT OPTION;"
+
+# Now create our database.
+mysql -u $DB_USER -p$DB_PW -h 127.0.0.1 -e "
+ SET default_storage_engine=MYISAM;
+ DROP DATABASE IF EXISTS openstack_citest;
+ CREATE DATABASE openstack_citest CHARACTER SET utf8;"
+
+# Same for PostgreSQL
+
+# Setup user
+root_roles=$(sudo -H -u postgres psql -t -c "
+ SELECT 'HERE' from pg_roles where rolname='$DB_USER'")
+if [[ ${root_roles} == *HERE ]];then
+ sudo -H -u postgres psql -c "ALTER ROLE $DB_USER WITH SUPERUSER LOGIN PASSWORD '$DB_PW'"
+else
+ sudo -H -u postgres psql -c "CREATE ROLE $DB_USER WITH SUPERUSER LOGIN PASSWORD '$DB_PW'"
+fi
+
+# Store password for tests
+cat << EOF > $HOME/.pgpass
+*:*:*:$DB_USER:$DB_PW
+EOF
+chmod 0600 $HOME/.pgpass
+
+# Now create our database
+psql -h 127.0.0.1 -U $DB_USER -d template1 -c "DROP DATABASE IF EXISTS openstack_citest"
+createdb -h 127.0.0.1 -U $DB_USER -l C -T template0 -E utf8 openstack_citest