Commit Graph

500 Commits

Author SHA1 Message Date
Tony Breeds 76101bb664 Retire Packaging Deb project repos
This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).

Change-Id: I16f8840c9d0aacfd33e84ae0ab91085b5710a5a7
2017-09-12 15:41:03 -06:00
Haikel Guemar 02c26a2ced Enforce that pbr used is >= 1.8
It otherwise fails if used against older pbr (e.g distro packaging build)

Change-Id: I19dbd5d14a9135408ad21a34834f0bd1fb3ea55d
2017-04-07 15:59:23 +02:00
Jenkins 9a7a37fba4 Merge "Fix spelling mistake" 2017-03-24 21:23:38 +00:00
Tony Breeds ca6f3a93b5 Use a modern PBR package
The 2.0.0 is breaking in that it removes the use of warnerrors in
build_sphinux.

sqlalchemy-migrate isn't using that feature, so it shoudln't break.

The cap on pbr is preventing other OpenStack projects that would like to
use pbr 2.0.0 (and sphinx 1.5.1) from doing so as it breaks
co-installability with sqlalchemy-migrate

Change-Id: I1c907201c717fe42caca24831985a119f2a1738b
Related-Bug: 1668848
2017-03-01 16:29:33 +11:00
Jenkins b45033de73 Merge "Prepare for using standard python tests" 2017-02-09 18:06:50 +00:00
Andreas Jaeger 7fc88b35e8 Prepare for using standard python tests
Add simple script to setup mysql and postgresql databases, this script
can be run by users during testing and will be run by CI systems for
specific setup before running unit tests.

This allows to change in project-config the python-db jobs to
python-jobs since python-jobs will call this script initially.

See also
http://lists.openstack.org/pipermail/openstack-dev/2016-November/107784.html

Needed-By: I46d883ce1b25338d01a2b0e2b071b15adab00520
Change-Id: I8c5015616a5a12501edd16932d4148930c01a06b
2017-02-09 06:49:29 +01:00
Jenkins e1a8ec708a Merge "Update .gitreview for new namespace" 2017-02-01 21:00:20 +00:00
dineshbhor 09ec8f7816 Fix spelling mistake
TrivialFix

