diff -Nru python-oslo.db-9.0.0/AUTHORS python-oslo.db-10.0.0/AUTHORS --- python-oslo.db-9.0.0/AUTHORS 2021-05-12 16:46:40.000000000 +0000 +++ python-oslo.db-10.0.0/AUTHORS 2021-07-01 12:41:42.000000000 +0000 @@ -89,6 +89,7 @@ Julian Sy Julien Danjou Kai Zhang +Kamlesh Chauvhan Kenneth Giusti Kevin Benton Kevin Benton @@ -154,6 +155,7 @@ Yaguo Zhou Yaguo Zhou Yikun Jiang +YuehuiLei Zane Bitter Zhang Chun Zhang Xin @@ -174,6 +176,7 @@ howardlee int32bit jacky06 +likui liuyamin loooosy melissaml diff -Nru python-oslo.db-9.0.0/ChangeLog python-oslo.db-10.0.0/ChangeLog --- python-oslo.db-9.0.0/ChangeLog 2021-05-12 16:46:40.000000000 +0000 +++ python-oslo.db-10.0.0/ChangeLog 2021-07-01 12:41:42.000000000 +0000 @@ -1,9 +1,26 @@ CHANGES ======= +10.0.0 +------ + +* Remove the idle\_timeout option +* Remove the useless else +* types: Set 'cache\_ok' +* Changed minversion in tox to 3.18.0 + +9.1.0 +----- + +* Followup of "Added handler for mysql 8.0.19 duplicate key error update" +* Added handler for mysql 8.0.19 duplicate key error update +* update the pre-commit-hooks version +* Replace getargspec with getfullargspec + 9.0.0 ----- +* setup.cfg: Replace dashes with underscores 8.6.0 ----- diff -Nru python-oslo.db-9.0.0/debian/changelog python-oslo.db-10.0.0/debian/changelog --- python-oslo.db-9.0.0/debian/changelog 2021-06-10 14:23:08.000000000 +0000 +++ python-oslo.db-10.0.0/debian/changelog 2021-07-21 13:41:01.000000000 +0000 @@ -1,8 +1,8 @@ -python-oslo.db (9.0.0-0ubuntu1) impish; urgency=medium +python-oslo.db (10.0.0-0ubuntu1) impish; urgency=medium * New upstream release for OpenStack Xena. - -- Chris MacNaughton Thu, 10 Jun 2021 14:23:08 +0000 + -- Corey Bryant Wed, 21 Jul 2021 09:41:01 -0400 python-oslo.db (8.5.0+really.8.5.0-0ubuntu1) hirsute; urgency=medium diff -Nru python-oslo.db-9.0.0/oslo_db/options.py python-oslo.db-10.0.0/oslo_db/options.py --- python-oslo.db-9.0.0/oslo_db/options.py 2021-05-12 16:46:05.000000000 +0000 +++ python-oslo.db-10.0.0/oslo_db/options.py 2021-07-01 12:41:09.000000000 +0000 @@ -51,18 +51,6 @@ cfg.IntOpt( 'connection_recycle_time', default=3600, - deprecated_opts=[ - cfg.DeprecatedOpt('idle_timeout', - group="DATABASE"), - cfg.DeprecatedOpt('idle_timeout', - group="database"), - cfg.DeprecatedOpt('sql_idle_timeout', - group='DEFAULT'), - cfg.DeprecatedOpt('sql_idle_timeout', - group='DATABASE'), - cfg.DeprecatedOpt('idle_timeout', - group='sql') - ], help='Connections which have been present in the connection ' 'pool longer than this number of seconds will be replaced ' 'with a new one the next time they are checked out from ' diff -Nru python-oslo.db-9.0.0/oslo_db/sqlalchemy/enginefacade.py python-oslo.db-10.0.0/oslo_db/sqlalchemy/enginefacade.py --- python-oslo.db-9.0.0/oslo_db/sqlalchemy/enginefacade.py 2021-05-12 16:46:05.000000000 +0000 +++ python-oslo.db-10.0.0/oslo_db/sqlalchemy/enginefacade.py 2021-07-01 12:41:09.000000000 +0000 @@ -12,6 +12,7 @@ import contextlib import functools +import inspect import operator import threading import warnings @@ -26,7 +27,6 @@ from oslo_db import options from oslo_db.sqlalchemy import engines from oslo_db.sqlalchemy import orm -from oslo_db.sqlalchemy import utils from oslo_db import warning @@ -188,8 +188,6 @@ self._legacy_facade = None self._start_lock = threading.Lock() - @debtcollector.renames.renamed_kwarg( - "idle_timeout", "connection_recycle_time", replace=True) def configure_defaults(self, **kw): """Apply default configurational options. @@ -298,8 +296,6 @@ """ self._configure(True, kw) - @debtcollector.renames.renamed_kwarg( - "idle_timeout", "connection_recycle_time", replace=True) def configure(self, **kw): """Apply configurational options. @@ -997,7 +993,7 @@ def __call__(self, fn): """Decorate a function.""" - argspec = utils.getargspec(fn) + argspec = inspect.getfullargspec(fn) if argspec.args[0] == 'self' or argspec.args[0] == 'cls': context_index = 1 else: diff -Nru python-oslo.db-9.0.0/oslo_db/sqlalchemy/exc_filters.py python-oslo.db-10.0.0/oslo_db/sqlalchemy/exc_filters.py --- python-oslo.db-9.0.0/oslo_db/sqlalchemy/exc_filters.py 2021-05-12 16:46:05.000000000 +0000 +++ python-oslo.db-10.0.0/oslo_db/sqlalchemy/exc_filters.py 2021-07-01 12:41:09.000000000 +0000 @@ -120,6 +120,12 @@ N columns - (IntegrityError) duplicate key value violates unique constraint "name_of_our_constraint" + mysql since 8.0.19: + 1 column - (IntegrityError) (1062, "Duplicate entry 'value_of_c1' for key + 'table_name.c1'") + N columns - (IntegrityError) (1062, "Duplicate entry 'values joined + with -' for key 'table_name.name_of_our_constraint'") + mysql+mysqldb: 1 column - (IntegrityError) (1062, "Duplicate entry 'value_of_c1' for key 'c1'") @@ -145,6 +151,9 @@ if not columns.startswith(uniqbase): if engine_name == "postgresql": columns = [columns[columns.index("_") + 1:columns.rindex("_")]] + elif (engine_name == "mysql") and \ + (uniqbase in str(columns.split("0")[:1])): + columns = columns.split("0")[1:] else: columns = [columns] else: diff -Nru python-oslo.db-9.0.0/oslo_db/sqlalchemy/types.py python-oslo.db-10.0.0/oslo_db/sqlalchemy/types.py --- python-oslo.db-9.0.0/oslo_db/sqlalchemy/types.py 2021-05-12 16:46:05.000000000 +0000 +++ python-oslo.db-10.0.0/oslo_db/sqlalchemy/types.py 2021-07-01 12:41:09.000000000 +0000 @@ -21,6 +21,8 @@ type = None impl = Text + cache_ok = True + """This type is safe to cache.""" def __init__(self, mysql_as_long=False, mysql_as_medium=False): """Initialize JSON-encoding type.""" @@ -101,13 +103,14 @@ """ impl = Integer + cache_ok = True + """This type is safe to cache.""" def process_bind_param(self, value, dialect): """Return the binding parameter.""" if value is None: return None - else: - return int(value) + return int(value) class String(_String): diff -Nru python-oslo.db-9.0.0/oslo_db/sqlalchemy/utils.py python-oslo.db-10.0.0/oslo_db/sqlalchemy/utils.py --- python-oslo.db-9.0.0/oslo_db/sqlalchemy/utils.py 2021-05-12 16:46:05.000000000 +0000 +++ python-oslo.db-10.0.0/oslo_db/sqlalchemy/utils.py 2021-07-01 12:41:09.000000000 +0000 @@ -19,7 +19,6 @@ import collections from collections import abc import contextlib -import inspect as pyinspect import itertools import logging import re @@ -1184,25 +1183,6 @@ ) -def getargspec(fn): - """Inspects a function for its argspec. - - This is to handle a difference between py2/3. The Python 2.x getargspec - call is deprecated in Python 3.x, with the suggestion to use the signature - call instead. - - To keep compatibility with the results, while avoiding deprecation - warnings, this instead will use the getfullargspec instead. - - :param fn: The function to inspect. - :returns: The argspec for the function. - """ - if hasattr(pyinspect, 'getfullargspec'): - return pyinspect.getfullargspec(fn) - - return pyinspect.getargspec(fn) - - class NonCommittingConnectable(object): """A ``Connectable`` substitute which rolls all operations back. diff -Nru python-oslo.db-9.0.0/oslo_db/tests/sqlalchemy/test_exc_filters.py python-oslo.db-10.0.0/oslo_db/tests/sqlalchemy/test_exc_filters.py --- python-oslo.db-9.0.0/oslo_db/tests/sqlalchemy/test_exc_filters.py 2021-05-12 16:46:05.000000000 +0000 +++ python-oslo.db-10.0.0/oslo_db/tests/sqlalchemy/test_exc_filters.py 2021-07-01 12:41:09.000000000 +0000 @@ -821,6 +821,14 @@ expected_value='2' ) + def test_mysql_duplicate_entry_key_start_with_tablename(self): + self._run_dupe_constraint_test( + "mysql", + "1062 (23000): Duplicate entry '2' for key 'tbl.uniq_tbl0b'", + expected_columns=['b'], + expected_value='2' + ) + def test_mysql_binary(self): self._run_dupe_constraint_test( "mysql", @@ -839,6 +847,24 @@ expected_value="'\\\\x8A$\\\\x8D\\\\xA6\"s\\\\x8E!," ) + def test_mysql_duplicate_entry_key_start_with_tablename_binary(self): + self._run_dupe_constraint_test( + "mysql", + "(1062, \'Duplicate entry " + "\\\'\\\\x8A$\\\\x8D\\\\xA6\"s\\\\x8E\\\' " + "for key \\\'tbl.uniq_tbl0c1\\\'\')", + expected_columns=['c1'], + expected_value="\\\\x8A$\\\\x8D\\\\xA6\"s\\\\x8E" + ) + self._run_dupe_constraint_test( + "mysql", + "(1062, \'Duplicate entry " + "''\\\\x8A$\\\\x8D\\\\xA6\"s\\\\x8E!,' " + "for key 'tbl.uniq_tbl0c1'\')", + expected_columns=['c1'], + expected_value="'\\\\x8A$\\\\x8D\\\\xA6\"s\\\\x8E!," + ) + def test_postgresql_single(self): self._run_dupe_constraint_test( 'postgresql', diff -Nru python-oslo.db-9.0.0/oslo_db/tests/sqlalchemy/test_options.py python-oslo.db-10.0.0/oslo_db/tests/sqlalchemy/test_options.py --- python-oslo.db-9.0.0/oslo_db/tests/sqlalchemy/test_options.py 2021-05-12 16:46:05.000000000 +0000 +++ python-oslo.db-10.0.0/oslo_db/tests/sqlalchemy/test_options.py 2021-07-01 12:41:09.000000000 +0000 @@ -68,7 +68,6 @@ def test_dbapi_database_deprecated_parameters(self): path = self.create_tempfiles([['tmp', b'[DATABASE]\n' b'sql_connection=fake_connection\n' - b'sql_idle_timeout=100\n' b'sql_max_retries=22\n' b'reconnect_interval=17\n' b'sqlalchemy_max_overflow=101\n' @@ -76,8 +75,6 @@ ]])[0] self.conf(['--config-file', path]) self.assertEqual('fake_connection', self.conf.database.connection) - self.assertEqual(100, self.conf.database.connection_recycle_time) - self.assertEqual(100, self.conf.database.idle_timeout) self.assertEqual(22, self.conf.database.max_retries) self.assertEqual(17, self.conf.database.retry_interval) self.assertEqual(101, self.conf.database.max_overflow) @@ -86,12 +83,9 @@ def test_dbapi_database_deprecated_parameters_sql(self): path = self.create_tempfiles([['tmp', b'[sql]\n' b'connection=test_sql_connection\n' - b'idle_timeout=99\n' ]])[0] self.conf(['--config-file', path]) self.assertEqual('test_sql_connection', self.conf.database.connection) - self.assertEqual(99, self.conf.database.connection_recycle_time) - self.assertEqual(99, self.conf.database.idle_timeout) def test_deprecated_dbapi_parameters(self): path = self.create_tempfiles([['tmp', b'[DEFAULT]\n' diff -Nru python-oslo.db-9.0.0/oslo_db/tests/sqlalchemy/test_sqlalchemy.py python-oslo.db-10.0.0/oslo_db/tests/sqlalchemy/test_sqlalchemy.py --- python-oslo.db-9.0.0/oslo_db/tests/sqlalchemy/test_sqlalchemy.py 2021-05-12 16:46:05.000000000 +0000 +++ python-oslo.db-10.0.0/oslo_db/tests/sqlalchemy/test_sqlalchemy.py 2021-07-01 12:41:09.000000000 +0000 @@ -404,10 +404,6 @@ self.assertFalse(ses.autocommit) self.assertTrue(ses.expire_on_commit) - def test_direct_invocation_deprecated_args(self): - facade = session.EngineFacade("sqlite://", idle_timeout=59) - self.assertEqual(59, facade.get_engine().pool._recycle) - @mock.patch('oslo_db.sqlalchemy.orm.get_maker') @mock.patch('oslo_db.sqlalchemy.engines.create_engine') def test_creation_from_config(self, create_engine, get_maker): diff -Nru python-oslo.db-9.0.0/oslo.db.egg-info/pbr.json python-oslo.db-10.0.0/oslo.db.egg-info/pbr.json --- python-oslo.db-9.0.0/oslo.db.egg-info/pbr.json 2021-05-12 16:46:40.000000000 +0000 +++ python-oslo.db-10.0.0/oslo.db.egg-info/pbr.json 2021-07-01 12:41:42.000000000 +0000 @@ -1 +1 @@ -{"git_version": "78d12d7", "is_release": true} \ No newline at end of file +{"git_version": "f3bdd4d", "is_release": true} \ No newline at end of file diff -Nru python-oslo.db-9.0.0/oslo.db.egg-info/PKG-INFO python-oslo.db-10.0.0/oslo.db.egg-info/PKG-INFO --- python-oslo.db-9.0.0/oslo.db.egg-info/PKG-INFO 2021-05-12 16:46:40.000000000 +0000 +++ python-oslo.db-10.0.0/oslo.db.egg-info/PKG-INFO 2021-07-01 12:41:42.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: oslo.db -Version: 9.0.0 +Version: 10.0.0 Summary: Oslo Database library Home-page: https://docs.openstack.org/oslo.db/latest Author: OpenStack diff -Nru python-oslo.db-9.0.0/oslo.db.egg-info/SOURCES.txt python-oslo.db-10.0.0/oslo.db.egg-info/SOURCES.txt --- python-oslo.db-9.0.0/oslo.db.egg-info/SOURCES.txt 2021-05-12 16:46:40.000000000 +0000 +++ python-oslo.db-10.0.0/oslo.db.egg-info/SOURCES.txt 2021-07-01 12:41:42.000000000 +0000 @@ -98,10 +98,12 @@ releasenotes/notes/deprecate_idle_timeout-029d9f2cb7184b28.yaml releasenotes/notes/drop-python27-support-2308d7fbcd66cc22.yaml releasenotes/notes/enginefacade_decorators-4660862fe22d2669.yaml +releasenotes/notes/fix-mysql-duplicate-key-error-information-update-548888bc44b8dbd7.yaml releasenotes/notes/fix_synchronous_reader-ca442ca9f07470ec.yaml releasenotes/notes/increase-default-max-overflow-0af787268807f926.yaml releasenotes/notes/new-db-fixtures-58223e3926122413.yaml releasenotes/notes/remove-config-option-sqlite_db-7b7c6459135fd8c9.yaml +releasenotes/notes/removed-deprecated-idle-timeout-051a6a9a792bd8de.yaml releasenotes/notes/removed-deprecated-min-pool-size-1f351d79fe232129.yaml releasenotes/notes/removed-deprecated-sql-max-pool-size-c9b7bfc14c3b6b14.yaml releasenotes/notes/warn-incomplete-url-c44cd03baf630c7c.yaml diff -Nru python-oslo.db-9.0.0/PKG-INFO python-oslo.db-10.0.0/PKG-INFO --- python-oslo.db-9.0.0/PKG-INFO 2021-05-12 16:46:40.173291000 +0000 +++ python-oslo.db-10.0.0/PKG-INFO 2021-07-01 12:41:42.751973600 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: oslo.db -Version: 9.0.0 +Version: 10.0.0 Summary: Oslo Database library Home-page: https://docs.openstack.org/oslo.db/latest Author: OpenStack diff -Nru python-oslo.db-9.0.0/.pre-commit-config.yaml python-oslo.db-10.0.0/.pre-commit-config.yaml --- python-oslo.db-9.0.0/.pre-commit-config.yaml 2021-05-12 16:46:05.000000000 +0000 +++ python-oslo.db-10.0.0/.pre-commit-config.yaml 2021-07-01 12:41:09.000000000 +0000 @@ -9,7 +9,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: ebc15addedad713c86ef18ae9632c88e187dd0af # v3.1.0 + rev: 9136088a246768144165fcc3ecc3d31bb686920a # v3.3.0 hooks: - id: trailing-whitespace # Replaces or checks mixed line ending diff -Nru python-oslo.db-9.0.0/releasenotes/notes/fix-mysql-duplicate-key-error-information-update-548888bc44b8dbd7.yaml python-oslo.db-10.0.0/releasenotes/notes/fix-mysql-duplicate-key-error-information-update-548888bc44b8dbd7.yaml --- python-oslo.db-9.0.0/releasenotes/notes/fix-mysql-duplicate-key-error-information-update-548888bc44b8dbd7.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.db-10.0.0/releasenotes/notes/fix-mysql-duplicate-key-error-information-update-548888bc44b8dbd7.yaml 2021-07-01 12:41:09.000000000 +0000 @@ -0,0 +1,8 @@ +--- +fixes: + - | + In mysql 8.0.19, duplicate key error information is extended to + include the table name of the key. Previously, duplicate key error + information included only the key value and key name. + This extends capabilities to handle changes in duplicate key error + information with newer mysql version since 8.0.19. diff -Nru python-oslo.db-9.0.0/releasenotes/notes/removed-deprecated-idle-timeout-051a6a9a792bd8de.yaml python-oslo.db-10.0.0/releasenotes/notes/removed-deprecated-idle-timeout-051a6a9a792bd8de.yaml --- python-oslo.db-9.0.0/releasenotes/notes/removed-deprecated-idle-timeout-051a6a9a792bd8de.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-oslo.db-10.0.0/releasenotes/notes/removed-deprecated-idle-timeout-051a6a9a792bd8de.yaml 2021-07-01 12:41:09.000000000 +0000 @@ -0,0 +1,7 @@ +--- +fixes: + - | + Removed the ``[DATABASE] idle_timeout``, ``[database] idle_timeout``, + ``[sql] idle_timeout``, ``[DEFAULT] sql_idle_timeout`` and + ``[DATABASE] sql_idle_timeout`` options. These were all legacy + aliases for ``[database] connection_recycle_time``. diff -Nru python-oslo.db-9.0.0/setup.cfg python-oslo.db-10.0.0/setup.cfg --- python-oslo.db-9.0.0/setup.cfg 2021-05-12 16:46:40.177290400 +0000 +++ python-oslo.db-10.0.0/setup.cfg 2021-07-01 12:41:42.751973600 +0000 @@ -1,12 +1,12 @@ [metadata] name = oslo.db summary = Oslo Database library -description-file = +description_file = README.rst author = OpenStack -author-email = openstack-discuss@lists.openstack.org -home-page = https://docs.openstack.org/oslo.db/latest -python-requires = >=3.6 +author_email = openstack-discuss@lists.openstack.org +home_page = https://docs.openstack.org/oslo.db/latest +python_requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology diff -Nru python-oslo.db-9.0.0/tox.ini python-oslo.db-10.0.0/tox.ini --- python-oslo.db-9.0.0/tox.ini 2021-05-12 16:46:05.000000000 +0000 +++ python-oslo.db-10.0.0/tox.ini 2021-07-01 12:41:09.000000000 +0000 @@ -1,11 +1,11 @@ [tox] -minversion = 3.1 +minversion = 3.18.0 envlist = py3,pep8 ignore_basepython_conflict = true [testenv] basepython = python3 -whitelist_externals = +allowlist_externals = env passenv = OS_TEST_DBAPI_ADMIN_CONNECTION @@ -41,7 +41,7 @@ coverage xml -o cover/coverage.xml [testenv:docs] -whitelist_externals = +allowlist_externals = rm deps = {[testenv]deps} @@ -52,7 +52,7 @@ sphinx-build -W --keep-going -b html doc/source doc/build/html [testenv:releasenotes] -whitelist_externals = +allowlist_externals = rm deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}