diff --git a/debian/changelog b/debian/changelog index fc8a8e6..9c2ccd7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-castellan (3.10.1-3) unstable; urgency=medium + + * Add Replace_the_deprecated_argument_tenant.patch (Closes: #1009455). + + -- Thomas Goirand Thu, 14 Apr 2022 12:00:38 +0200 + python-castellan (3.10.1-2) unstable; urgency=medium * Uploading to unstable. diff --git a/debian/patches/Replace_the_deprecated_argument_tenant.patch b/debian/patches/Replace_the_deprecated_argument_tenant.patch new file mode 100644 index 0000000..133b720 --- /dev/null +++ b/debian/patches/Replace_the_deprecated_argument_tenant.patch @@ -0,0 +1,51 @@ +Author: Joel Capitao +Date: Tue, 15 Mar 2022 08:30:04 +0100 +Description: Replace the deprecated argument tenant + The deprecated argument tenant from RequestContext + has been removed since [1], so we switch to 'project_id'. + . + [1] https://review.opendev.org/c/openstack/oslo.context/+/815938 +Change-Id: I4e3e4c50ba5d829ed739e278b5286f2bf4808870 +Origin: upstream, https://review.opendev.org/c/openstack/castellan/+/834669 +Bug-Debian: https://bugs.debian.org/1009455 +Last-Update: 2022-04-14 + +diff --git a/castellan/tests/unit/test_utils.py b/castellan/tests/unit/test_utils.py +index 00e9346..2ead8ce 100644 +--- a/castellan/tests/unit/test_utils.py ++++ b/castellan/tests/unit/test_utils.py +@@ -182,18 +182,18 @@ + + def test_oslo_context_to_keystone_token(self): + auth_token_value = '16bd612f28ec479b8ffe8e124fc37b43' +- tenant_value = '00c6ef5ad2984af2acd7d42c299935c0' ++ project_id_value = '00c6ef5ad2984af2acd7d42c299935c0' + + ctxt = context.RequestContext( + auth_token=auth_token_value, +- tenant=tenant_value) ++ project_id=project_id_value) + + ks_token_context = utils.credential_factory(context=ctxt) + ks_token_context_class = ks_token_context.__class__.__name__ + + self.assertEqual('KeystoneToken', ks_token_context_class) + self.assertEqual(auth_token_value, ks_token_context.token) +- self.assertEqual(tenant_value, ks_token_context.project_id) ++ self.assertEqual(project_id_value, ks_token_context.project_id) + + def test_invalid_auth_type(self): + self.config_fixture.config( +diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst +index e04d703..cc564e3 100644 +--- a/doc/source/user/index.rst ++++ b/doc/source/user/index.rst +@@ -107,7 +107,7 @@ + sess = session.Session() + + ctxt = context.RequestContext(auth_token=auth.get_token(sess), +- tenant=auth.get_project_id(sess)) ++ project_id=auth.get_project_id(sess)) + + ctxt can then be passed into any key_manager api call. + diff --git a/debian/patches/series b/debian/patches/series index d03d3ef..c39f14a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ remove-privacy-breach-from-doc.patch +Replace_the_deprecated_argument_tenant.patch