Change-Id: I089d9e8b57895d9878bf82d2fac397722fccc083
2016-10-26 19:57:24 +05:30
Mike Bayer e9175a37ce Set autoincrement to False when modifying to non-Integer datatype
Starting in SQLAlchemy 1.1, the rules for when "autoincrement=True"
may be set on a column are more strict.  The migrate tests are
testing the alteration of a column from Integer to String
and then regenerating; this means we need to set autoincrement
to False as well.   A related issue in SQLAlchemy 1.1 is
also being fixed (see https://bitbucket.org/zzzeek/sqlalchemy/issues/3835/),
however this fix is not needed in order for the tests to pass here.

Change-Id: Ibd3a75fff13312411df87e17b6e5764865d69728
2016-10-20 17:47:19 -04:00
Jenkins d58469a6ae Merge "Raise VersionNotFoundError instead of KeyError" 2016-06-03 13:45:36 +00:00
dineshbhor 2a32681036 Raise VersionNotFoundError instead of KeyError
Currently migrate.versioning.api.upgrade() raises KeyError
instead of sqlalchemy-migrate specific exception if migration
script file is not present in migration repository.

Raised migrate.exception.VersionNotFoundError if the specified
migration script does not exist in the repository. Made
VersionNotFoundError exception class as a subclass of KeyError
in order to avoid breaking existing users looking for KeyError.

Related-Bug: #1546441
Change-Id: I0210d56a6e85f03c44cea027f50863faaf050c1d
2016-05-27 11:57:24 +05:30
dineshbhor 9356e5e28a Fix DeprecationWarning on setuptools >= 11.3
Python 3.4 unit test is failing because of
DeprecationWarning: Parameters to load are deprecated.
Called .resolve and .require separately on setuptools >= 11.3.

Made provision to call .resolve() method if setuptools >= 10.2
and less than 11.3 else call .load() method.

Change-Id: I5ba80edfbf6b7c8399c66f01d57c91bd02eab274
Closes-Bug: #1586060
2016-05-26 20:12:25 +05:30
Jeremy Stanley 00eb42318b Update .gitreview for new namespace
Change-Id: Ie13030d01b439115f0e8f0e8b8ea1844d99644ee
2015-10-17 22:38:53 +00:00
Jenkins fe3e08ae0b Merge "Update URLs in documentation" 2015-08-29 14:27:46 +00:00
Victor Stinner 5cf4071e37 Update URLs in documentation
* online doc moved from http://packages.python.org/sqlalchemy-migrate/
  to https://sqlalchemy-migrate.readthedocs.org/
* source code moved from http://code.google.com/p/sqlalchemy-migrate/
  to https://github.com/stackforge/sqlalchemy-migrate
* bug tracker moved from
  http://code.google.com/p/sqlalchemy-migrate/issues/list to
  https://bugs.launchpad.net/sqlalchemy-migrate

Change-Id: I2db594d279e1229e5b1600cecad86fe0c3612115
2015-08-29 06:33:47 -07:00
Jenkins 3c7ac7559c Merge "Add VerNum.__index__() for Python 3 support" 2015-07-31 02:11:27 +00:00
Victor Stinner 1384e901b0 Add VerNum.__index__() for Python 3 support
On Python 3, some functions like range() don't try to call the __int__()
method to cast an object to integer, but try instead the __index__()
method.

Add an __index__() method to mimick correctly the int type on Python 3.

Change-Id: I8df116d80e201778714a59367600eaef644266ed
2015-07-28 12:56:52 +02:00
Thomas Goirand fb55b01a9a Fixes usage function for Py3
The usage function of migrate_repository.py isn't Python 3 compatible,
and this hasn't be caught by unit tests. This patch fixes the function,
so at least the file can be compiled in Py3.

Change-Id: Ib9333e46e7526e82acde573d4b2046b2bf9a7ae0
2015-07-22 18:03:34 +00:00
Matt Riedemann 8252703f56 Unblock migrate (py26 and py3* testing issues)
There are two changes which have to go together to pass the gate
tests:

1. Update pbr and mock requirements from global-requirements

mock 1.2 supports py26 again so make that the minimum version. The
same change is being made in g-r with:

Ic6b9e18eaec9c81bbbbc57129e024904be928e09

Sync up with latest pbr in global-requirements while we're at it.

Closes-Bug: #1474925

2. Fix the importpath module to work with python >= 3.3 where the
__import__ built-in is raising an ImportError on a temporary file
that is added to the system path.

Closes-Bug: #1475339

Change-Id: Ie98938ba75f3983094dd540b7d26a7ec46be4f6e
2015-07-18 10:39:35 -07:00
Matt Riedemann 050b646e86 Revert "Revert "uncap pbr and sqla requirements""
This reverts commit e4d0e5be8d

Now that flake8-related dependencies have been updated in the
dependent change the pep8 job is fixed.

Change-Id: Idfa6a18836d7ce02dfaa5d9da1a51c98ad987f51
2015-07-05 06:47:03 -07:00
Matt Riedemann dc07f8de8f Update flake8 related dependencies
In order to raise the cap on pbr we need to update
the dependent versions of the flake8 related packages
for the pep8 job since they have capped pbr.

A couple of simple hacking issues are fixed, the rest
are ignored.

Change-Id: Icddb5bf284da7b6463ebcfc7512726149ffe6085
2015-07-05 06:44:03 -07:00
Jenkins d4e6d892ae Merge "Add Python 3 classifiers" 2015-07-04 16:46:48 +00:00
Matt Riedemann e4d0e5be8d Revert "uncap pbr and sqla requirements"
This reverts commit 35832555c5

The non-voting pep8 job was failing due a VersionConflict
with pbr, so this shouldn't have been merged.

Change-Id: I4917b92121cac524fd89575f30d72d7319cbe20c
2015-07-04 14:12:55 +00:00
Sean Dague 35832555c5 uncap pbr and sqla requirements
The cap of pbr causes issues now that pbr 1.2 is basically needed for
a lot of projects to do the right thing with requirements ranges. The
sqla capping is preventing new versions of sqla to be used in the
OpenStack gates, and shouldn't be capped by a library.

Change-Id: I5fc142eb8c9d616db2ed9b2f3e4e4d1147e131ff
2015-07-02 14:07:37 -07:00
Mike Bayer a94dae7a01 Update tests and reqs for SQLA 1.0
Lift the requirements to support SQLAlchemy 1.0.  Two tests
were calling upon revised APIs and required adjustment.

Change-Id: Ic91a91bb3c915027b522eace302f2ed074233294
2015-07-01 20:01:52 +00:00
Mike Bayer b8def7cbfb Ignore stderr output when invoking migrate script in tests
Under Python 2.6 a setuptools warning is produced when
the migrate runner runs.  Since migrate invokes its own
commandline client from tests in a separate shell, the
fixture we're using to do that must be told not to complain
about this stderr.

Change-Id: Ib5823754d6ffabe954665f2a7529ed0e56591ebf
2015-07-01 11:27:15 -04:00
Victor Stinner d651f123b9 Add Python 3 classifiers
sqlachemy-migrate works on Python 3.3 and Python 3.4: announce it in
classifiers in setup.cfg.

Change-Id: Ibb2a803941dcc7b05efd407692b3627203ba2afe
2015-04-17 09:48:17 +02:00
Qin Zhao e57ee4c3a4 Fix ibmdb2 index name handling
The ibmdb2 code calls _index_identifier() when it handles index name. This
method only exists from sqlalchemy 0.6.5 to 0.7.*. Nova code change
https://review.openstack.org/#/c/153123/ attempts to drop a db constraint and
it fails to sync nova db with sqlalchemy 0.9.8 running against db2. Need to let
ibmdb2 code identify sqlalchemy version and call the correct method to handle
index name.

Closes-Bug: 1428477

Change-Id: Ie6333f9cea0209c1ea290356873a1a1bcf409bed
2015-03-16 15:21:03 +00:00
Jenkins 8a638ce9d6 Merge "Don't run the test if _setup() fails" 2015-02-24 23:07:21 +00:00
Jenkins 24521798bc Merge "script: strip comments in SQL statements" 2015-02-24 23:05:33 +00:00
Jenkins bf40e79a6a Merge "Fix .gitignore for .tox and .testrepository" 2015-02-24 19:30:30 +00:00
Roman Podoliaka 5feeaba69f Don't run the test if _setup() fails
Change-Id: I2c89c98961044f0e0a1d9b4c2eeea190c5830eed
2015-02-23 17:03:25 +02:00
Yuval Langer c8c5c4bdd8 Correcting minor typo
Change-Id: Ib8b897414039224971a1535c268c8a21fc3534fb
2015-02-22 14:03:55 +02:00
Matt Riedemann 9d212e6fb9 Fix .gitignore for .tox and .testrepository
The entries for tox and testrepository weren't
working with `git clean -df` so this updates them
to match what's in nova's .gitignore. Testing
manually shows this doesn't blast those directories
when running git clean.

Change-Id: Iba569afabea748369f76351bf5521ca1c0fdce0c
Closes-Bug: #1423983
2015-02-20 10:43:00 -08:00
Matt Riedemann ae64d828df allow dropping fkeys with sqlite
This implements the ability to drop foreign keys
with sqlite. It's basically the same implementation
used for dropping unique constraints so the common
code is refactored.

The existing FKey test that was skipping sqlite is
no longer skipped to show this works.

Change-Id: Idaaf4229e34af4c21c3bcead4b4e22491d24238e
Closes-Bug: #1423955
2015-02-20 10:04:35 -08:00
Mike Bayer 997855db3b Add pretty_tox setup
This changeset adds the pretty_tox script runner to SQLAlchemy-migrate,
so that current test runs can be viewed clearly.

Change-Id: I3884703e24cb636983a0202c46899c772419d401
2015-01-29 15:19:02 -05:00
Jenkins 75034abe51 Merge "Update requirements file matching global requ" 2015-01-27 15:20:40 +00:00
Jenkins 6aca7a17fc Merge "Work toward Python 3.4 support and testing" 2015-01-15 23:04:03 +00:00
Jenkins 0a618361ba Merge "Fixes the auto-generated manage.py" 2015-01-15 22:53:59 +00:00
Jenkins a15a7cec42 Merge "Replace assertNotEquals with assertNotEqual." 2015-01-15 22:18:05 +00:00
Ihar Hrachyshka b9caaae4fc script: strip comments in SQL statements
Regular expression does not match correctly against statements that contain
comments at their start. So strip those comments first (and whitespaces, while
we are at it).

Change-Id: Iad9b544bf995374d76cab1e125658aae2f8511f4
Closes-Bug: #1410494
2015-01-14 01:45:25 +01:00
Monty Taylor b011e6cb39 Remove svn version tag setting
This is confusing our poor friend setuptools into appending a post0 on
to release versions.

Change-Id: I59a763f00f47d9a2fb0d26428a41fee82deff49d
2015-01-12 16:21:02 -08:00
Jenkins 25c7d750f5 Merge "pep8: mark all pep8 checks that currently fail as ignored" 2015-01-11 10:38:02 +00:00
Jenkins 397682b9c8 Merge "Use native sqlalchemy 0.9 quote attribute with ibmdb2" 2015-01-10 00:03:23 +00:00
Ihar Hrachyshka 938757e7aa Ignore transaction management statements in SQL scripts
Now that we don't run SQL script with a single .execute() call,
transaction management statements (BEGIN, COMMIT, END) fail with
operational error. Ignore them if occurred in a script.

All in all, transactions are managed by SQLAlchemy-migrate itself, so
there is no reason for the calling code to pass those statements in a
SQL script. Warn user about the statements that are ignored.

The ideal response to such a warning from library users is removing
those redundant transaction management statements from their scripts.

Note: ROLLBACK is not ignored even though it's one of transaction
management statements because its usage in migration scripts is insane
anyway, and we're better fail on it and not (almost) silently ignore it.

Change-Id: Ie4179c0e9341d42656d66821aaac23f8dcd33927
Closes-bug: 1368391
2015-01-09 14:32:27 -08:00
Rahul Priyadarshi 74553f426c Use native sqlalchemy 0.9 quote attribute with ibmdb2
Commit 8d6ce64cd0 started using the native
quote attribute built into sqlalchemy 0.9 but missed the changes to the
ibmdb2 changeset, so alter table statements fail for DB2 on sqlalchemy
>= 0.9 (tested against 0.9.8).

This fixes the same issue for the ibmdb2 changeset.

Change-Id: Ia3fa6c3090b5eab29ed7746f4795d502990b8a2f
2015-01-09 14:31:28 -08:00
Brant Knudson 244c6c55d7 Don't add warnings filter on import
The changeset module was adding a warnings filter on import. This
affects all applications that wind up importing it. A library
shouldn't modify the warnings filters unless asked.

Closes-Bug: #1407736
Change-Id: I893f8be48efd3d3642e977ab587c9e6dc867258b
2015-01-08 16:22:59 -06:00
Cyril Roelandt 677f374a68 Replace assertNotEquals with assertNotEqual.
The former is deprecated and the latter should be used.

Change-Id: I9d6dca41cb737062e6d4467c24dbc88901ab9a14
2014-10-30 08:56:50 +01:00
Jenkins 1e83840c98 Merge "Fix ibmdb2 unique constraint handling for sqlalchemy 0.9" 2014-10-10 12:32:25 +00:00
Longgeek cee9136256 Update requirements file matching global requ
* update the pbr version
* update the sqlalchemy version

Change-Id: I21364e2b00d0d5cb9428f8ede1ca0e14aad390fc
2014-09-12 19:52:02 +08:00