summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* types: Set 'cache_ok' (redux)stable/zedStephen Finucane2022-09-091-1/+7
| | | | | | | | | | | | | | In change Idf6fd858fad9521c7c5ba82c31b6d3077756abd9, we defined the 'cache_ok' key on a number of custom types. However, we relied on this attribute being inheritable which is not the case due to how that attribute is checked for [1]. As a result, we must set this attribute on every one of our custom types. [1] https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4_41/lib/sqlalchemy/sql/type_api.py#L984 Change-Id: I005af8c7afe3b5104068ca153aecbfe54e163ca3 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> (cherry picked from commit 10e8e77a92455fb638dcc7e73c044cd22acd84ad)
* Update TOX_CONSTRAINTS_FILE for stable/zedOpenStack Release Bot2022-09-091-2/+2
| | | | | | | | | | | | Update the URL to the upper-constraints file to point to the redirect rule on releases.openstack.org so that anyone working on this branch will switch to the correct upper-constraints list automatically when the requirements repository branches. Until the requirements repository has as stable/zed branch, tests will continue to use the upper-constraints list on master. Change-Id: I8f41a43cc29708846b655af4c74f318118da010c
* Update .gitreview for stable/zedOpenStack Release Bot2022-09-091-0/+1
| | | | Change-Id: I3525db70f9e96f70490392f223a0c572c330062f
* Replace abc.abstractproperty with property and abc.abstractmethod12.1.0ljhuang2022-08-031-4/+8
| | | | | | | | | Replace abc.abstractproperty with property and abc.abstractmethod, as abc.abstractproperty has been deprecated since python3.3[1] [1]https://docs.python.org/3.8/whatsnew/3.3.html?highlight=deprecated#abc Change-Id: Id90fbd2c53fd49341043bde740500a857a4339d3
* Merge "tox: Silence output"Zuul2022-07-201-0/+2
|\
| * tox: Silence outputStephen Finucane2022-02-081-0/+2
| | | | | | | | | | | | | | Enable the 'CaptureOutput' fixture provided by oslotest by default. Change-Id: Ib34d8ab411a67816db2e26b49bec75993b5bed56 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "trivial: Don't emit warnings for our own deprecations"Zuul2022-07-201-0/+7
|\ \ | |/
| * trivial: Don't emit warnings for our own deprecationsStephen Finucane2022-02-081-0/+7
| | | | | | | | | | | | | | | | We've deprecated a number of modules recently. We don't need to emit these warnings when running unit tests. Silence things. Change-Id: I7aed7789584bf0070f11c22b5eaa0e80c42dfc9c Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "tests: Enable SAWarning warnings"Zuul2022-07-202-5/+18
|\ \ | |/
| * tests: Enable SAWarning warningsStephen Finucane2022-02-082-5/+18
| | | | | | | | | | | | | | | | | | We shouldn't be raising warnings from SQLAlchemy. Where we are intentionally doing so, we should capture these warnings at the test level. This requires some minor fixes. Change-Id: I9d4512dc337153edc48a2cc3bf95ab2b31c39ccf Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Remove the 'Session.autocommit' parameter"Zuul2022-07-205-77/+83
|\ \ | |/
| * Remove the 'Session.autocommit' parameterStephen Finucane2022-02-085-77/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: The Session.autocommit parameter is deprecated and will be removed in SQLAlchemy version 2.0. The Session now features "autobegin" behavior such that the Session.begin() method may be called if a transaction has not yet been started yet. See the section session_explicit_begin for background. Change-Id: I7867cdcea115b13f2e45e0674bb9ef2ad138aae9 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Add missing 'connect' wrapper"Zuul2022-07-201-1/+3
|\ \ | |/
| * Add missing 'connect' wrapperStephen Finucane2022-02-081-1/+3
| | | | | | | | | | | | | | | | This was missed in change Ib789cd4d11a3d5dd01fcdb99822025b11bbc234e ("Don't rely on implicit autocommit") Change-Id: I9ec27650ae5e36099a6d2b2d59bb66cd820e8ffc Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Imported Translations from Zanata12.0.0OpenStack Proposal Bot2022-06-211-2/+164
| | | | | | | | | | | | | | For more information about this automatic import see: https://docs.openstack.org/i18n/latest/reviewing-translation-import.html Change-Id: I1e47d7a37c1d27b511b45c36a3d56597f2548076
* | Drop python3.6/3.7 support in testing runtimeHervé Beraud2022-05-051-3/+1
| | | | | | | | | | | | | | | | | | | | In Zed cycle testing runtime, we are targetting to drop the python 3.6/3.7 support, project started adding python 3.8 as minimum, example nova: - https://github.com/openstack/nova/blob/56b5aed08c6a3ed81b78dc216f0165ebfe3c3350/setup.cfg#L13 Change-Id: I859aa7c5d73cb492870c5699c6f8c96b5d36839e
* | Merge "Don't call 'begin()' on existing transaction"11.3.0Zuul2022-04-152-7/+1
|\ \ | |/
| * Don't call 'begin()' on existing transactionStephen Finucane2022-02-082-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: Calling .begin() when a transaction is already begun, creating a 'sub' transaction, is deprecated and will be removed in 2.0. See the documentation section 'Migrating from the nesting pattern' for background on how to migrate from this pattern. Change-Id: I59e45dfea8fcbf72fc6e34345e510554cbdd138e Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Add Python3 zed unit testsOpenStack Release Bot2022-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is an automatically generated patch to ensure unit testing is in place for all the of the tested runtimes for zed. See also the PTI in governance [1]. [1]: https://governance.openstack.org/tc/reference/project-testing-interface.html Change-Id: I22f6f0ac3c9f58b7aad6a81bd5fe65992d8e5dd1
* | Update master for stable/yogaOpenStack Release Bot2022-03-042-0/+7
|/ | | | | | | | | | | | Add file to the reno documentation build to show release notes for stable/yoga. Use pbr instruction to increment the minor version number automatically so that master versions are higher than the versions on stable/yoga. Sem-Ver: feature Change-Id: I450ea045a8cb88f4c59ea84f1340e989126d6b4c
* utils: Remove troublesome utility methods11.2.0Stephen Finucane2022-02-084-219/+15
| | | | | | | | | | These are not compatible with SQLAlchemy 2.0 due to their reliance on nested transactions. We should deprecate them first but doing so would push the boat out further wrt how long we have to wait before achieving compatibility with this new version. Change-Id: If3db4e8c1b681c0c62d3f04a57f92802639b3b9b Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Merge "Remove use of Session.begin.subtransactions flag"Zuul2022-02-022-17/+2
|\
| * Remove use of Session.begin.subtransactions flagStephen Finucane2021-08-102-17/+2
| | | | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: The Session.begin.subtransactions flag is deprecated and will be removed in SQLAlchemy version 2.0. See the documentation at session_subtransactions for background on a compatible alternative pattern. Change-Id: Ib2537bae77861ee60d17a48a72c57b88e043553e Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Don't rely on implicit autocommit"Zuul2022-02-026-103/+148
|\ \ | |/
| * Don't rely on implicit autocommitStephen Finucane2021-08-106-103/+148
| | | | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: The current statement is being autocommitted using implicit autocommit, which will be removed in SQLAlchemy 2.0. Use the .begin() method of Engine or Connection in order to use an explicit transaction for DML and DDL statements. Change-Id: Ib789cd4d11a3d5dd01fcdb99822025b11bbc234e Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Update python testing classifierdengzhaosen2021-12-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update python testing classifier Yoga testing runtime[1] has been updated to add py39 testing as voting. Unit tests update are handled by the job template change in openstack-zuul-job - https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286 this commit updates the classifier in setup.cfg file. [1] https://governance.openstack.org/tc/reference/runtimes/yoga.html Change-Id: I42c52cc13abeb14957676b47ce1b1b52799d499b
* | tests: Restore - don't reset - warning filtersStephen Finucane2021-11-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are more various warning filters pre-configured in a typical Python environment, including a few from third-party libraries such as requests [1][2] and urllib3 [3] as well as stdlib [4]. Our fixture to configure warnings, 'WarningsFixture', called 'warnings.resetwarnings' which *reset* all the warning filters [5]. This is clearly not something we want to do, and resulted in tests puking warnings after the initial test run. Resolve this by backing up the existing warning filters before applying the filter, and then *restoring* this original list of warning filters after the test run. [1] https://github.com/psf/requests/blob/v2.26.0/requests/__init__.py#L127 [2] https://github.com/psf/requests/blob/v2.26.0/requests/__init__.py#L152 [3] https://github.com/urllib3/urllib3/blob/1.26.7/src/urllib3/__init__.py#L68-L78 [4] https://docs.python.org/3.8/library/warnings.html#default-warning-filter [5] https://docs.python.org/3.8/library/warnings.html#warnings.resetwarnings Change-Id: Ie74dad3f20002dd26fa9760c9ba452c4a40186c5 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Replace use of 'Engine.execute()'"11.1.0Zuul2021-11-155-175/+217
|\ \ | |/
| * Replace use of 'Engine.execute()'Stephen Finucane2021-08-105-175/+217
| | | | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: The Engine.execute() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed by the Connection.execute() method of Connection, or in the ORM by the Session.execute() method of Session. Change-Id: I4c47a690a94abcb3b4b6fb087a1bf86c5350b523 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Don't call mapper() outside of declarative registry"Zuul2021-11-153-9/+9
|\ \ | |/
| * Don't call mapper() outside of declarative registryStephen Finucane2021-08-103-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning: Calling the mapper() function directly outside of a declarative registry is deprecated. Please use the sqlalchemy.orm.registry.map_imperatively() function for a classical mapping. Change-Id: I92a7ccdd48eedd4c788384033743daf50a9dc113 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Don't pass kwargs to connection.execute()"Zuul2021-11-124-11/+9
|\ \ | |/
| * Don't pass kwargs to connection.execute()Stephen Finucane2021-08-104-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: The connection.execute() method in SQLAlchemy 2.0 will accept parameters as a single dictionary or a single sequence of dictionaries only. Parameters passed as keyword arguments, tuples or positionally oriented dictionaries and/or tuples will no longer be accepted. Change-Id: I44675fce86337696b6494abc03e8058af32686c6 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Replace use of Executable.execute method"Zuul2021-11-122-80/+83
|\ \ | |/
| * Replace use of Executable.execute methodStephen Finucane2021-08-102-80/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: The Executable.execute() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed by the Connection.execute() method of Connection, or in the ORM by the Session.execute() method of Session. Change-Id: Ie0acba4a315c85ec7236e44a22449e0ad920ca9b Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Remove unnecessary warning filter"Zuul2021-11-121-5/+0
|\ \ | |/
| * Remove unnecessary warning filterStephen Finucane2021-08-101-5/+0
| | | | | | | | | | | | | | Looks like we solved this along the way. Change-Id: I50469e58fe3fae695316cb344fea44ec18fffe60 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Replace use of Engine.scalar()"Zuul2021-11-123-12/+12
|\ \ | |/
| * Replace use of Engine.scalar()Stephen Finucane2021-08-103-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: The Engine.scalar() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed by the Connection.execute() method of Connection, or in the ORM by the Session.execute() method of Session; the Result.scalar() method can then be used to return a scalar result. Change-Id: Ic3c9c5bb008b6299f2ed9a59bda0329fab9d554d Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Don't use the 'Row.keys()' method"Zuul2021-11-122-6/+1
|\ \ | |/
| * Don't use the 'Row.keys()' methodStephen Finucane2021-08-102-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: The Row.keys() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. Use the namedtuple standard accessor Row._fields, or for full mapping behavior use row._mapping.keys() Change-Id: I647a57909df56fec7b570ae29efbc731126df14d Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Don't use dict-style attribute accesses"Zuul2021-11-124-12/+9
|\ \ | |/
| * Don't use dict-style attribute accessesStephen Finucane2021-08-104-12/+9
| | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: Using non-integer/slice indices on Row is deprecated and will be removed in version 2.0; please use row._mapping[<key>], or the mappings() accessor on the Result object. Change-Id: I3a4845216914635e5802a70c2b1be757d82b7a49 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Configure driver for postgresStephen Finucane2021-09-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid the following warning seen in e.g. nova unit tests: WARNING oslo_db.sqlalchemy.engines [-] URL postgresql://.../foo does not contain a '+drivername' portion, and will make use of a default driver. A full dbname+drivername:// protocol is recommended. The 'psycopg2' driver is chosen since this is the default for SQLAlchemy [1] and therefore what we're currently using. [1] https://docs.sqlalchemy.org/en/14/core/engines.html#postgresql Change-Id: I0f8f358a49a83366d7dec17e7bac346453f3027b Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Add Python3 yoga unit testsOpenStack Release Bot2021-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is an automatically generated patch to ensure unit testing is in place for all the of the tested runtimes for yoga. See also the PTI in governance [1]. [1]: https://governance.openstack.org/tc/reference/project-testing-interface.html Change-Id: I460cc3f332c8162e197b53fc2c6ae071cadf3f78
* | Update master for stable/xenaOpenStack Release Bot2021-09-102-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Add file to the reno documentation build to show release notes for stable/xena. Use pbr instruction to increment the minor version number automatically so that master versions are higher than the versions on stable/xena. Sem-Ver: feature Change-Id: I21f4a1416a8dc316817ebc081b73b76992fca867
* | Merge "requirements: Bump sqlalchemy lower constraint"xena-em11.0.0Zuul2021-08-191-1/+1
|\ \ | |/ |/|
| * requirements: Bump sqlalchemy lower constraintStephen Finucane2021-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We've started using sqlalchemy features that were introduced in 1.4, which means we need to bump our lower constraint. Do this now. At some point, we probably want to dump all lower-constraint information from these files since it's no longer maintainable without the equivalent job. That's a task left to later, however. Change-Id: I8629225eeb51d95264d8a3e4b719268bb1597f4f Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Don't use plain string SQL statementsStephen Finucane2021-08-102-10/+5
| | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: Using plain strings to indicate SQL statements without using the text() construct is deprecated and will be removed in version 2.0. Ensure plain SQL statements are passed using the text() construct. Change-Id: I8acdb54d168afa1a7eac270ad6165faa287311ec Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Replace use of Table.autoload parameterStephen Finucane2021-08-102-6/+1
| | | | | | | | | | | | | | | | | | | | | | Resolve the following RemovedIn20Warning warning: The autoload parameter is deprecated and will be removed in version 2.0. Please use the autoload_with parameter, passing an engine or connection. Change-Id: Ie039851005c6038591e0e1f6426922ca5b0dcb9a Signed-off-by: Stephen Finucane <stephenfin@redhat.com>