Commit Graph

525 Commits

Author SHA1 Message Date
Sean Mooney 5d1f322542 remove inspect.getargspec deprecation warning
In python 3 inspect.getargspec is deprecated and
replaced with inspect.getfullargspec which does not
exist on python 2.7. This change uses six to select
the correct version to use based on the python version
used.

Change-Id: I234a3509ff850d0c5616ebcfa240212b03db9e76
Closes-Bug: #1814288
2019-09-17 02:05:19 +01:00
Mike Bayer 971b9e62df Use engine.connect(); don't use private _run_visitor method
SQLAlchemy 1.3 has deprecated engine.contextual_connect() which
will be removed in 1.4.   Additionally, private methods like
Engine._run_visitor will also be removed.

Change-Id: I319785d7dd83ffe2c6e651a2494b073becc84684
2019-07-16 09:39:49 -04:00
Matt Riedemann 67d2bb2616 Claim support for python 3.6
This adds the voting and gating openstack-tox-py36 job
and adds python 3.6 to the classifiers list.

Change-Id: Ida2349de534399103e5d6f294a7e771910188ee4
2019-07-10 14:15:58 -04:00
Matt Riedemann 578f533cb8 Claim support for python 3.5
This makes the openstack-tox-py35 job voting and gating
and adds python 3.5 to the classifiers list.

Change-Id: I11c8cd0e33e0609d740f5742096438a2395b28ed
2019-07-10 14:15:49 -04:00
Matt Riedemann 1cc62d6ea2 Remove test-requirements-py*.txt files
We can control python version sensitive dependencies
in the single test-requirements.txt file so we can
drop the version-specific files. This should also make
the openstack-tox-py35 job start passing.

