Hello community,
here is the log from the commit of package python-oslo.context for openSUSE:Factory checked in at 2016-09-30 15:29:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.context (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.context.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.context"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.context/python-oslo.context.changes 2016-05-19 12:14:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-oslo.context.new/python-oslo.context.changes 2016-09-30 15:29:18.000000000 +0200
@@ -1,0 +2,54 @@
+Thu Sep 1 12:24:45 UTC 2016 - tbechtold@suse.com
+
+- update to version 2.9.0
+ * Emit deprecation warnings when positional args passed
+ * Fix parameters of assertEqual are misplaced
+ * Updated from global requirements
+ * Manually specify from_dict parameters
+
+-------------------------------------------------------------------
+Tue Aug 30 16:24:01 UTC 2016 - tbechtold@suse.com
+
+- update to version 2.8.0
+ * Delete H803 in flake8 ignore list
+
+-------------------------------------------------------------------
+Wed Aug 10 14:37:15 UTC 2016 - tbechtold@suse.com
+
+- update to version 2.7.0
+ * Add Python 3.5 classifier and venv
+ * Allow deprecated X-Tenant-Name in from_environ
+
+-------------------------------------------------------------------
+Fri Jul 29 15:52:06 UTC 2016 - dmueller@suse.com
+
+- update to 2.6.0:
+ * Handle openstack.request_id in from_environ
+ * Add is_admin_project to context
+ * Updated from global requirements
+ * Add reno for releasenotes management
+ * Add oslo.context name attributes matching ids
+
+-------------------------------------------------------------------
+Mon Jul 4 15:44:31 UTC 2016 - tbechtold@suse.com
+
+- Update .spec from upstream via renderspec source service
+
+-------------------------------------------------------------------
+Tue Jun 14 06:15:21 UTC 2016 - dmueller@suse.com
+
+- update to 2.4.0:
+ * Trivial: ignore openstack/common in flake8 exclude list
+ * Strip roles in from_environ
+ * Allow deprecated headers in from_environ
+ * Drop babel as requirement since its not used
+ * Updated from global requirements
+ * Ensure to_dict() supports unicode
+
+-------------------------------------------------------------------
+Thu Jun 2 09:01:38 UTC 2016 - tbechtold@suse.com
+
+- use renderspec source service
+- update spec from upstream
+
+-------------------------------------------------------------------
Old:
----
oslo.context-2.2.0.tar.gz
New:
----
oslo.context-2.9.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.context.spec ++++++
--- /var/tmp/diff_new_pack.UwNUBS/_old 2016-09-30 15:29:19.000000000 +0200
+++ /var/tmp/diff_new_pack.UwNUBS/_new 2016-09-30 15:29:19.000000000 +0200
@@ -17,29 +17,23 @@
%global sname oslo.context
-%bcond_with test
+%bcond_without test
Name: python-oslo.context
-Version: 2.2.0
+Version: 2.9.0
Release: 0
Summary: OpenStack Oslo context library
License: Apache-2.0
Group: Development/Languages
Url: https://launchpad.net/%{sname}
-Source0: https://pypi.python.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
+Source0: https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
-BuildRequires: python-Babel
-BuildRequires: python-pbr
-BuildRequires: python-setuptools
+BuildRequires: python-pbr >= 1.6
+BuildRequires: python-positional >= 1.0.1
+Requires: python-positional >= 1.0.1
+BuildArch: noarch
%if %{with test}
-BuildRequires: python-hacking
BuildRequires: python-oslotest >= 1.10.0
-BuildRequires: python-testrepository >= 0.0.18
-BuildRequires: python-testscenarios >= 0.4
-BuildRequires: python-testtools >= 0.9.34
%endif
-Requires: python-Babel >= 1.3
-Requires: python-pbr
-BuildArch: noarch
%description
The Oslo context library has helpers to maintain useful information
@@ -50,34 +44,28 @@
%package doc
Summary: Documentation for OpenStack common configuration library
Group: Documentation
-
BuildRequires: python-Sphinx
-BuildRequires: python-fixtures
-BuildRequires: python-oslosphinx
+BuildRequires: python-oslosphinx >= 2.5.0
%description doc
Documentation for the oslo-context library.
%prep
%setup -q -n %{sname}-%{version}
-# Remove bundled egg-info
-rm -rf %{sname}.egg-info
%build
-%{__python2} setup.py build
+%{py2_build}
# generate html docs
%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
-%{__python2} setup.py install --skip-build --root %{buildroot}
+%{py2_install}
%if %{with test}
%check
-export PYTHONPATH="%{python2_sitearch}:%{python2_sitelib}:%{buildroot}%{python2_sitelib}"
-export PYTHON="%{__python2} -S"
-testr init && testr run --parallel
+%{__python2} setup.py test
%endif
%files
++++++ _service ++++++
--- /var/tmp/diff_new_pack.UwNUBS/_old 2016-09-30 15:29:19.000000000 +0200
+++ /var/tmp/diff_new_pack.UwNUBS/_new 2016-09-30 15:29:19.000000000 +0200
@@ -1,13 +1,13 @@
<services>
+ <service mode="disabled" name="renderspec">
+ <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/o...</param>
+ <param name="output-name">python-oslo.context.spec</param>
+ <param name="requirements">https://raw.githubusercontent.com/openstack/requirements/master/global-requi...</param>
+ </service>
<service mode="disabled" name="download_files">
<param name="changesgenerate">enable</param>
</service>
- <service mode="disabled" name="set_version">
- <param name="basename">oslo.context</param>
- </service>
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
- <service name="python_requires" mode="disabled">
- </service>
</services>
++++++ oslo.context-2.2.0.tar.gz -> oslo.context-2.9.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/AUTHORS new/oslo.context-2.9.0/AUTHORS
--- old/oslo.context-2.2.0/AUTHORS 2016-02-25 07:05:11.000000000 +0100
+++ new/oslo.context-2.9.0/AUTHORS 2016-08-18 19:58:39.000000000 +0200
@@ -15,6 +15,8 @@
Jeremy Stanley
Joe Gordon
Joshua Harlow
+Joshua Harlow
+Kirill Bespalov
Michael Basnight
Monty Taylor
Ronald Bradford
@@ -23,4 +25,6 @@
Thomas Herve
Victor Sergeyev
Victor Stinner
+Wei Li
Zhongyue Luo
+yanheven
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/ChangeLog new/oslo.context-2.9.0/ChangeLog
--- old/oslo.context-2.2.0/ChangeLog 2016-02-25 07:05:11.000000000 +0100
+++ new/oslo.context-2.9.0/ChangeLog 2016-08-18 19:58:39.000000000 +0200
@@ -1,6 +1,52 @@
CHANGES
=======
+2.9.0
+-----
+
+* Updated from global requirements
+
+2.8.0
+-----
+
+* Delete H803 in flake8 ignore list
+* Fix parameters of assertEqual are misplaced
+* Manually specify from_dict parameters
+
+2.7.0
+-----
+
+* Add Python 3.5 classifier and venv
+* Emit deprecation warnings when positional args passed
+
+2.6.0
+-----
+
+* Allow deprecated X-Tenant-Name in from_environ
+* Handle openstack.request_id in from_environ
+* Add is_admin_project to context
+* Updated from global requirements
+
+2.5.0
+-----
+
+* Add reno for releasenotes management
+* Add oslo.context name attributes matching ids
+
+2.4.0
+-----
+
+* Trivial: ignore openstack/common in flake8 exclude list
+* Strip roles in from_environ
+* Allow deprecated headers in from_environ
+
+2.3.0
+-----
+
+* Drop babel as requirement since its not used
+* Updated from global requirements
+* Ensure to_dict() supports unicode
+
2.2.0
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/PKG-INFO new/oslo.context-2.9.0/PKG-INFO
--- old/oslo.context-2.2.0/PKG-INFO 2016-02-25 07:05:11.000000000 +0100
+++ new/oslo.context-2.9.0/PKG-INFO 2016-08-18 19:58:39.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: oslo.context
-Version: 2.2.0
+Version: 2.9.0
Summary: Oslo Context library
Home-page: http://launchpad.net/oslo
Author: OpenStack
@@ -39,3 +39,4 @@
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/oslo.context.egg-info/PKG-INFO new/oslo.context-2.9.0/oslo.context.egg-info/PKG-INFO
--- old/oslo.context-2.2.0/oslo.context.egg-info/PKG-INFO 2016-02-25 07:05:11.000000000 +0100
+++ new/oslo.context-2.9.0/oslo.context.egg-info/PKG-INFO 2016-08-18 19:58:39.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: oslo.context
-Version: 2.2.0
+Version: 2.9.0
Summary: Oslo Context library
Home-page: http://launchpad.net/oslo
Author: OpenStack
@@ -39,3 +39,4 @@
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/oslo.context.egg-info/SOURCES.txt new/oslo.context-2.9.0/oslo.context.egg-info/SOURCES.txt
--- old/oslo.context-2.2.0/oslo.context.egg-info/SOURCES.txt 2016-02-25 07:05:11.000000000 +0100
+++ new/oslo.context-2.9.0/oslo.context.egg-info/SOURCES.txt 2016-08-18 19:58:39.000000000 +0200
@@ -36,6 +36,13 @@
oslo_context/__init__.py
oslo_context/context.py
oslo_context/fixture.py
+oslo_context/version.py
oslo_context/tests/__init__.py
oslo_context/tests/test_context.py
-oslo_context/tests/test_fixture.py
\ No newline at end of file
+oslo_context/tests/test_fixture.py
+releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml
+releasenotes/source/conf.py
+releasenotes/source/index.rst
+releasenotes/source/unreleased.rst
+releasenotes/source/_static/.placeholder
+releasenotes/source/_templates/.placeholder
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/oslo.context.egg-info/pbr.json new/oslo.context-2.9.0/oslo.context.egg-info/pbr.json
--- old/oslo.context-2.2.0/oslo.context.egg-info/pbr.json 2016-02-25 07:05:11.000000000 +0100
+++ new/oslo.context-2.9.0/oslo.context.egg-info/pbr.json 2016-08-18 19:58:39.000000000 +0200
@@ -1 +1 @@
-{"git_version": "187d574", "is_release": true}
\ No newline at end of file
+{"git_version": "0ad0950", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/oslo.context.egg-info/requires.txt new/oslo.context-2.9.0/oslo.context.egg-info/requires.txt
--- old/oslo.context-2.2.0/oslo.context.egg-info/requires.txt 2016-02-25 07:05:11.000000000 +0100
+++ new/oslo.context-2.9.0/oslo.context.egg-info/requires.txt 2016-08-18 19:58:39.000000000 +0200
@@ -1,2 +1,2 @@
pbr>=1.6
-Babel>=1.3
+positional>=1.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/oslo_context/context.py new/oslo.context-2.9.0/oslo_context/context.py
--- old/oslo.context-2.2.0/oslo_context/context.py 2016-02-25 07:04:47.000000000 +0100
+++ new/oslo.context-2.9.0/oslo_context/context.py 2016-08-18 19:57:09.000000000 +0200
@@ -26,14 +26,34 @@
or logging context.
"""
-import inspect
import itertools
import threading
import uuid
+from positional import positional
+
_request_store = threading.local()
+# These arguments will be passed to a new context from the first available
+# header to support backwards compatibility.
+_ENVIRON_HEADERS = {'auth_token': ['HTTP_X_AUTH_TOKEN',
+ 'HTTP_X_STORAGE_TOKEN'],
+ 'user': ['HTTP_X_USER_ID',
+ 'HTTP_X_USER'],
+ 'tenant': ['HTTP_X_PROJECT_ID',
+ 'HTTP_X_TENANT_ID',
+ 'HTTP_X_TENANT'],
+ 'user_domain': ['HTTP_X_USER_DOMAIN_ID'],
+ 'project_domain': ['HTTP_X_PROJECT_DOMAIN_ID'],
+ 'user_name': ['HTTP_X_USER_NAME'],
+ 'project_name': ['HTTP_X_PROJECT_NAME',
+ 'HTTP_X_TENANT_NAME'],
+ 'user_domain_name': ['HTTP_X_USER_DOMAIN_NAME'],
+ 'project_domain_name': ['HTTP_X_PROJECT_DOMAIN_NAME'],
+ 'request_id': ['openstack.request_id'],
+ }
+
def generate_request_id():
"""Generate a unique request id."""
@@ -48,24 +68,40 @@
accesses the system, as well as additional request information.
"""
- user_idt_format = '{user} {tenant} {domain} {user_domain} {p_domain}'
+ user_idt_format = u'{user} {tenant} {domain} {user_domain} {p_domain}'
+ @positional(enforcement=positional.WARN)
def __init__(self, auth_token=None, user=None, tenant=None, domain=None,
user_domain=None, project_domain=None, is_admin=False,
read_only=False, show_deleted=False, request_id=None,
- resource_uuid=None, overwrite=True, roles=None):
+ resource_uuid=None, overwrite=True, roles=None,
+ user_name=None, project_name=None, domain_name=None,
+ user_domain_name=None, project_domain_name=None,
+ is_admin_project=True):
"""Initialize the RequestContext
:param overwrite: Set to False to ensure that the greenthread local
copy of the index is not overwritten.
+ :param is_admin_project: Whether the specified project is specified in
+ the token as the admin project. Defaults to
+ True for backwards compatibility.
+ :type is_admin_project: bool
"""
self.auth_token = auth_token
self.user = user
+ self.user_name = user_name
+ # NOTE (rbradfor): tenant will become project
+ # See spec discussion on https://review.openstack.org/#/c/290907/
self.tenant = tenant
+ self.project_name = project_name
self.domain = domain
+ self.domain_name = domain_name
self.user_domain = user_domain
+ self.user_domain_name = user_domain_name
self.project_domain = project_domain
+ self.project_domain_name = project_domain_name
self.is_admin = is_admin
+ self.is_admin_project = is_admin_project
self.read_only = read_only
self.show_deleted = show_deleted
self.resource_uuid = resource_uuid
@@ -96,7 +132,8 @@
'user_domain_id': self.user_domain,
'project_id': self.tenant,
'project_domain_id': self.project_domain,
- 'roles': self.roles}
+ 'roles': self.roles,
+ 'is_admin_project': self.is_admin_project}
def to_dict(self):
"""Return a dictionary of context attributes."""
@@ -119,20 +156,42 @@
'request_id': self.request_id,
'resource_uuid': self.resource_uuid,
'roles': self.roles,
- 'user_identity': user_idt}
+ 'user_identity': user_idt,
+ 'is_admin_project': self.is_admin_project}
def get_logging_values(self):
"""Return a dictionary of logging specific context attributes."""
- values = self.to_dict()
+ values = {'user_name': self.user_name,
+ 'project_name': self.project_name,
+ 'domain_name': self.domain_name,
+ 'user_domain_name': self.user_domain_name,
+ 'project_domain_name': self.project_domain_name}
+ values.update(self.to_dict())
return values
@classmethod
- def from_dict(cls, values):
+ def from_dict(cls, values, **kwargs):
"""Construct a context object from a provided dictionary."""
- allowed = [arg for arg in
- inspect.getargspec(RequestContext.__init__).args
- if arg != 'self']
- kwargs = {k: v for (k, v) in values.items() if k in allowed}
+ kwargs.setdefault('auth_token', values.get('auth_token'))
+ kwargs.setdefault('user', values.get('user'))
+ kwargs.setdefault('tenant', values.get('tenant'))
+ kwargs.setdefault('domain', values.get('domain'))
+ kwargs.setdefault('user_domain', values.get('user_domain'))
+ kwargs.setdefault('project_domain', values.get('project_domain'))
+ kwargs.setdefault('is_admin', values.get('is_admin', False))
+ kwargs.setdefault('read_only', values.get('read_only', False))
+ kwargs.setdefault('show_deleted', values.get('show_deleted', False))
+ kwargs.setdefault('request_id', values.get('request_id'))
+ kwargs.setdefault('resource_uuid', values.get('resource_uuid'))
+ kwargs.setdefault('roles', values.get('roles'))
+ kwargs.setdefault('user_name', values.get('user_name'))
+ kwargs.setdefault('project_name', values.get('project_name'))
+ kwargs.setdefault('domain_name', values.get('domain_name'))
+ kwargs.setdefault('user_domain_name', values.get('user_domain_name'))
+ kwargs.setdefault('project_domain_name',
+ values.get('project_domain_name'))
+ kwargs.setdefault('is_admin_project',
+ values.get('is_admin_project', True))
return cls(**kwargs)
@classmethod
@@ -148,15 +207,28 @@
# Load a new context object from the environment variables set by
# auth_token middleware. See:
# http://docs.openstack.org/developer/keystonemiddleware/api/keystonemiddlewar...
- kwargs.setdefault('auth_token', environ.get('HTTP_X_AUTH_TOKEN'))
- kwargs.setdefault('user', environ.get('HTTP_X_USER_ID'))
- kwargs.setdefault('tenant', environ.get('HTTP_X_PROJECT_ID'))
- kwargs.setdefault('user_domain', environ.get('HTTP_X_USER_DOMAIN_ID'))
- kwargs.setdefault('project_domain',
- environ.get('HTTP_X_PROJECT_DOMAIN_ID'))
- roles = environ.get('HTTP_X_ROLES')
- kwargs.setdefault('roles', roles.split(',') if roles else [])
+ # add kwarg if not specified by user from a list of possible headers
+ for k, v_list in _ENVIRON_HEADERS.items():
+ if k in kwargs:
+ continue
+
+ for v in v_list:
+ if v in environ:
+ kwargs[k] = environ[v]
+ break
+
+ if 'roles' not in kwargs:
+ roles = environ.get('HTTP_X_ROLES', environ.get('HTTP_X_ROLE'))
+ roles = [r.strip() for r in roles.split(',')] if roles else []
+ kwargs['roles'] = roles
+
+ if 'is_admin_project' not in kwargs:
+ # NOTE(jamielennox): we default is_admin_project to true because if
+ # nothing is provided we have to assume it is the admin project to
+ # make old policy continue to work.
+ is_admin_proj_str = environ.get('HTTP_X_IS_ADMIN_PROJECT', 'true')
+ kwargs['is_admin_project'] = is_admin_proj_str.lower() == 'true'
return cls(**kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/oslo_context/tests/test_context.py new/oslo.context-2.9.0/oslo_context/tests/test_context.py
--- old/oslo.context-2.2.0/oslo_context/tests/test_context.py 2016-02-25 07:04:47.000000000 +0100
+++ new/oslo.context-2.9.0/oslo_context/tests/test_context.py 2016-08-18 19:57:09.000000000 +0200
@@ -1,3 +1,4 @@
+# -*- encoding: utf-8 -*-
# Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
@@ -13,7 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
+import fixtures
+import hashlib
import uuid
+import warnings
from oslotest import base as test_base
@@ -21,6 +25,25 @@
from oslo_context import fixture
+def generate_id(name):
+ return hashlib.md5(name.encode('utf-8')).hexdigest()
+
+
+class WarningsFixture(fixtures.Fixture):
+
+ def __init__(self, action="always", category=DeprecationWarning):
+ super(WarningsFixture, self).__init__()
+ self.action = action
+ self.category = category
+
+ def setUp(self):
+ super(WarningsFixture, self).setUp()
+ self._w = warnings.catch_warnings(record=True)
+ self.log = self._w.__enter__()
+ self.addCleanup(self._w.__exit__)
+ warnings.simplefilter(self.action, self.category)
+
+
class Object(object):
pass
@@ -29,6 +52,7 @@
def setUp(self):
super(ContextTest, self).setUp()
+ self.warnings = self.useFixture(WarningsFixture())
self.useFixture(fixture.ClearRequestContext())
def test_context(self):
@@ -80,10 +104,15 @@
dct = {
"auth_token": "token1",
"user": "user1",
+ "user_name": "user1_name",
"tenant": "tenant1",
+ "project_name": "tenant1_name",
"domain": "domain1",
+ "domain_name": "domain1_name",
"user_domain": "user_domain1",
+ "user_domain_name": "user_domain1_name",
"project_domain": "project_domain1",
+ "project_domain_name": "project_domain1_name",
"is_admin": True,
"read_only": True,
"show_deleted": True,
@@ -92,17 +121,22 @@
"extra_data": "foo"
}
ctx = context.RequestContext.from_dict(dct)
- self.assertEqual("token1", ctx.auth_token)
- self.assertEqual("user1", ctx.user)
- self.assertEqual("tenant1", ctx.tenant)
- self.assertEqual("domain1", ctx.domain)
- self.assertEqual("user_domain1", ctx.user_domain)
- self.assertEqual("project_domain1", ctx.project_domain)
+ self.assertEqual(dct['auth_token'], ctx.auth_token)
+ self.assertEqual(dct['user'], ctx.user)
+ self.assertEqual(dct['tenant'], ctx.tenant)
+ self.assertEqual(dct['domain'], ctx.domain)
+ self.assertEqual(dct['user_domain'], ctx.user_domain)
+ self.assertEqual(dct['project_domain'], ctx.project_domain)
self.assertTrue(ctx.is_admin)
self.assertTrue(ctx.read_only)
self.assertTrue(ctx.show_deleted)
- self.assertEqual("request1", ctx.request_id)
- self.assertEqual("instance1", ctx.resource_uuid)
+ self.assertEqual(dct['request_id'], ctx.request_id)
+ self.assertEqual(dct['resource_uuid'], ctx.resource_uuid)
+ self.assertEqual(dct['user_name'], ctx.user_name)
+ self.assertEqual(dct['project_name'], ctx.project_name)
+ self.assertEqual(dct['domain_name'], ctx.domain_name)
+ self.assertEqual(dct['user_domain_name'], ctx.user_domain_name)
+ self.assertEqual(dct['project_domain_name'], ctx.project_domain_name)
def test_from_dict_unknown_keys(self):
dct = {
@@ -121,6 +155,25 @@
self.assertTrue(ctx.read_only)
self.assertRaises(KeyError, lambda: ctx.__dict__['color'])
+ def test_from_dict_overrides(self):
+ dct = {
+ "auth_token": "token1",
+ "user": "user1",
+ "read_only": True,
+ "roles": "role1,role2,role3",
+ "color": "red",
+ "unknown": ""
+ }
+ ctx = context.RequestContext.from_dict(dct,
+ user="user2",
+ project_name="project1")
+ self.assertEqual("token1", ctx.auth_token)
+ self.assertEqual("user2", ctx.user)
+ self.assertEqual("project1", ctx.project_name)
+ self.assertIsNone(ctx.tenant)
+ self.assertFalse(ctx.is_admin)
+ self.assertTrue(ctx.read_only)
+
def test_is_user_context(self):
self.assertFalse(context.is_user_context(None))
ctx = context.RequestContext(is_admin=True)
@@ -131,27 +184,42 @@
def test_from_environ_variables(self):
auth_token = uuid.uuid4().hex
- user_id = uuid.uuid4().hex
- project_id = uuid.uuid4().hex
- user_domain_id = uuid.uuid4().hex
- project_domain_id = uuid.uuid4().hex
+ user_name = uuid.uuid4().hex
+ user_id = generate_id(user_name)
+ project_name = uuid.uuid4().hex
+ project_id = generate_id(project_name)
+ user_domain_name = uuid.uuid4().hex
+ user_domain_id = generate_id(user_domain_name)
+ project_domain_name = uuid.uuid4().hex
+ project_domain_id = generate_id(project_domain_name)
roles = [uuid.uuid4().hex, uuid.uuid4().hex, uuid.uuid4().hex]
+ request_id = uuid.uuid4().hex
environ = {'HTTP_X_AUTH_TOKEN': auth_token,
'HTTP_X_USER_ID': user_id,
'HTTP_X_PROJECT_ID': project_id,
'HTTP_X_USER_DOMAIN_ID': user_domain_id,
'HTTP_X_PROJECT_DOMAIN_ID': project_domain_id,
- 'HTTP_X_ROLES': ','.join(roles)}
+ 'HTTP_X_ROLES': ','.join(roles),
+ 'HTTP_X_USER_NAME': user_name,
+ 'HTTP_X_PROJECT_NAME': project_name,
+ 'HTTP_X_USER_DOMAIN_NAME': user_domain_name,
+ 'HTTP_X_PROJECT_DOMAIN_NAME': project_domain_name,
+ 'openstack.request_id': request_id}
ctx = context.RequestContext.from_environ(environ)
self.assertEqual(auth_token, ctx.auth_token)
self.assertEqual(user_id, ctx.user)
+ self.assertEqual(user_name, ctx.user_name)
self.assertEqual(project_id, ctx.tenant)
+ self.assertEqual(project_name, ctx.project_name)
self.assertEqual(user_domain_id, ctx.user_domain)
+ self.assertEqual(user_domain_name, ctx.user_domain_name)
self.assertEqual(project_domain_id, ctx.project_domain)
+ self.assertEqual(project_domain_name, ctx.project_domain_name)
self.assertEqual(roles, ctx.roles)
+ self.assertEqual(request_id, ctx.request_id)
def test_from_environ_no_roles(self):
ctx = context.RequestContext.from_environ(environ={})
@@ -160,6 +228,85 @@
ctx = context.RequestContext.from_environ(environ={'HTTP_X_ROLES': ''})
self.assertEqual([], ctx.roles)
+ def test_from_environ_deprecated_variables(self):
+ value = uuid.uuid4().hex
+
+ environ = {'HTTP_X_USER': value}
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertEqual(value, ctx.user)
+
+ environ = {'HTTP_X_TENANT_ID': value}
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertEqual(value, ctx.tenant)
+
+ environ = {'HTTP_X_STORAGE_TOKEN': value}
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertEqual(value, ctx.auth_token)
+
+ environ = {'HTTP_X_TENANT': value}
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertEqual(value, ctx.tenant)
+
+ environ = {'HTTP_X_ROLE': value}
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertEqual([value], ctx.roles)
+
+ environ = {'HTTP_X_TENANT_NAME': value}
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertEqual(value, ctx.project_name)
+
+ def test_from_environ_deprecated_precendence(self):
+ old = uuid.uuid4().hex
+ new = uuid.uuid4().hex
+ override = uuid.uuid4().hex
+
+ environ = {'HTTP_X_USER': old,
+ 'HTTP_X_USER_ID': new}
+
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertEqual(new, ctx.user)
+
+ ctx = context.RequestContext.from_environ(environ=environ,
+ user=override)
+ self.assertEqual(override, ctx.user)
+
+ environ = {'HTTP_X_TENANT': old,
+ 'HTTP_X_PROJECT_ID': new}
+
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertEqual(new, ctx.tenant)
+
+ ctx = context.RequestContext.from_environ(environ=environ,
+ tenant=override)
+ self.assertEqual(override, ctx.tenant)
+
+ environ = {'HTTP_X_TENANT_NAME': old,
+ 'HTTP_X_PROJECT_NAME': new}
+
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertEqual(new, ctx.project_name)
+
+ def test_from_environ_strip_roles(self):
+ environ = {'HTTP_X_ROLES': ' abc\t,\ndef\n,ghi\n\n'}
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertEqual(['abc', 'def', 'ghi'], ctx.roles)
+
+ def test_environ_admin_project(self):
+ environ = {}
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertIs(True, ctx.is_admin_project)
+ self.assertIs(True, ctx.to_policy_values()['is_admin_project'])
+
+ environ = {'HTTP_X_IS_ADMIN_PROJECT': 'True'}
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertIs(True, ctx.is_admin_project)
+ self.assertIs(True, ctx.to_policy_values()['is_admin_project'])
+
+ environ = {'HTTP_X_IS_ADMIN_PROJECT': 'False'}
+ ctx = context.RequestContext.from_environ(environ=environ)
+ self.assertIs(False, ctx.is_admin_project)
+ self.assertIs(False, ctx.to_policy_values()['is_admin_project'])
+
def test_from_function_and_args(self):
ctx = context.RequestContext(user="user1")
arg = []
@@ -177,11 +324,17 @@
def test_values(self):
auth_token = "token1"
- user = "user1"
- tenant = "tenant1"
- domain = "domain1"
- user_domain = "user_domain1"
- project_domain = "project_domain1"
+ # test unicode support
+ user_name = u"John Gāo"
+ user_id = generate_id(user_name)
+ project_name = 'tenant1'
+ project_id = generate_id(project_name)
+ domain_name = 'domain1'
+ domain_id = generate_id(domain_name)
+ user_domain_name = 'user_domain1'
+ user_domain_id = generate_id(user_domain_name)
+ project_domain_name = 'project_domain1'
+ project_domain_id = generate_id(project_domain_name)
is_admin = True
read_only = True
show_deleted = True
@@ -189,22 +342,32 @@
resource_uuid = "uuid1"
ctx = context.RequestContext(auth_token=auth_token,
- user=user,
- tenant=tenant,
- domain=domain,
- user_domain=user_domain,
- project_domain=project_domain,
+ user=user_id,
+ user_name=user_name,
+ tenant=project_id,
+ project_name=project_name,
+ domain=domain_id,
+ domain_name=domain_name,
+ user_domain=user_domain_id,
+ user_domain_name=user_domain_name,
+ project_domain=project_domain_id,
+ project_domain_name=project_domain_name,
is_admin=is_admin,
read_only=read_only,
show_deleted=show_deleted,
request_id=request_id,
resource_uuid=resource_uuid)
self.assertEqual(auth_token, ctx.auth_token)
- self.assertEqual(user, ctx.user)
- self.assertEqual(tenant, ctx.tenant)
- self.assertEqual(domain, ctx.domain)
- self.assertEqual(user_domain, ctx.user_domain)
- self.assertEqual(project_domain, ctx.project_domain)
+ self.assertEqual(user_id, ctx.user)
+ self.assertEqual(user_name, ctx.user_name)
+ self.assertEqual(project_id, ctx.tenant)
+ self.assertEqual(project_name, ctx.project_name)
+ self.assertEqual(domain_id, ctx.domain)
+ self.assertEqual(domain_name, ctx.domain_name)
+ self.assertEqual(user_domain_id, ctx.user_domain)
+ self.assertEqual(user_domain_name, ctx.user_domain_name)
+ self.assertEqual(project_domain_id, ctx.project_domain)
+ self.assertEqual(project_domain_name, ctx.project_domain_name)
self.assertEqual(is_admin, ctx.is_admin)
self.assertEqual(read_only, ctx.read_only)
self.assertEqual(show_deleted, ctx.show_deleted)
@@ -225,58 +388,27 @@
self.assertIn('resource_uuid', d)
self.assertIn('user_identity', d)
self.assertIn('roles', d)
+ self.assertNotIn('user_name', d)
+ self.assertNotIn('project_name', d)
+ self.assertNotIn('domain_name', d)
+ self.assertNotIn('user_domain_name', d)
+ self.assertNotIn('project_domain_name', d)
self.assertEqual(auth_token, d['auth_token'])
- self.assertEqual(tenant, d['tenant'])
- self.assertEqual(domain, d['domain'])
- self.assertEqual(user_domain, d['user_domain'])
- self.assertEqual(project_domain, d['project_domain'])
+ self.assertEqual(project_id, d['tenant'])
+ self.assertEqual(domain_id, d['domain'])
+ self.assertEqual(user_domain_id, d['user_domain'])
+ self.assertEqual(project_domain_id, d['project_domain'])
self.assertEqual(is_admin, d['is_admin'])
self.assertEqual(read_only, d['read_only'])
self.assertEqual(show_deleted, d['show_deleted'])
self.assertEqual(request_id, d['request_id'])
self.assertEqual(resource_uuid, d['resource_uuid'])
- user_identity = "%s %s %s %s %s" % (user, tenant, domain,
- user_domain, project_domain)
+ user_identity = "%s %s %s %s %s" % (user_id, project_id, domain_id,
+ user_domain_id, project_domain_id)
self.assertEqual(user_identity, d['user_identity'])
self.assertEqual([], d['roles'])
- def test_get_logging_values(self):
- auth_token = "token1"
- user = "user1"
- tenant = "tenant1"
- domain = "domain1"
- user_domain = "user_domain1"
- project_domain = "project_domain1"
- is_admin = True
- read_only = True
- show_deleted = True
- request_id = "id1"
- resource_uuid = "uuid1"
-
- ctx = context.RequestContext(auth_token=auth_token,
- user=user,
- tenant=tenant,
- domain=domain,
- user_domain=user_domain,
- project_domain=project_domain,
- is_admin=is_admin,
- read_only=read_only,
- show_deleted=show_deleted,
- request_id=request_id,
- resource_uuid=resource_uuid)
- self.assertEqual(auth_token, ctx.auth_token)
- self.assertEqual(user, ctx.user)
- self.assertEqual(tenant, ctx.tenant)
- self.assertEqual(domain, ctx.domain)
- self.assertEqual(user_domain, ctx.user_domain)
- self.assertEqual(project_domain, ctx.project_domain)
- self.assertEqual(is_admin, ctx.is_admin)
- self.assertEqual(read_only, ctx.read_only)
- self.assertEqual(show_deleted, ctx.show_deleted)
- self.assertEqual(request_id, ctx.request_id)
- self.assertEqual(resource_uuid, ctx.resource_uuid)
-
d = ctx.get_logging_values()
self.assertIn('auth_token', d)
self.assertIn('user', d)
@@ -290,20 +422,18 @@
self.assertIn('request_id', d)
self.assertIn('resource_uuid', d)
self.assertIn('user_identity', d)
-
- self.assertEqual(auth_token, d['auth_token'])
- self.assertEqual(tenant, d['tenant'])
- self.assertEqual(domain, d['domain'])
- self.assertEqual(user_domain, d['user_domain'])
- self.assertEqual(project_domain, d['project_domain'])
- self.assertEqual(is_admin, d['is_admin'])
- self.assertEqual(read_only, d['read_only'])
- self.assertEqual(show_deleted, d['show_deleted'])
- self.assertEqual(request_id, d['request_id'])
- self.assertEqual(resource_uuid, d['resource_uuid'])
- user_identity = "%s %s %s %s %s" % (user, tenant, domain,
- user_domain, project_domain)
- self.assertEqual(user_identity, d['user_identity'])
+ self.assertIn('roles', d)
+ self.assertIn('user_name', d)
+ self.assertIn('project_name', d)
+ self.assertIn('domain_name', d)
+ self.assertIn('user_domain_name', d)
+ self.assertIn('project_domain_name', d)
+
+ self.assertEqual(user_name, d['user_name'])
+ self.assertEqual(project_name, d['project_name'])
+ self.assertEqual(domain_name, d['domain_name'])
+ self.assertEqual(user_domain_name, d['user_domain_name'])
+ self.assertEqual(project_domain_name, d['project_domain_name'])
def test_dict_empty_user_identity(self):
ctx = context.RequestContext()
@@ -326,6 +456,7 @@
project_domain = uuid.uuid4().hex
roles = [uuid.uuid4().hex, uuid.uuid4().hex, uuid.uuid4().hex]
+ # default is_admin_project is True
ctx = context.RequestContext(user=user,
user_domain=user_domain,
tenant=tenant,
@@ -336,4 +467,29 @@
'user_domain_id': user_domain,
'project_id': tenant,
'project_domain_id': project_domain,
- 'roles': roles}, ctx.to_policy_values())
+ 'roles': roles,
+ 'is_admin_project': True},
+ ctx.to_policy_values())
+
+ # is_admin_project False gets passed through
+ ctx = context.RequestContext(user=user,
+ user_domain=user_domain,
+ tenant=tenant,
+ project_domain=project_domain,
+ roles=roles,
+ is_admin_project=False)
+
+ self.assertEqual({'user_id': user,
+ 'user_domain_id': user_domain,
+ 'project_id': tenant,
+ 'project_domain_id': project_domain,
+ 'roles': roles,
+ 'is_admin_project': False},
+ ctx.to_policy_values())
+
+ def test_positional_args(self):
+ context.RequestContext('abc', 'def')
+
+ self.assertEqual(1, len(self.warnings.log))
+ self.assertIn('__init__ takes at most 1 positional',
+ str(self.warnings.log[0].message))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/oslo_context/version.py new/oslo.context-2.9.0/oslo_context/version.py
--- old/oslo.context-2.2.0/oslo_context/version.py 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.context-2.9.0/oslo_context/version.py 2016-08-18 19:57:09.000000000 +0200
@@ -0,0 +1,18 @@
+# Copyright 2016 OpenStack Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# 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 pbr.version
+
+version_info = pbr.version.VersionInfo('oslo_context')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml new/oslo.context-2.9.0/releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml
--- old/oslo.context-2.2.0/releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.context-2.9.0/releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml 2016-08-18 19:57:09.000000000 +0200
@@ -0,0 +1,3 @@
+---
+other:
+ - Switch to reno for managing release notes.
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/releasenotes/source/conf.py new/oslo.context-2.9.0/releasenotes/source/conf.py
--- old/oslo.context-2.2.0/releasenotes/source/conf.py 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.context-2.9.0/releasenotes/source/conf.py 2016-08-18 19:57:09.000000000 +0200
@@ -0,0 +1,273 @@
+# -*- coding: utf-8 -*-
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+# sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+ 'oslosphinx',
+ 'reno.sphinxext',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+# source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'oslo.context Release Notes'
+copyright = u'2016, oslo.context Developers'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+from oslo_context.version import version_info as oslo_context_version
+# The full version, including alpha/beta/rc tags.
+release = oslo_context_version.version_string_with_vcs()
+# The short X.Y version.
+version = oslo_context_version.canonical_version_string()
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+# language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+# today = ''
+# Else, today_fmt is used as the format for a strftime call.
+# today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+# default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+# add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+# add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+# show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+# modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+# keep_warnings = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+# html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+# html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+# html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+# html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+# html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+# html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+# html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+# html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+# html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+# html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+# html_additional_pages = {}
+
+# If false, no module index is generated.
+# html_domain_indices = True
+
+# If false, no index is generated.
+# html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+# html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+# html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+# html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+# html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+# html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+# html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'oslo.contextReleaseNotesDoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+ # The paper size ('letterpaper' or 'a4paper').
+ # 'papersize': 'letterpaper',
+
+ # The font size ('10pt', '11pt' or '12pt').
+ # 'pointsize': '10pt',
+
+ # Additional stuff for the LaTeX preamble.
+ # 'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ ('index', 'oslo.contextReleaseNotes.tex',
+ u'oslo.context Release Notes Documentation',
+ u'oslo.context Developers', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+# latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+# latex_use_parts = False
+
+# If true, show page references after internal links.
+# latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+# latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+# latex_appendices = []
+
+# If false, no module index is generated.
+# latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', 'oslo.contextReleaseNotes',
+ u'oslo.context Release Notes Documentation',
+ [u'oslo.context Developers'], 1)
+]
+
+# If true, show URL addresses after external links.
+# man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ ('index', 'oslo.contextReleaseNotes',
+ u'oslo.context Release Notes Documentation',
+ u'oslo.context Developers', 'oslo.contextReleaseNotes',
+ 'One line description of project.',
+ 'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+# texinfo_appendices = []
+
+# If false, no module index is generated.
+# texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+# texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+# texinfo_no_detailmenu = False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/releasenotes/source/index.rst new/oslo.context-2.9.0/releasenotes/source/index.rst
--- old/oslo.context-2.2.0/releasenotes/source/index.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.context-2.9.0/releasenotes/source/index.rst 2016-08-18 19:57:09.000000000 +0200
@@ -0,0 +1,8 @@
+===========================
+ oslo.context Release Notes
+===========================
+
+ .. toctree::
+ :maxdepth: 1
+
+ unreleased
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/releasenotes/source/unreleased.rst new/oslo.context-2.9.0/releasenotes/source/unreleased.rst
--- old/oslo.context-2.2.0/releasenotes/source/unreleased.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.context-2.9.0/releasenotes/source/unreleased.rst 2016-08-18 19:57:09.000000000 +0200
@@ -0,0 +1,5 @@
+==========================
+ Unreleased Release Notes
+==========================
+
+.. release-notes::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/requirements.txt new/oslo.context-2.9.0/requirements.txt
--- old/oslo.context-2.2.0/requirements.txt 2016-02-25 07:04:46.000000000 +0100
+++ new/oslo.context-2.9.0/requirements.txt 2016-08-18 19:57:09.000000000 +0200
@@ -3,4 +3,5 @@
# process, which may cause wedges in the gate later.
pbr>=1.6 # Apache-2.0
-Babel>=1.3 # BSD
+
+positional>=1.0.1 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/setup.cfg new/oslo.context-2.9.0/setup.cfg
--- old/oslo.context-2.2.0/setup.cfg 2016-02-25 07:05:11.000000000 +0100
+++ new/oslo.context-2.9.0/setup.cfg 2016-08-18 19:58:39.000000000 +0200
@@ -17,6 +17,7 @@
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
+ Programming Language :: Python :: 3.5
[files]
packages =
@@ -51,7 +52,7 @@
universal = true
[egg_info]
-tag_svn_revision = 0
-tag_date = 0
tag_build =
+tag_date = 0
+tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/test-requirements.txt new/oslo.context-2.9.0/test-requirements.txt
--- old/oslo.context-2.2.0/test-requirements.txt 2016-02-25 07:04:46.000000000 +0100
+++ new/oslo.context-2.9.0/test-requirements.txt 2016-08-18 19:57:09.000000000 +0200
@@ -2,10 +2,12 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
+fixtures>=3.0.0 # Apache-2.0/BSD
hacking<0.11,>=0.10.0
oslotest>=1.10.0 # Apache-2.0
coverage>=3.6 # Apache-2.0
# These are needed for docs generation
oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
-sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD
+sphinx!=1.3b1,<1.3,>=1.2.1 # BSD
+reno>=1.8.0 # Apache2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.context-2.2.0/tox.ini new/oslo.context-2.9.0/tox.ini
--- old/oslo.context-2.2.0/tox.ini 2016-02-25 07:04:46.000000000 +0100
+++ new/oslo.context-2.9.0/tox.ini 2016-08-18 19:57:09.000000000 +0200
@@ -1,6 +1,6 @@
[tox]
minversion = 1.6
-envlist = py34,py27,pypy,pep8
+envlist = py35,py34,py27,pypy,pep8
[testenv]
deps = -r{toxinidir}/test-requirements.txt
@@ -19,12 +19,11 @@
commands = python setup.py test --coverage --coverage-package-name=oslo_context --testr-args='{posargs}'
[flake8]
-# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
-ignore = E123,E125,H803
-exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
+ignore = E123,E125
+exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]
import_exceptions =
@@ -36,3 +35,6 @@
# of the requirements.txt files
deps = pip_missing_reqs
commands = pip-missing-reqs -d --ignore-module=oslo_context* --ignore-file=oslo_context/tests/* --ignore-file=tests/ oslo_context
+
+[testenv:releasenotes]
+commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html