From eca93d05cba44a2eb9fd4b29b6ea288e0a9670f4 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Tue, 9 Jan 2024 19:24:30 -0800 Subject: [PATCH] Test python 3.11 As per the current release tested runtime, we need to test python 3.8 to python 3.11 so using the generic python testing template which run the python versions jobs as per the current release runtime. Also, updating the same in python classifier in setup.cfg Change-Id: I647dad04f5b457f396508361d68c88880d1258ca --- .zuul.d/zuul.yaml | 2 ++ CHANGELOG.rst | 1 + setup.cfg | 1 + tests/unit/task/scenarios/nova/test_utils.py | 10 +++++----- tox.ini | 2 ++ 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.zuul.d/zuul.yaml b/.zuul.d/zuul.yaml index 3cbe4dab..f49525c2 100644 --- a/.zuul.d/zuul.yaml +++ b/.zuul.d/zuul.yaml @@ -6,6 +6,7 @@ - rally-tox-py38 - rally-tox-py39 - rally-tox-py310 + - rally-tox-py311 - rally-dsvm-tox-functional - rally-openstack-docker-build #- rally-task-basic-with-existing-users @@ -85,6 +86,7 @@ - rally-tox-py38 - rally-tox-py39 - rally-tox-py310 + - rally-tox-py311 - rally-dsvm-tox-functional - rally-openstack-docker-build #- rally-task-basic-with-existing-users diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8d98074d..3bc48057 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,6 +23,7 @@ Added ~~~~~ * Support for specifying microversions for Cinder service. +* Support Python 3.11 Removed ~~~~~~~ diff --git a/setup.cfg b/setup.cfg index 4d441723..f3e66ab7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,6 +20,7 @@ classifier = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 [files] packages = diff --git a/tests/unit/task/scenarios/nova/test_utils.py b/tests/unit/task/scenarios/nova/test_utils.py index d214d55e..2cd23abe 100644 --- a/tests/unit/task/scenarios/nova/test_utils.py +++ b/tests/unit/task/scenarios/nova/test_utils.py @@ -138,13 +138,13 @@ class NovaScenarioTestCase(test.ScenarioTestCase): expected_kwargs["nics"] = (nova_scenario._pick_random_nic. return_value) - expected_secgroups = set() - if "security_groups" in kwargs: - expected_secgroups.update(kwargs["security_groups"]) + expected_secgroups = kwargs.get("security_groups", []) if "secgroup" in context["user"]: - expected_secgroups.add(context["user"]["secgroup"]["name"]) + expected_secgroups.append( + context["user"]["secgroup"]["name"] + ) if expected_secgroups: - expected_kwargs["security_groups"] = list(expected_secgroups) + expected_kwargs["security_groups"] = expected_secgroups self.clients("nova").servers.create.assert_called_once_with( nova_scenario.generate_random_name.return_value, diff --git a/tox.ini b/tox.ini index 98af474d..2cdca7b0 100644 --- a/tox.ini +++ b/tox.ini @@ -149,6 +149,8 @@ filterwarnings = # pytest-cov ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning: ignore:::.*requests.* + # python 3.11 + ignore:'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning: # python 3.10 ignore:The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives:DeprecationWarning: ignore:pkg_resources is deprecated as an API:DeprecationWarning: