Remove Python 3.8 support

Python 3.8 is no longer part of the tested runtimes for 2024.2[1]
because its EOL is coming soon.

[1] https://governance.openstack.org/tc/reference/runtimes/2024.2.html

This allows us to replace md5 method from oslo.utils, which is being
deprecated now[2].

[2] https://review.opendev.org/c/openstack/oslo.utils/+/930879

Change-Id: I57328bb55ac88acb21048dd5eda797a419963f29
This commit is contained in:
Takashi Kajinami 2024-09-30 20:21:37 +09:00
parent c64083d45d
commit 9e2c3283c2
3 changed files with 9 additions and 4 deletions

View File

@ -13,8 +13,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import hashlib
from oslo_log import log as logging
from oslo_utils.secretutils import md5
from oslo_utils import timeutils
from sqlalchemy import case, select, distinct, func
from sqlalchemy.sql.expression import or_, literal_column
@ -1178,7 +1179,7 @@ class SQLAlchemyStorage(base.SQLAlchemy):
"""
Calculates the hash of the record, used to ensure record uniqueness.
"""
md5sum = md5(usedforsecurity=False)
md5sum = hashlib.md5(usedforsecurity=False)
md5sum.update(('{}:{}'.format(record.recordset_id,
record.data)).encode('utf-8'))

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
Support for Python 3.8 has been removed. Now the minimum python version
supported is 3.9 .

View File

@ -6,7 +6,7 @@ long_description = file: README.rst
author = OpenStack
author_email = openstack-discuss@lists.openstack.org
url = https://docs.openstack.org/designate/latest/
python_requires = >=3.8
python_requires = >=3.9
classifiers =
Environment :: OpenStack
Environment :: No Input/Output (Daemon)
@ -18,7 +18,6 @@ classifiers =
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11