Fix python 3.11 job and update python classifier in setup.cfg
As per the current release tested runtime, we test python version from 3.8 to 3.11 so updating the same in python classifier in setup.cfg Fixing the py311 unit test job: - Updating bindep.txt for mysql packages - Squash other two fixes in this commit to make job green 1. getargspec was deprecated in Python 3.0, and it's removed in Python 3.11 in the favor of getfullargspec. 2. Opening files in U mode is removed in Python 3.11. This fixes unit tests for me in Debian. Related Debian bug: https://bugs.debian.org/1025013 Co-Authored-By: Thomas Goirand <thomas@goirand.fr> Change-Id: Ie53dc343927bc107a2445ed96a84d24d6513dc7d
This commit is contained in:
parent
c898a310af
commit
26668baf7b
|
@ -2,8 +2,9 @@
|
|||
# see https://docs.openstack.org/infra/bindep/ for additional information.
|
||||
|
||||
libpq-dev [platform:dpkg]
|
||||
mysql-client [platform:dpkg]
|
||||
mysql-server [platform:dpkg]
|
||||
mysql-client [platform:dpkg !platform:debian]
|
||||
mysql-server [platform:dpkg !platform:debian]
|
||||
mariadb-server [platform:rpm platform:redhat platform:debian]
|
||||
postgresql
|
||||
postgresql-client [platform:dpkg]
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class ResourceManager(object):
|
|||
@specs.meta(constants.META_NO_TRACE, True)
|
||||
def string(receiver, name, owner=None, binary=False):
|
||||
path = ResourceManager._get_package(owner, receiver).get_resource(name)
|
||||
mode = 'rb' if binary else 'rU'
|
||||
mode = 'rb' if binary else 'r'
|
||||
with open(path, mode) as file:
|
||||
return file.read()
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ class TestMockManager(base.MuranoTestCase):
|
|||
original_function.is_method = True
|
||||
original_function.name = FIXTURE_FUNC
|
||||
original_context = contexts.Context()
|
||||
p = mock.patch("inspect.getargspec", new=mock.MagicMock())
|
||||
p = mock.patch("inspect.getfullargspec", new=mock.MagicMock())
|
||||
p.start()
|
||||
original_context.register_function(original_function)
|
||||
mock_murano_class.context = original_context
|
||||
|
|
|
@ -35,6 +35,9 @@ classifier =
|
|||
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
|
||||
|
||||
[files]
|
||||
packages =
|
||||
|
|
Loading…
Reference in New Issue