summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pre-commit-config.yaml35
-rw-r--r--.zuul.yaml2
-rw-r--r--CONTRIBUTING.rst5
-rw-r--r--babel.cfg1
-rw-r--r--doc/requirements.txt6
-rw-r--r--[-rwxr-xr-x]doc/source/conf.py31
-rw-r--r--doc/source/index.rst6
-rw-r--r--lower-constraints.txt16
-rw-r--r--oslo_db/tests/sqlalchemy/test_utils.py2
-rw-r--r--releasenotes/source/conf.py8
-rw-r--r--releasenotes/source/index.rst1
-rw-r--r--releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po7
-rw-r--r--releasenotes/source/victoria.rst6
-rw-r--r--setup.cfg16
-rw-r--r--test-requirements.txt8
-rwxr-xr-xtools/test-setup.sh4
-rw-r--r--tox.ini2
17 files changed, 95 insertions, 61 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..9d94556
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,35 @@
+# We from the Oslo project decided to pin repos based on the
+# commit hash instead of the version tag to prevend arbitrary
+# code from running in developer's machines. To update to a
+# newer version, run `pre-commit autoupdate` and then replace
+# the newer versions with their commit hash.
+
+default_language_version:
+ python: python3
+
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: ebc15addedad713c86ef18ae9632c88e187dd0af # v3.1.0
+ hooks:
+ - id: trailing-whitespace
+ # Replaces or checks mixed line ending
+ - id: mixed-line-ending
+ args: ['--fix', 'lf']
+ exclude: '.*\.(svg)$'
+ # Forbid files which have a UTF-8 byte-order marker
+ - id: check-byte-order-marker
+ # Checks that non-binary executables have a proper shebang
+ - id: check-executables-have-shebangs
+ # Check for files that contain merge conflict strings.
+ - id: check-merge-conflict
+ # Check for debugger imports and py37+ breakpoint()
+ # calls in python source
+ - id: debug-statements
+ - id: check-yaml
+ files: .*\.(yaml|yml)$
+ - repo: https://gitlab.com/pycqa/flake8
+ rev: 181bb46098dddf7e2d45319ea654b4b4d58c2840 # 3.8.3
+ hooks:
+ - id: flake8
+ additional_dependencies:
+ - hacking>=3.0.1,<3.1.0
diff --git a/.zuul.yaml b/.zuul.yaml
index 2c16442..1155b74 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -3,7 +3,7 @@
- check-requirements
- lib-forward-testing-python3
- openstack-lower-constraints-jobs
- - openstack-python3-victoria-jobs
+ - openstack-python3-wallaby-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 88a37f4..03ab07e 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -1,3 +1,8 @@
+If you would like to contribute to the development of oslo's libraries,
+first you must take a look to this page:
+
+ https://specs.openstack.org/openstack/oslo-specs/specs/policy/contributing.html
+
=================
How to contribute
=================
diff --git a/babel.cfg b/babel.cfg
deleted file mode 100644
index efceab8..0000000
--- a/babel.cfg
+++ /dev/null
@@ -1 +0,0 @@
-[python: **.py]
diff --git a/doc/requirements.txt b/doc/requirements.txt
index e0781e8..39130db 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1,8 +1,8 @@
# 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.
-openstackdocstheme>=1.20.0 # Apache-2.0
-sphinx>=1.8.0,!=2.1.0 # BSD
+openstackdocstheme>=2.2.0 # Apache-2.0
+sphinx>=2.0.0,!=2.1.0 # BSD
doc8>=0.6.0 # Apache-2.0
-reno>=2.5.0 # Apache-2.0
+reno>=3.1.0 # Apache-2.0
sphinxcontrib-apidoc>=0.2.0 # BSD
diff --git a/doc/source/conf.py b/doc/source/conf.py
index afa698b..7006f0d 100755..100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -1,15 +1,17 @@
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# -*- coding: utf-8 -*-
+# Copyright (C) 2020 Red Hat, Inc.
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
# -- General configuration ----------------------------------------------------
@@ -23,15 +25,14 @@ extensions = [
'stevedore.sphinxext'
]
# openstackdocstheme options
-repository_name = 'openstack/oslo.db'
-bug_project = 'oslo.db'
-bug_tag = ''
+openstackdocs_repo_name = 'openstack/oslo.db'
+openstackdocs_bug_project = 'oslo.db'
+openstackdocs_bug_tag = ''
# The master toctree document.
master_doc = 'index'
# General information about the project.
-project = u'oslo.db'
copyright = u'2014, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
@@ -42,19 +43,17 @@ add_function_parentheses = True
add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['oslo_db.']
-
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'openstackdocs'
-
# -- sphinxcontrib.apidoc configuration --------------------------------------
apidoc_module_dir = '../../oslo_db'
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 3876cdd..2ba451b 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -14,6 +14,12 @@ utils.
user/index
reference/index
+Release Notes
+=============
+
+Read also the `oslo.db Release Notes
+<https://docs.openstack.org/releasenotes/oslo.db/>`_.
+
Indices and tables
==================
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 87aa12b..4c794bb 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -2,7 +2,7 @@ alembic==0.9.6
appdirs==1.3.0
Babel==2.3.4
bandit==1.4.0
-cffi==1.7.0
+cffi==1.14.0
cliff==2.8.0
cmd2==0.8.0
coverage==4.0
@@ -11,35 +11,29 @@ decorator==3.4.0
eventlet==0.18.2
extras==1.0.0
fixtures==3.0.0
-flake8==2.5.5
future==0.16.0
gitdb==0.6.4
GitPython==1.0.1
-greenlet==0.4.10
-hacking==0.12.0
+greenlet==0.4.15
iso8601==0.1.11
keystoneauth1==3.4.0
linecache2==1.0.0
Mako==0.4.0
-MarkupSafe==1.0
-mccabe==0.2.1
+MarkupSafe==1.1.1
monotonic==0.6
netaddr==0.7.18
netifaces==0.10.4
os-client-config==1.28.0
-os-testr==1.0.0
oslo.config==5.2.0
oslo.context==2.19.2
oslo.i18n==3.15.3
oslo.utils==3.33.0
oslotest==3.2.0
pbr==2.0.0
-pep8==1.5.7
pifpaf==0.10.0
prettytable==0.7.2
-psycopg2==2.7.0
+psycopg2==2.8.0
pycparser==2.18
-pyflakes==0.8.1
PyMySQL==0.7.6
pyparsing==2.1.0
pyperclip==1.5.27
@@ -47,7 +41,7 @@ python-editor==1.0.3
python-mimeparse==1.6.0
python-subunit==1.0.0
pytz==2013.6
-PyYAML==3.12
+PyYAML==3.13
requests==2.14.2
requestsexceptions==1.2.0
rfc3986==0.3.1
diff --git a/oslo_db/tests/sqlalchemy/test_utils.py b/oslo_db/tests/sqlalchemy/test_utils.py
index e6174a7..50f4af1 100644
--- a/oslo_db/tests/sqlalchemy/test_utils.py
+++ b/oslo_db/tests/sqlalchemy/test_utils.py
@@ -905,7 +905,7 @@ class TestMigrationUtils(db_test_base._DbTestCase):
table_name = 'abc'
table = Table(table_name, self.meta,
Column('id', Integer, primary_key=True),
- Column('deleted', Boolean))
+ Column('deleted', Boolean(create_constraint=True)))
ck = [
const for const in table.constraints if
isinstance(const, CheckConstraint)][0]
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index bb7b35b..efef05f 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -42,9 +42,9 @@ extensions = [
'reno.sphinxext',
]
# openstackdocstheme options
-repository_name = 'openstack/oslo.db'
-bug_project = 'oslo.db'
-bug_tag = ''
+openstackdocs_repo_name = 'openstack/oslo.db'
+openstackdocs_bug_project = 'oslo.db'
+openstackdocs_bug_tag = ''
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -91,7 +91,7 @@ exclude_patterns = []
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst
index 512cb12..c3afbe8 100644
--- a/releasenotes/source/index.rst
+++ b/releasenotes/source/index.rst
@@ -6,6 +6,7 @@
:maxdepth: 1
unreleased
+ victoria
ussuri
train
stein
diff --git a/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po b/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
index bcd1efe..e36a023 100644
--- a/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
+++ b/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
@@ -7,11 +7,11 @@ msgid ""
msgstr ""
"Project-Id-Version: oslo.db\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-04-14 14:56+0000\n"
+"POT-Creation-Date: 2020-10-05 17:36+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2020-04-18 07:58+0000\n"
+"PO-Revision-Date: 2020-10-10 02:27+0000\n"
"Last-Translator: Andi Chandler <andi@gowling.com>\n"
"Language-Team: English (United Kingdom)\n"
"Language: en_GB\n"
@@ -292,6 +292,9 @@ msgstr "Upgrade Notes"
msgid "Ussuri Series Release Notes"
msgstr "Ussuri Series Release Notes"
+msgid "Victoria Series Release Notes"
+msgstr "Victoria Series Release Notes"
+
msgid "and the ML thread:"
msgstr "and the ML thread:"
diff --git a/releasenotes/source/victoria.rst b/releasenotes/source/victoria.rst
new file mode 100644
index 0000000..4efc7b6
--- /dev/null
+++ b/releasenotes/source/victoria.rst
@@ -0,0 +1,6 @@
+=============================
+Victoria Series Release Notes
+=============================
+
+.. release-notes::
+ :branch: stable/victoria
diff --git a/setup.cfg b/setup.cfg
index 17e73c2..04cc8e1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -27,7 +27,7 @@ mysql =
PyMySQL>=0.7.6 # MIT License
# or oslo.db[postgresql]
postgresql =
- psycopg2>=2.7.0 # LGPL/ZPL
+ psycopg2>=2.8.0 # LGPL/ZPL
[files]
packages =
@@ -41,17 +41,3 @@ oslo.config.opts =
oslo.db.migration =
alembic = oslo_db.sqlalchemy.migration_cli.ext_alembic:AlembicExtension
migrate = oslo_db.sqlalchemy.migration_cli.ext_migrate:MigrateExtension
-
-[compile_catalog]
-directory = oslo_db/locale
-domain = oslo_db
-
-[update_catalog]
-domain = oslo_db
-output_dir = oslo_db/locale
-input_file = oslo_db/locale/oslo_db.pot
-
-[extract_messages]
-keywords = _ gettext ngettext l_ lazy_gettext
-mapping_file = babel.cfg
-output_file = oslo_db/locale/oslo_db.pot
diff --git a/test-requirements.txt b/test-requirements.txt
index 4f26aa4..4388b76 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -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.
-hacking>=3.0,<3.1.0 # Apache-2.0
+hacking>=3.0.1,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD
@@ -10,8 +10,8 @@ oslotest>=3.2.0 # Apache-2.0
oslo.context>=2.19.2 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
-os-testr>=1.0.0 # Apache-2.0
-bandit>=1.1.0,<1.6.0 # Apache-2.0
+bandit>=1.6.0,<1.7.0 # Apache-2.0
pifpaf>=0.10.0 # Apache-2.0
PyMySQL>=0.7.6 # MIT License
-psycopg2>=2.7.0 # LGPL/ZPL
+psycopg2>=2.8.0 # LGPL/ZPL
+pre-commit>=2.6.0 # MIT
diff --git a/tools/test-setup.sh b/tools/test-setup.sh
index 07a0785..505a58c 100755
--- a/tools/test-setup.sh
+++ b/tools/test-setup.sh
@@ -23,8 +23,8 @@ sudo -H mysqladmin -u root password $DB_ROOT_PW
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;"
+ CREATE USER '$DB_USER'@'%' IDENTIFIED BY '$DB_PW';
+ GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'%' WITH GRANT OPTION;"
# Now create our database.
mysql -u $DB_USER -p$DB_PW -h 127.0.0.1 -e "
diff --git a/tox.ini b/tox.ini
index d5512d4..1a19e22 100644
--- a/tox.ini
+++ b/tox.ini
@@ -24,7 +24,7 @@ commands =
[testenv:pep8]
commands =
- flake8
+ pre-commit run -a
# Run security linter
bandit -r oslo_db -x tests -n5 --skip B105,B311