Change-Id: Ic3fa2c4417092e387ac5d177be75a22050a6f857
2019-07-10 14:15:39 -04:00
Matt Riedemann 3ee28fe67b Add bindep support
This adds a minimal bindep.txt to install mysql and postgresql
dependencies (copied from nova's bindep.txt). This is needed
now to get python jobs (pep8,py27,etc) working in the gate.

Change-Id: I4b7bccdb7cebd95753e8cd931846213f400aa652
Closes-Bug: #1836087
2019-07-10 12:14:20 -04:00
Matt Riedemann 078ffc62da Remove py26 tox targets
Support for python 2.6 was dropped in commit
8266c8dec0 but the
tox targets were missed, so they are removed here.

Change-Id: I2271717ce4a35183d2b773063564cbaf774fdfb0
2019-05-15 18:33:43 -04:00
Zuul 421e860222 Merge "Import zuul jobs" 2019-05-15 22:27:31 +00:00
Zuul 3239c42b69 Merge "Use mysqlclient" 2019-05-15 20:11:24 +00:00
Andreas Jaeger e922c240c5 Import zuul jobs
Add the project-specific tox py27sa07 job to this repo, convert it
from legacy-sqlalchemy-migrate-tox-py27sa07 to Zuul v3.

Also, import other jobs from project-config so that the jobs
are managed by the team in-tree.

Change-Id: I9296b3e40246ab89655411b660c5ba45bc9cf2ff
2019-05-15 21:30:05 +02:00
Zuul e85f8ba65a Merge "Fix docs build" 2019-05-15 19:08:48 +00:00
Andreas Jaeger abb234e1f2 Fix docs build
Fixes for docs build:
* Use doc/requirements to follow changes in OpenStack CI for the docs
  building, add a tox environment for this.
* Remove reference to "project's download page", the link was removed in
  change I2db594d279e1229e5b1600cecad86fe0c3612115 and now we have a
  dead link that errors building if warnings are treated as errors.
* Change I2db594d279e1229e5b1600cecad86fe0c3612115 added a column for
  DB2 header but not for any entries, enhance table with extra column.
  This fixes building of the table if warnings are treated as errors.
* Update to sphinx 1.6.x since that is what is used in OpenStack CI job,
  remove issuetracker, it does not work with sphinx 1.6 anymore.
* Disable html_static_path - the content does not exist
* Use python3 for docs building

Change-Id: I76ee4d6dc45f9b04115f093951ae8b745f3ac026
2019-05-15 10:49:02 +02:00
OpenDev Sysadmins 8c90555e9c OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:50:22 +00:00
Matt Riedemann 8acab2cd75 Change title in README.rst
This is needed to be able to release to pypi:

$ python3 setup.py check --restructuredtext --strict
running check
warning: check: Duplicate implicit target name: "sqlalchemy-migrate".

Change-Id: I26dd765a5273199d6666dd9ed618dc8189a2e8ed
2019-01-22 09:02:49 -05:00
Zuul f0664995a1 Merge "Import MutableMapping from the correct Python module" 2019-01-21 22:17:29 +00:00
Zuul 6803334bb1 Merge "Don't use deprecated / non-functional "force" parameter" 2019-01-21 22:13:03 +00:00
Mike Bayer fe64667106 Don't use deprecated / non-functional "force" parameter
The "force" parameter in SQLAlchemy IdentifierPreparer.quote()
has been a no-op since 0.9 in
031ef08078,
which was six years ago.   In SQLAlchemy 1.3 this parameter
will be removed entirely.   Bump requirements to 0.9 series
here and remove usage of the "force" flag.

Change-Id: I4492df2e7d2075fefbf13d6782de11f7d402f6b8
2019-01-18 13:11:40 -05:00
Mike Bayer 851bd217a0 Use mysqlclient
The test requirement for MySQL-Python refers to a package that
has had no releases since 2014 and no longer builds on some MySQL /
MariaDB variants.  MySQL-Python has for years been superseded by
the mysqlclient fork which is actively maintained.   mysqlclient
may at some point be allowed to take over the MySQL-Python name
as per PEP-541 however this hasn't happened yet.

Change-Id: I67dd2338dc74e59c2deb2f1bd1b848e3c63e10e8
2019-01-16 16:08:25 -05:00
Corey Bryant 231a4d2ae9 Use legacy_alter_table ON in sqlite recreate_table
Use "PRAGMA legacy_alter_table = ON" with sqlite >= 3.26 when
using "ALTER TABLE RENAME TO migration_tmp" to maintain legacy
behavior.

As of sqlite version 3.26, when a table is renamed using
"ALTER TABLE RENAME TO", REFERENCES clauses that refer to the
table will be updated. To maintain legacy (3.24 and earlier)
behavior, "PRAGMA legacy_alter_table" can be set to true and
"PRAGMA foreign_keys" can be set to false. [1]

[1] https://www.sqlite.org/src/info/ae9638e9c0ad0c36

Thanks to "László Böszörményi (GCS)" <gcs@debian.org> for
providing the code for this patch, which has since been
slightly modified.

Change-Id: I539988ab2ad6df6c8f423ecec15364ad8fcc7267
Closes-Bug: 1807262
2019-01-15 22:01:26 +00:00
Zuul 8fd7226f18 Merge "Add .eggs in .gitignore" 2019-01-15 20:14:08 +00:00
Zuul fb138f6de7 Merge "Remove py26 support" 2019-01-15 20:14:08 +00:00
Anusree 8266c8dec0 Remove py26 support
As of mitaka, the infra team won't have the resources available to
reasonably test py26, also the oslo team is dropping py26 support
from their libraries. sine we rely on oslo for a lot of our work,
and depend on infra for our CI, we should drop py26 support too.

Change-Id: I6af3716f5daf73febdabcd79853a09512428c289
Closes-Bug: 1519510
2019-01-15 18:25:36 +00:00
Nicola Soranzo d45ea279b9 Add .eggs in .gitignore
Change-Id: Ia7738e03aff843b1b120c0d5d13a7b64f2f33201
2019-01-15 18:24:57 +00:00
Chih-Hsuan Yen a00dab7bcf Import MutableMapping from the correct Python module
Change-Id: Ifb66fe22bc607b13f5c4756d3b93f5e8206c33e3
2019-01-15 18:16:06 +00:00
Jonathan Herlin 9f0bda970d Update mailinglist from dev to discuss
openstack-dev was decomissioned this night in https://review.openstack.org/621258
Update openstack-dev to openstack-discuss

Change-Id: Ic84b2422d37aa1ebb443fff4152c7ebe5a098566
2019-01-15 17:38:52 +00:00
Chih-Hsuan Yen f44d07956a Get rid of psycopg2 warnings by disabling wheels
The psycopg2 wheel package warnings are causing some tests
to fail which expect there to be no stderr output. This fixes
the problem by not using the wheel binary for that package.

Closes-Bug: #1811876

Change-Id: Id43e74d8d343ab4e80d1d246543bada1ed4d06ad
2019-01-15 17:35:30 +00: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