openSUSE Commits
Threads by month
- ----- 2024 -----
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
September 2016
- 1 participants
- 1450 discussions
Hello community,
here is the log from the commit of package python-cinderclient for openSUSE:Factory checked in at 2016-09-30 15:30:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cinderclient (Old)
and /work/SRC/openSUSE:Factory/.python-cinderclient.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cinderclient"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cinderclient/python-cinderclient.changes 2016-05-04 08:19:17.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-cinderclient.new/python-cinderclient.changes 2016-09-30 15:30:08.000000000 +0200
@@ -1,0 +2,75 @@
+Mon Sep 5 08:25:20 UTC 2016 - tbechtold(a)suse.com
+
+update to version 1.9.0
+ * Fix Unicode error printing extra-specs
+ * Fix batch deleting issue in volume_type.unset_keys()
+ * List manageable volumes and snapshots
+ * base.Resource not define __ne__() built-in function
+ * Make Resource class's function can be wraped by api_version
+ * Add group types and group specs
+ * Fix Service.__repr__ to remove the undefined attribute
+ * Wrap group type and group spec with api_version
+ * Wrap volume_backup's update function with api_version
+ * Fix _get_rate_limit when resp is None
+ * Make __repr__ print encryption_id for VolumeEncryptionType class
+ * Fixing parsing problem of cascade in client
+ * Fix useless api_version of Manager class
+ * Add cluster related commands
+ * Add Negative tests for cinder volume extend command
+ * Fix python 2,3 compatibility issue with six
+ * Use 'six' instead of oslo_utils.strutils.six
+ * Add generic volume groups
+ * Support for snapshot force delete
+ * Add backup-update
+ * Add Python3.5 classifier and venv
+ * OS_TENANT_NAME is not required when we have OS_PROJECT_NAME
+ * Wrap cluster related function with api_version
+ * Fix argument order for assertEqual to (expected, observed)
+ * Make APIVersion's null check more pythonic
+ * Switch to keystoneauth
+ * Fix output error for type-show command
+ * Support name option for volume restore
+ * Replace OpenStack LLC with OpenStack Foundation
+ * Changed backup-restore to accept backup name
+ * Deleting volume metadata keys with a single request
+ * Add "start_version" and "end_version" support to argparse
+ * Add tenant_id parameter to limits.
+ * deprecate command `cinder endpoints`
+ * Log request-id for each api call
+ * Fix NoneType error for cinderclient v1
+ * Fix authentication issue
+ * Fix Capabilities.__repr__ to remove the undefined attribute
+ * Add support for group snapshots
+ * Fix the incorrect alignment
+ * Make dict.keys() PY3 compatible
+ * Add strict Boolean checking
+ * Tests for testing volume-create command
+ * Add api-version to get server versions
+ * Enhance help message of upload_to_image
+ * Replace functions 'Dict.get' and 'del' with 'Dict.pop'
+ * Cinder client should retry with Retry-After value
+ * Use self.ks_logger instead of ks_logger
+ * Change api-version help to indicate server API
+ * Delete mox in cinderclient
+ * Fix string interpolation to delayed to be handled by the logging code
+ * Add Negative tests for cinder volume create command
+ * print endpoints using new keystoneauth catalog object
+ * Update the home-page with developer documentation
+ * Replace assertTrue(isinstance()) by optimal assert
+ * Remove self.__dict__ for formatting strings
+ * Make sure --bypass-url honored if specified
+ * Updated from global requirements
+ * Add v3 user messages with pagination
+ * Wrap GroupType class's function with api_version
+
+-------------------------------------------------------------------
+Mon Aug 1 18:44:56 UTC 2016 - tbechtold(a)suse.com
+
+- update to 1.8.0:
+ * Don't enable lazy translation when loading client
+ * Support for cinder backup force delete
+ * Fix upload_to_image method
+ * Remove deprecated tempest_lib and use tempest.lib
+- update _service and switch to upstream spec file
+
+-------------------------------------------------------------------
Old:
----
python-cinderclient-1.6.0.tar.gz
python-cinderclient-rpmlintrc
New:
----
python-cinderclient-1.9.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cinderclient.spec ++++++
--- /var/tmp/diff_new_pack.bpSIhm/_old 2016-09-30 15:30:10.000000000 +0200
+++ /var/tmp/diff_new_pack.bpSIhm/_new 2016-09-30 15:30:10.000000000 +0200
@@ -16,100 +16,90 @@
#
-%define component cinderclient
-
-Name: python-%{component}
-Version: 1.6.0
+%global sname python-cinderclient
+Name: python-cinderclient
+Version: 1.9.0
Release: 0
-Summary: Openstack Block Storage (Cinder) API Client
+Summary: Python API and CLI for OpenStack Cinder
License: Apache-2.0
Group: Development/Languages/Python
-Url: http://launchpad.net/python-cinderclient
-Source: https://pypi.python.org/packages/source/p/python-cinderclient/python-cinder…
-Source99: %name-rpmlintrc
-BuildRequires: openstack-suse-macros
+Url: https://launchpad.net/%{sname}
+Source0: https://pypi.io/packages/source/p/%{sname}/%{sname}-%{version}.tar.gz
+BuildRequires: openstack-macros
+BuildRequires: python-PrettyTable >= 0.7
+BuildRequires: python-ddt >= 1.0.1
BuildRequires: python-devel
-BuildRequires: python-pbr
-# Documentation build requirements:
-BuildRequires: python-PrettyTable
-BuildRequires: python-Sphinx
-BuildRequires: python-oslosphinx
-BuildRequires: python-reno
-BuildRequires: python-requests
-Requires: python >= 2.6.8
-Requires: python-Babel >= 1.3
+BuildRequires: python-fixtures >= 3.0.0
+BuildRequires: python-keystoneauth1 >= 2.10.0
+BuildRequires: python-mock >= 2.0
+BuildRequires: python-os-testr >= 0.7.0
+BuildRequires: python-oslo.utils >= 3.16.0
+BuildRequires: python-pbr >= 1.6
+BuildRequires: python-python-subunit >= 0.0.18
+BuildRequires: python-requests >= 2.10.0
+BuildRequires: python-requests-mock >= 1.0
+BuildRequires: python-testrepository >= 0.0.18
+BuildRequires: python-testscenarios >= 0.4
+BuildRequires: python-testtools >= 1.4.0
+Requires: python-Babel >= 2.3.4
Requires: python-PrettyTable >= 0.7
-Requires: python-keystoneclient >= 1.6.0
-Requires: python-oslo.utils >= 3.5.0
-Requires: python-pbr >= 1.6
-Requires: python-requests >= 2.8.1
+Requires: python-keystoneauth1 >= 2.10.0
+Requires: python-oslo.i18n >= 2.1.0
+Requires: python-oslo.utils >= 3.16.0
+Requires: python-requests >= 2.10.0
Requires: python-simplejson >= 2.2.0
Requires: python-six >= 1.9.0
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
-This is a client for the OpenStack Volume API. There's a Python API (the
-cinderclient module), and a command-line script (cinder). Each implements 100%
-of the OpenStack Volume API.
+This is a client for the OpenStack Cinder API (Block Storage. There's a
+Python API (the cinderclient module), and a command-line script (cinder).
+Each implements 100% of the OpenStack Cinder API.
%package doc
-Summary: Openstack Block Storage (Cinder) API Client - Documentation
-Group: Documentation/HTML
-Requires: %{name} = %{version}
+Summary: Documentation for OpenStack Nova API Client
+Group: Documentation
+BuildRequires: python-Sphinx
+BuildRequires: python-oslosphinx >= 2.5.0
+BuildRequires: python-reno >= 1.8.0
%description doc
-This package contains documentation files for %{name}.
-
-%package test
-Summary: Openstack Block Storage (Cinder) API Client - Testsuite
-Group: Development/Languages/Python
-Requires: %{name} = %{version}
-Requires: python-fixtures >= 1.3.1
-Requires: python-mock >= 1.2
-Requires: python-python-subunit >= 0.0.18
-Requires: python-requests-mock >= 0.7.0
-Requires: python-tempest-lib >= 0.14.0
-Requires: python-testrepository >= 0.0.18
-Requires: python-testtools >= 1.4.0
-
-%description test
-This package contains testsuite files for %{name}.
+This is a client for the OpenStack Cinder API (Block Storage. There's a
+Python API (the cinderclient module), and a command-line script (cinder).
+Each implements 100% of the OpenStack Cinder API.
+This package contains auto-generated documentation.
%prep
-%setup -q
-%openstack_cleanup_prep
-echo %{version} > cinderclient/versioninfo
+%setup -q -n %{sname}-%{version}
%build
-python setup.py build
-python setup.py build_sphinx
-
-%install
-python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
+%{py2_build}
-rm doc/build/html/.buildinfo
+%{__python2} setup.py build_sphinx
+# remove the sphinx-build leftovers
+rm -rf doc/build/html/.{doctrees,buildinfo}
-### bash-completion
-install -p -D -m 644 tools/cinder.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/openstack-cinder.sh
+%install
+%{py2_install}
+# man page
+install -p -D -m 644 doc/build/man/cinder.1 %{buildroot}%{_mandir}/man1/cinder.1
+# bash completion
+install -p -D -m 644 tools/cinder.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/cinder.bash_completion
-### test subpackage
-%openstack_test_package_install
+%check
+%{__python2} setup.py testr
%files
-%defattr(-,root,root,-)
-%doc LICENSE README.rst
-%{_sysconfdir}/bash_completion.d/openstack-cinder.sh
+%license LICENSE
+%doc README.rst ChangeLog
+%{python2_sitelib}/cinderclient
+%{python2_sitelib}/*.egg-info
%{_bindir}/cinder
-%{python_sitelib}/%{component}/
-%{python_sitelib}/python_%{component}-*.egg-info
+%{_mandir}/man1/cinder.1*
+%{_sysconfdir}/bash_completion.d/cinder.bash_completion
%files doc
-%defattr(-,root,root,-)
-%doc LICENSE doc/build/html
-
-%files test
-%defattr(-,root,root,-)
-%{_localstatedir}/lib/%{name}-test/
+%license LICENSE
+%doc doc/build/html
%changelog
++++++ _service ++++++
--- /var/tmp/diff_new_pack.bpSIhm/_old 2016-09-30 15:30:10.000000000 +0200
+++ /var/tmp/diff_new_pack.bpSIhm/_new 2016-09-30 15:30:10.000000000 +0200
@@ -1,13 +1,13 @@
<services>
- <service mode="disabled" name="download_files">
- <param name="changesgenerate">enable</param>
- </service>
- <service mode="disabled" name="set_version">
- <param name="basename">python-cinderclient</param>
+ <service mode="disabled" name="renderspec">
+ <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/…</param>
+ <param name="output-name">python-cinderclient.spec</param>
+ <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-req…</param>
</service>
- <service mode="disabled" name="python_requires">
+ <service mode="disabled" name="download_files">
+ <param name="changesgenerate">enable</param>
</service>
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
-</services>
+</services>
\ No newline at end of file
++++++ python-cinderclient-1.6.0.tar.gz -> python-cinderclient-1.9.0.tar.gz ++++++
++++ 19803 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-tempest-lib for openSUSE:Factory checked in at 2016-09-30 15:30:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tempest-lib (Old)
and /work/SRC/openSUSE:Factory/.python-tempest-lib.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tempest-lib"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tempest-lib/python-tempest-lib.changes 2016-05-04 08:19:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-tempest-lib.new/python-tempest-lib.changes 2016-09-30 15:30:02.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Sep 1 05:37:27 UTC 2016 - tbechtold(a)suse.com
+
+- Update _service and switch to upstream spec template
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-tempest-lib.spec ++++++
--- /var/tmp/diff_new_pack.sNJigK/_old 2016-09-30 15:30:05.000000000 +0200
+++ /var/tmp/diff_new_pack.sNJigK/_new 2016-09-30 15:30:05.000000000 +0200
@@ -23,40 +23,32 @@
License: Apache-2.0
Group: Development/Languages/Python
Url: http://www.openstack.org/
-Source: https://pypi.python.org/packages/source/t/tempest-lib/tempest-lib-%{version…
+Source0: https://pypi.io/packages/source/t/tempest-lib/tempest-lib-%{version}.tar.gz
+BuildRequires: openstack-macros
+BuildRequires: python-ddt >= 1.0.1
BuildRequires: python-devel
-BuildRequires: python-pbr
-BuildRequires: python-setuptools
-# test requirements
-BuildRequires: python-coverage
-BuildRequires: python-ddt
-BuildRequires: python-discover
-BuildRequires: python-httplib2
-BuildRequires: python-jsonschema
-BuildRequires: python-mock
-BuildRequires: python-oslo.log
-BuildRequires: python-oslosphinx
-BuildRequires: python-oslotest
-BuildRequires: python-paramiko
-BuildRequires: python-python-subunit
-BuildRequires: python-sphinx
-BuildRequires: python-testrepository
-BuildRequires: python-testscenarios
-BuildRequires: python-testtools
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Requires: python-Babel >= 1.3
-Requires: python-fixtures >= 1.3.1
+BuildRequires: python-httplib2 >= 0.7.5
+BuildRequires: python-jsonschema >= 2.0.0
+BuildRequires: python-mock >= 2.0
+BuildRequires: python-oslo.log >= 1.14.0
+BuildRequires: python-oslosphinx >= 2.5.0
+BuildRequires: python-oslotest >= 1.10.0
+BuildRequires: python-paramiko >= 2.0
+BuildRequires: python-pbr >= 1.6
+BuildRequires: python-python-subunit >= 0.0.18
+BuildRequires: python-sphinx >= 1.2.1
+BuildRequires: python-testrepository >= 0.0.18
+BuildRequires: python-testscenarios >= 0.4
+BuildRequires: python-testtools >= 1.4.0
+Requires: python-Babel >= 2.3.4
+Requires: python-fixtures >= 3.0.0
Requires: python-httplib2 >= 0.7.5
-Requires: python-iso8601 >= 0.1.9
+Requires: python-iso8601 >= 0.1.11
Requires: python-jsonschema >= 2.0.0
-Requires: python-os-testr >= 0.4.1
+Requires: python-os-testr >= 0.7.0
Requires: python-oslo.log >= 1.14.0
Requires: python-six >= 1.9.0
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
BuildArch: noarch
-%endif
%description
OpenStack Functional Testing Library
@@ -65,21 +57,23 @@
%setup -q -n tempest-lib-%{version}
%build
-python setup.py build
+%{__python2} setup.py build
%install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%{__python2} setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
# both files are provided by openstack-tempest (because tempest-lib is
# now deprecated and the code was copied to tempest)
rm %{buildroot}/%{_bindir}/skip-tracker
rm %{buildroot}/%{_bindir}/check-uuid
%check
-testr init && testr run --parallel
+%{__python2} setup.py testr
%files
%defattr(-,root,root,-)
-%doc README.rst ChangeLog LICENSE AUTHORS
-%{python_sitelib}/*
+%license LICENSE
+%doc README.rst ChangeLog AUTHORS
+%{python2_sitelib}/tempest_lib
+%{python2_sitelib}/*.egg-info
%changelog
++++++ _service ++++++
--- /var/tmp/diff_new_pack.sNJigK/_old 2016-09-30 15:30:05.000000000 +0200
+++ /var/tmp/diff_new_pack.sNJigK/_new 2016-09-30 15:30:05.000000000 +0200
@@ -1,14 +1,13 @@
<services>
+ <service mode="disabled" name="renderspec">
+ <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/…</param>
+ <param name="output-name">python-tempest-lib.spec</param>
+ <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-req…</param>
+ </service>
<service mode="disabled" name="download_files">
<param name="changesgenerate">enable</param>
</service>
- <service mode="disabled" name="set_version">
- <param name="basename">tempest-lib</param>
- </service>
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
- <service name="python_requires" mode="disabled">
- </service>
</services>
-
1
0
Hello community,
here is the log from the commit of package python-osprofiler for openSUSE:Factory checked in at 2016-09-30 15:29:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-osprofiler (Old)
and /work/SRC/openSUSE:Factory/.python-osprofiler.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-osprofiler"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-osprofiler/python-osprofiler.changes 2016-05-23 16:40:39.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-osprofiler.new/python-osprofiler.changes 2016-09-30 15:29:53.000000000 +0200
@@ -1,0 +2,26 @@
+Tue Aug 30 15:22:08 UTC 2016 - tbechtold(a)suse.com
+
+- update to version 1.4.0
+ * Remove discover from test-requirements
+ * Don't set html_last_updated_fmt without git
+ * Add exception type to stop trace info
+ * OSprofiler initialization method
+ * Fix title of index page
+ * Add Ceilometer driver
+ * Expose osprofiler middleware as entrypoint
+ * Add MongoDB driver
+ * Improve unit test coverage
+ * Add connection string usage to osprofiler-cli
+ * Add tests for mongodb driver
+ * doc: Log warning when can't get informaiton from git
+ * Fix typos on spec directory
+ * Fix typo: 'Olso' to 'Oslo'
+ * Add backward compatible drivers structure
+ * Add overall profiler stats by operation
+
+-------------------------------------------------------------------
+Mon Aug 1 18:56:59 UTC 2016 - tbechtold(a)suse.com
+
+- Add _service and switch to upstream spec file
+
+-------------------------------------------------------------------
Old:
----
osprofiler-1.3.0.tar.gz
New:
----
_service
osprofiler-1.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-osprofiler.spec ++++++
--- /var/tmp/diff_new_pack.3xU5sa/_old 2016-09-30 15:29:55.000000000 +0200
+++ /var/tmp/diff_new_pack.3xU5sa/_new 2016-09-30 15:29:55.000000000 +0200
@@ -16,72 +16,76 @@
#
+%global sname osprofiler
Name: python-osprofiler
-Version: 1.3.0
+Version: 1.4.0
Release: 0
Summary: OpenStack Profiler Library
License: Apache-2.0
Group: Development/Languages/Python
-Url: https://git.openstack.org/cgit/openstack/osprofiler
-# The link used earlier: https://pypi.python.org/packages/source/o/osprofiler/ is now broken.
-# Pypi now provides the lengthy download link as below.
-Source: https://pypi.python.org/packages/7a/73/209ff20d871c8d5d25f2d6af0f82808bc524…
-BuildRequires: python-WebOb
+Url: https://launchpad.net/osprofiler
+Source0: https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
+BuildRequires: openstack-macros
+BuildRequires: python-WebOb >= 1.2.3
+BuildRequires: python-ceilometerclient >= 2.5.0
BuildRequires: python-devel
-BuildRequires: python-mock
-BuildRequires: python-nose
-BuildRequires: python-oslo.config >= 3.2.0
-BuildRequires: python-oslo.utils >= 3.4.0
-BuildRequires: python-oslosphinx
-BuildRequires: python-pbr
-BuildRequires: python-python-subunit
-BuildRequires: python-six
-BuildRequires: python-sphinx
-BuildRequires: python-testrepository
-BuildRequires: python-testtools
+BuildRequires: python-mock >= 2.0
+BuildRequires: python-oslo.config >= 3.14.0
+BuildRequires: python-oslo.utils >= 3.16.0
+BuildRequires: python-pymongo >= 3.0.2
+BuildRequires: python-python-subunit >= 0.0.18
+BuildRequires: python-six >= 1.9.0
+BuildRequires: python-testrepository >= 0.0.18
+BuildRequires: python-testtools >= 1.4.0
Requires: python-WebOb >= 1.2.3
-Requires: python-oslo.config >= 3.2.0
-Requires: python-oslo.utils >= 3.4.0
+Requires: python-oslo.config >= 3.14.0
+Requires: python-oslo.utils >= 3.16.0
Requires: python-six >= 1.9.0
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
BuildArch: noarch
-%endif
%description
-OSProfiler is an OpenStack cross-project profiling library.
+OSProfiler provides a tiny but powerful library that is used by
+most (soon to be all) OpenStack projects and their python clients. It
+provides functionality to be able to generate 1 trace per request, that goes
+through all involved services. This trace can then be extracted and used
+to build a tree of calls which can be quite handy for a variety of
+reasons (for example in isolating cross-project performance issues).
-Background
-----------
+%package doc
+Summary: Documentation for OSProfiler
+Group: Development/Languages/Python
+BuildRequires: python-Sphinx
+BuildRequires: python-oslosphinx >= 2.5.0
-OpenStack consists of multiple projects. Each project, in turn, is composed of
-multiple services. To process some request, e.g. to boot a virtual machine,
-OpenStack uses multiple services from different projects. In the case something
-works too slowly, it's extremely complicated to understand what exactly goes
-wrong and to locate the bottleneck.
-To resolve this issue, we introduce a tiny but powerful library, osprofiler,
-that is going to be used by all OpenStack projects and their
-python clients. To be able to generate 1 trace per request, that goes through
-all involved services, and builds a tree of calls.
+%description doc
+Documentation for OSProfiler.
%prep
-%setup -q -n osprofiler-%{version}
+%setup -q -n %{sname}-%{version}
%build
-python setup.py build
+%{py2_build}
%install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%{py2_install}
+
+# generate html docs
+%{__python2} setup.py build_sphinx
+# remove the sphinx-build leftovers
+rm -rf doc/build/html/.{doctrees,buildinfo}
%check
-python setup.py testr --slowest
+%{__python2} setup.py testr
%files
-%defattr(-,root,root,-)
-%doc LICENSE ChangeLog README.rst AUTHORS
+%license LICENSE
+%doc README.rst ChangeLog
+%{python2_sitelib}/osprofiler
+%{python2_sitelib}/*.egg-info
%{_bindir}/osprofiler
-%{python_sitelib}/*
+
+%files doc
+%license LICENSE
+%doc doc/build/html
%changelog
++++++ _service ++++++
<services>
<service mode="disabled" name="renderspec">
<param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/…</param>
<param name="output-name">python-osprofiler.spec</param>
<param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-req…</param>
</service>
<service mode="disabled" name="download_files">
<param name="changesgenerate">enable</param>
</service>
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
</services>
++++++ osprofiler-1.3.0.tar.gz -> osprofiler-1.4.0.tar.gz ++++++
++++ 2982 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-oslosphinx for openSUSE:Factory checked in at 2016-09-30 15:29:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslosphinx (Old)
and /work/SRC/openSUSE:Factory/.python-oslosphinx.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslosphinx"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslosphinx/python-oslosphinx.changes 2016-05-19 12:14:30.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-oslosphinx.new/python-oslosphinx.changes 2016-09-30 15:29:46.000000000 +0200
@@ -1,0 +2,12 @@
+Wed Aug 10 12:10:57 UTC 2016 - tbechtold(a)suse.com
+
+- update to 4.7.0:
+ * Allow "Other Versions" section to be configurable
+ * Updated from global requirements
+ * fix other versions sidebar links
+ * Subprocess returns bytes in py3
+ * Updated from global requirements
+ * add recent versions links to sidebar
+- Update _service and switch to upstream spec template
+
+-------------------------------------------------------------------
Old:
----
oslosphinx-4.3.0.tar.gz
New:
----
oslosphinx-4.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslosphinx.spec ++++++
--- /var/tmp/diff_new_pack.3b5WA5/_old 2016-09-30 15:29:47.000000000 +0200
+++ /var/tmp/diff_new_pack.3b5WA5/_new 2016-09-30 15:29:47.000000000 +0200
@@ -16,19 +16,21 @@
#
+%global sname oslosphinx
Name: python-oslosphinx
-Version: 4.3.0
+Version: 4.7.0
Release: 0
-Url: https://launchpad.net/oslosphinx
Summary: OpenStack Sphinx
License: Apache-2.0
Group: Development/Languages/Python
-Source: https://pypi.python.org/packages/source/o/oslosphinx/oslosphinx-%{version}.…
+Url: https://launchpad.net/oslosphinx
+Source0: https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
BuildRequires: python-devel
-BuildRequires: python-pbr
-Requires: python-pbr >= 1.8
-Requires: python-requests >= 2.8.1
+BuildRequires: python-pbr >= 1.6
+BuildRequires: python-setuptools >= 16.0
+Requires: python-pbr >= 1.6
+Requires: python-requests >= 2.10.0
Requires: python-six >= 1.9.0
BuildArch: noarch
@@ -37,19 +39,18 @@
layer of Sphinx plugins.
%prep
-%setup -q -n oslosphinx-%{version}
+%setup -q -n %{sname}-%{version}
%build
-%{__python2} setup.py build
+%{py2_build}
%install
-%{__python2} setup.py install --skip-build --root=%{buildroot} --prefix=%{_prefix} --install-data=%{python2_sitelib}
+%{py2_install}
%files
-%defattr(-,root,root,-)
%doc README.rst AUTHORS
%license LICENSE
-%{python2_sitelib}/oslosphinx
+%{python2_sitelib}/%{sname}
%{python2_sitelib}/*.egg-info
%changelog
++++++ _service ++++++
--- /var/tmp/diff_new_pack.3b5WA5/_old 2016-09-30 15:29:47.000000000 +0200
+++ /var/tmp/diff_new_pack.3b5WA5/_new 2016-09-30 15:29:47.000000000 +0200
@@ -1,13 +1,13 @@
<services>
- <service mode="disabled" name="download_files">
- <param name="changesgenerate">enable</param>
- </service>
- <service mode="disabled" name="set_version">
- <param name="basename">oslosphinx</param>
+ <service mode="disabled" name="renderspec">
+ <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/…</param>
+ <param name="output-name">python-oslosphinx.spec</param>
+ <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-req…</param>
</service>
- <service name="python_requires" mode="disabled">
+ <service mode="disabled" name="download_files">
+ <param name="changesgenerate">enable</param>
</service>
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
-</services>
+</services>
\ No newline at end of file
++++++ oslosphinx-4.3.0.tar.gz -> oslosphinx-4.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/AUTHORS new/oslosphinx-4.7.0/AUTHORS
--- old/oslosphinx-4.3.0/AUTHORS 2016-02-10 00:18:24.000000000 +0100
+++ new/oslosphinx-4.7.0/AUTHORS 2016-08-02 20:14:38.000000000 +0200
@@ -6,6 +6,7 @@
Cyril Roelandt <cyril(a)redhat.com>
Davanum Srinivas <davanum(a)gmail.com>
Davanum Srinivas <dims(a)linux.vnet.ibm.com>
+David Stanek <dstanek(a)dstanek.com>
Dirk Mueller <dirk(a)dmllr.de>
Doug Hellmann <doug.hellmann(a)dreamhost.com>
Doug Hellmann <doug(a)doughellmann.com>
@@ -15,6 +16,8 @@
Javier Pena <jpena(a)redhat.com>
Jeremy Stanley <fungi(a)yuggoth.org>
Joe Gordon <joe.gordon0(a)gmail.com>
+John Dickinson <me(a)not.mn>
+Joshua Harlow <jxharlow(a)godaddy.com>
Julien Danjou <julien(a)danjou.info>
Mark McLoughlin <markmc(a)redhat.com>
Monty Taylor <mordred(a)inaugust.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/ChangeLog new/oslosphinx-4.7.0/ChangeLog
--- old/oslosphinx-4.3.0/ChangeLog 2016-02-10 00:18:24.000000000 +0100
+++ new/oslosphinx-4.7.0/ChangeLog 2016-08-02 20:14:38.000000000 +0200
@@ -1,6 +1,28 @@
CHANGES
=======
+4.7.0
+-----
+
+* Allow "Other Versions" section to be configurable
+
+4.6.0
+-----
+
+* Updated from global requirements
+* fix other versions sidebar links
+
+4.5.0
+-----
+
+* Subprocess returns bytes in py3
+
+4.4.0
+-----
+
+* Updated from global requirements
+* add recent versions links to sidebar
+
4.3.0
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/PKG-INFO new/oslosphinx-4.7.0/PKG-INFO
--- old/oslosphinx-4.3.0/PKG-INFO 2016-02-10 00:18:24.000000000 +0100
+++ new/oslosphinx-4.7.0/PKG-INFO 2016-08-02 20:14:38.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: oslosphinx
-Version: 4.3.0
+Version: 4.7.0
Summary: OpenStack Sphinx Extensions and Theme
Home-page: http://www.openstack.org/
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/doc/source/usage.rst new/oslosphinx-4.7.0/doc/source/usage.rst
--- old/oslosphinx-4.3.0/doc/source/usage.rst 2016-02-10 00:18:11.000000000 +0100
+++ new/oslosphinx-4.7.0/doc/source/usage.rst 2016-08-02 20:13:09.000000000 +0200
@@ -24,3 +24,14 @@
best to set the value in conf.py::
oslosphinx_cgit_link = 'http://git.openstack.org/cgit/openstack/oslosphinx'
+
+Showing Older Versions of Documentation
+=======================================
+
+``oslosphinx`` can automatically add links for previous versions of your
+project's documentation to the sidebar. If this feature is enabled links
+will be generated for each git tag. To enable this behavior, set::
+
+ html_theme_options = {'show_other_versions': True}
+
+in your conf.py.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/oslosphinx/__init__.py new/oslosphinx-4.7.0/oslosphinx/__init__.py
--- old/oslosphinx-4.3.0/oslosphinx/__init__.py 2016-02-10 00:18:11.000000000 +0100
+++ new/oslosphinx-4.7.0/oslosphinx/__init__.py 2016-08-02 20:13:09.000000000 +0200
@@ -16,6 +16,7 @@
import re
import six
from six.moves.urllib import parse
+import string
import subprocess
@@ -42,9 +43,35 @@
def _html_page_context(app, pagename, templatename, context, doctree):
# Insert the cgit link into the template context.
context['cgit_link'] = app.config.oslosphinx_cgit_link
+ context['other_versions'] = _get_other_versions(app)
return None
+def _get_other_versions(app):
+ if not app.config.html_theme_options.get('show_other_versions', False):
+ return []
+
+ git_cmd = ["git", "tag"]
+ try:
+ raw_version_list = subprocess.Popen(
+ git_cmd, stdout=subprocess.PIPE).communicate()[0]
+ except OSError:
+ app.warn('Cannot get tags from git repository. '
+ 'Not setting "other_versions".')
+ raw_version_list = ''
+
+ # grab last five that start with a number and reverse the order
+ if six.PY3:
+ raw_version_list = raw_version_list.decode("utf8")
+ _tags = [t.strip("'") for t in raw_version_list.split('\n')]
+ other_versions = [
+ t for t in _tags if t and t[0] in string.digits
+ # Don't show alpha, beta or release candidate tags
+ and 'rc' not in t and 'a' not in t and 'b' not in t
+ ][:-5:-1]
+ return other_versions
+
+
def builder_inited(app):
theme_dir = os.path.join(os.path.dirname(__file__), 'theme')
app.info('Using openstack theme from %s' % theme_dir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/oslosphinx/theme/openstack/layout.html new/oslosphinx-4.7.0/oslosphinx/theme/openstack/layout.html
--- old/oslosphinx-4.3.0/oslosphinx/theme/openstack/layout.html 2016-02-10 00:18:11.000000000 +0100
+++ new/oslosphinx-4.7.0/oslosphinx/theme/openstack/layout.html 2016-08-02 20:13:09.000000000 +0200
@@ -30,6 +30,17 @@
title="{{ _('next chapter') }}">{{ next.title }}</a></p>
{%- endif %}
{%- endblock %}
+ {%- block otherversions %}
+ {%- if other_versions %}
+ <h3>{{ _('Other Versions') }}</h3>
+ <ul class="this-page-menu">
+ <li><a href="{{ pathto(master_doc) }}" rel="nofollow">Current</a></li>
+ {%- for ver in other_versions: %}
+ <li><a href="{{ pathto(ver, 1) }}" rel="nofollow">{{ ver }}</a></li>
+ {%- endfor %}
+ </ul>
+ {%- endif %}
+ {%- endblock %}
{%- block projectsource %}
{%- if cgit_link %}
<h3>{{ _('Project Source') }}</h3>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/oslosphinx/theme/openstack/theme.conf new/oslosphinx-4.7.0/oslosphinx/theme/openstack/theme.conf
--- old/oslosphinx-4.3.0/oslosphinx/theme/openstack/theme.conf 2016-02-10 00:18:11.000000000 +0100
+++ new/oslosphinx-4.7.0/oslosphinx/theme/openstack/theme.conf 2016-08-02 20:13:09.000000000 +0200
@@ -5,3 +5,4 @@
[options]
incubating = false
+show_other_versions = false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/oslosphinx.egg-info/PKG-INFO new/oslosphinx-4.7.0/oslosphinx.egg-info/PKG-INFO
--- old/oslosphinx-4.3.0/oslosphinx.egg-info/PKG-INFO 2016-02-10 00:18:24.000000000 +0100
+++ new/oslosphinx-4.7.0/oslosphinx.egg-info/PKG-INFO 2016-08-02 20:14:38.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: oslosphinx
-Version: 4.3.0
+Version: 4.7.0
Summary: OpenStack Sphinx Extensions and Theme
Home-page: http://www.openstack.org/
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/oslosphinx.egg-info/pbr.json new/oslosphinx-4.7.0/oslosphinx.egg-info/pbr.json
--- old/oslosphinx-4.3.0/oslosphinx.egg-info/pbr.json 2016-02-10 00:18:24.000000000 +0100
+++ new/oslosphinx-4.7.0/oslosphinx.egg-info/pbr.json 2016-08-02 20:14:38.000000000 +0200
@@ -1 +1 @@
-{"is_release": true, "git_version": "8084f2a"}
\ No newline at end of file
+{"git_version": "3bcdfc6", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/oslosphinx.egg-info/requires.txt new/oslosphinx-4.7.0/oslosphinx.egg-info/requires.txt
--- old/oslosphinx-4.3.0/oslosphinx.egg-info/requires.txt 2016-02-10 00:18:24.000000000 +0100
+++ new/oslosphinx-4.7.0/oslosphinx.egg-info/requires.txt 2016-08-02 20:14:38.000000000 +0200
@@ -1,3 +1,3 @@
pbr>=1.6
-requests!=2.9.0,>=2.8.1
+requests>=2.10.0
six>=1.9.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/requirements.txt new/oslosphinx-4.7.0/requirements.txt
--- old/oslosphinx-4.3.0/requirements.txt 2016-02-10 00:18:11.000000000 +0100
+++ new/oslosphinx-4.7.0/requirements.txt 2016-08-02 20:13:09.000000000 +0200
@@ -3,5 +3,5 @@
# process, which may cause wedges in the gate later.
pbr>=1.6 # Apache-2.0
-requests!=2.9.0,>=2.8.1 # Apache-2.0
+requests>=2.10.0 # Apache-2.0
six>=1.9.0 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/setup.cfg new/oslosphinx-4.7.0/setup.cfg
--- old/oslosphinx-4.3.0/setup.cfg 2016-02-10 00:18:24.000000000 +0100
+++ new/oslosphinx-4.7.0/setup.cfg 2016-08-02 20:14:38.000000000 +0200
@@ -40,6 +40,6 @@
[egg_info]
tag_build =
-tag_svn_revision = 0
tag_date = 0
+tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslosphinx-4.3.0/test-requirements.txt new/oslosphinx-4.7.0/test-requirements.txt
--- old/oslosphinx-4.3.0/test-requirements.txt 2016-02-10 00:18:11.000000000 +0100
+++ new/oslosphinx-4.7.0/test-requirements.txt 2016-08-02 20:13:09.000000000 +0200
@@ -5,4 +5,4 @@
hacking<0.11,>=0.10.0
# this is required for the docs build jobs
-sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD
+sphinx!=1.3b1,<1.3,>=1.2.1 # BSD
1
0
Hello community,
here is the log from the commit of package python-oslo.serialization for openSUSE:Factory checked in at 2016-09-30 15:29:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.serialization (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.serialization.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.serialization"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.serialization/python-oslo.serialization.changes 2016-05-19 12:14:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-oslo.serialization.new/python-oslo.serialization.changes 2016-09-30 15:29:43.000000000 +0200
@@ -1,0 +2,36 @@
+Fri Sep 2 19:10:06 UTC 2016 - tbechtold(a)suse.com
+
+- update to version 2.13.0
+ * Fix serialization of binary strings in Python3
+ * Drop H803 in flake8 ignore list
+
+-------------------------------------------------------------------
+Wed Aug 10 12:17:07 UTC 2016 - tbechtold(a)suse.com
+
+- update to 2.12.0:
+ * Updated from global requirements
+ * Fix parameters of assertEqual are misplaced
+ * Add Python 3.5 classifier and venv
+ * Use {} instead of dict()
+ * Replace TypeError by ValueError in msgpackutils
+ * Support serializing ipaddress objs with jsonutils
+
+-------------------------------------------------------------------
+Sun Jun 19 20:21:39 UTC 2016 - dmueller(a)suse.com
+
+- update to 2.7.0:
+ * Trivial: ignore openstack/common in flake8 exclude list
+ * [Trivial] Remove executable privilege of doc/source/conf.py
+ * Drop babel as requirement since its not used
+ * Updated from global requirements
+ * Unified and simplified API for all serializers
+ * Make msgpack registries copyable (and add __contains__)
+ * msgpack: fix datetime serialization
+
+-------------------------------------------------------------------
+Thu Jun 2 09:21:42 UTC 2016 - tbechtold(a)suse.com
+
+- use renderspec source service
+- update spec from upstream
+
+-------------------------------------------------------------------
Old:
----
oslo.serialization-2.4.0.tar.gz
New:
----
oslo.serialization-2.13.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.serialization.spec ++++++
--- /var/tmp/diff_new_pack.GDIlhi/_old 2016-09-30 15:29:44.000000000 +0200
+++ /var/tmp/diff_new_pack.GDIlhi/_new 2016-09-30 15:29:44.000000000 +0200
@@ -17,27 +17,26 @@
%global sname oslo.serialization
-
Name: python-oslo.serialization
-Version: 2.4.0
+Version: 2.13.0
Release: 0
Summary: OpenStack serialization 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.…
+Source0: https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
BuildRequires: python-devel
-BuildRequires: python-mock
+BuildRequires: python-ipaddress >= 1.0.7
+BuildRequires: python-mock >= 2.0
+BuildRequires: python-msgpack-python >= 0.4.0
BuildRequires: python-netaddr >= 0.7.12
-BuildRequires: python-oslo.i18n
-BuildRequires: python-oslo.utils >= 3.5.0
-BuildRequires: python-oslotest
-BuildRequires: python-pbr
-BuildRequires: python-setuptools
-Requires: python-Babel >= 1.3
+BuildRequires: python-oslo.i18n >= 2.1.0
+BuildRequires: python-oslo.utils >= 3.16.0
+BuildRequires: python-oslotest >= 1.10.0
+BuildRequires: python-pbr >= 1.6
Requires: python-msgpack-python >= 0.4.0
-Requires: python-oslo.utils >= 3.5.0
+Requires: python-oslo.utils >= 3.16.0
Requires: python-pytz >= 2013.6
Requires: python-six >= 1.9.0
BuildArch: noarch
@@ -50,7 +49,7 @@
Summary: Documentation for OpenStack serialization library
Group: Development/Languages
BuildRequires: python-Sphinx
-BuildRequires: python-oslosphinx >= 2.3.0
+BuildRequires: python-oslosphinx >= 2.5.0
%description doc
The oslo.serialization library provides support for representing objects
@@ -61,7 +60,7 @@
%setup -q -n %{sname}-%{version}
%build
-%{__python2} setup.py build
+%{py2_build}
# generate html docs
%{__python2} setup.py build_sphinx
@@ -69,10 +68,10 @@
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
-%{__python2} setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%{py2_install}
%check
-testr init && testr run
+%{__python2} setup.py test
%files
%license LICENSE
++++++ _service ++++++
--- /var/tmp/diff_new_pack.GDIlhi/_old 2016-09-30 15:29:44.000000000 +0200
+++ /var/tmp/diff_new_pack.GDIlhi/_new 2016-09-30 15:29:44.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/…</param>
+ <param name="output-name">python-oslo.serialization.spec</param>
+ <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-req…</param>
+ </service>
<service mode="disabled" name="download_files">
<param name="changesgenerate">enable</param>
</service>
- <service mode="disabled" name="set_version">
- <param name="basename">oslo.serialization</param>
- </service>
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
- <service name="python_requires" mode="disabled">
- </service>
</services>
++++++ oslo.serialization-2.4.0.tar.gz -> oslo.serialization-2.13.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/AUTHORS new/oslo.serialization-2.13.0/AUTHORS
--- old/oslo.serialization-2.4.0/AUTHORS 2016-02-25 07:07:39.000000000 +0100
+++ new/oslo.serialization-2.13.0/AUTHORS 2016-08-10 14:18:40.000000000 +0200
@@ -15,7 +15,9 @@
Davanum Srinivas <dims(a)linux.vnet.ibm.com>
Dirk Mueller <dirk(a)dmllr.de>
Doug Hellmann <doug(a)doughellmann.com>
+Edan David <edand(a)mellanox.com>
Gary Kotton <gkotton(a)vmware.com>
+Gevorg Davoian <gdavoian(a)mirantis.com>
He Jie Xu <xuhj(a)linux.vnet.ibm.com>
Ian Cordasco <graffatcolmingov(a)gmail.com>
Ihar Hrachyshka <ihrachys(a)redhat.com>
@@ -23,14 +25,17 @@
James Page <james.page(a)ubuntu.com>
Jay Pipes <jaypipes(a)gmail.com>
Jeremy Stanley <fungi(a)yuggoth.org>
+Jim Baker <jim.baker(a)python.org>
Joe Gordon <joe.gordon0(a)gmail.com>
Joe Gordon <jogo(a)cloudscaling.com>
Johannes Erdfelt <johannes.erdfelt(a)rackspace.com>
Joshua Harlow <harlowja(a)gmail.com>
Joshua Harlow <harlowja(a)yahoo-inc.com>
+Joshua Harlow <jxharlow(a)godaddy.com>
Julien Danjou <julien(a)danjou.info>
Luis A. Garcia <luis(a)linux.vnet.ibm.com>
Matt Riedemann <mriedem(a)us.ibm.com>
+Mehdi Abaakouk <sileht(a)redhat.com>
Mike Heald <mike.heald(a)hp.com>
Monty Taylor <mordred(a)inaugust.com>
Nataliia Uvarova <grafinya.uvarova(a)gmail.com>
@@ -45,5 +50,8 @@
Victor Sergeyev <vsergeyev(a)mirantis.com>
Victor Stinner <vstinner(a)redhat.com>
YAMAMOTO Takashi <yamamoto(a)valinux.co.jp>
+ZhiQiang Fan <aji.zqfan(a)gmail.com>
Zhongyue Luo <lzyeval(a)gmail.com>
Zhongyue Luo <zhongyue.nah(a)intel.com>
+xianming.mao <xianming.mao(a)easystack.cn>
+yanheven <yanheven(a)qq.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/ChangeLog new/oslo.serialization-2.13.0/ChangeLog
--- old/oslo.serialization-2.4.0/ChangeLog 2016-02-25 07:07:39.000000000 +0100
+++ new/oslo.serialization-2.13.0/ChangeLog 2016-08-10 14:18:40.000000000 +0200
@@ -1,6 +1,63 @@
CHANGES
=======
+2.13.0
+------
+
+* Drop H803 in flake8 ignore list
+* Fix serialization of binary strings in Python3
+
+2.12.0
+------
+
+* Updated from global requirements
+* Fix parameters of assertEqual are misplaced
+* Add Python 3.5 classifier and venv
+
+2.11.0
+------
+
+* Updated from global requirements
+* Updated from global requirements
+* Use {} instead of dict()
+
+2.10.0
+------
+
+* Updated from global requirements
+
+2.9.0
+-----
+
+
+2.8.0
+-----
+
+* Replace TypeError by ValueError in msgpackutils
+* Support serializing ipaddress objs with jsonutils
+* Updated from global requirements
+* Updated from global requirements
+* Updated from global requirements
+
+2.7.0
+-----
+
+* Trivial: ignore openstack/common in flake8 exclude list
+
+2.6.0
+-----
+
+* [Trivial] Remove executable privilege of doc/source/conf.py
+
+2.5.0
+-----
+
+* Drop babel as requirement since its not used
+* Updated from global requirements
+* Unified and simplified API for all serializers
+* Make msgpack registries copyable (and add __contains__)
+* msgpack: fix datetime serialization
+
2.4.0
-----
@@ -87,7 +144,7 @@
1.6.0
-----
-* Revert "jsonutils: replace strtime(
+* Revert "jsonutils: replace strtime() usage with isoformat()"
* jsonutils: encode dict keys
* jsonutils: simplify simple value handling
* jsonutils: replace strtime() usage with isoformat()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/PKG-INFO new/oslo.serialization-2.13.0/PKG-INFO
--- old/oslo.serialization-2.4.0/PKG-INFO 2016-02-25 07:07:39.000000000 +0100
+++ new/oslo.serialization-2.13.0/PKG-INFO 2016-08-10 14:18:40.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: oslo.serialization
-Version: 2.4.0
+Version: 2.13.0
Summary: Oslo Serialization library
Home-page: http://launchpad.net/oslo
Author: OpenStack
@@ -38,3 +38,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.serialization-2.4.0/oslo.serialization.egg-info/PKG-INFO new/oslo.serialization-2.13.0/oslo.serialization.egg-info/PKG-INFO
--- old/oslo.serialization-2.4.0/oslo.serialization.egg-info/PKG-INFO 2016-02-25 07:07:39.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo.serialization.egg-info/PKG-INFO 2016-08-10 14:18:40.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: oslo.serialization
-Version: 2.4.0
+Version: 2.13.0
Summary: Oslo Serialization library
Home-page: http://launchpad.net/oslo
Author: OpenStack
@@ -38,3 +38,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.serialization-2.4.0/oslo.serialization.egg-info/SOURCES.txt new/oslo.serialization-2.13.0/oslo.serialization.egg-info/SOURCES.txt
--- old/oslo.serialization-2.4.0/oslo.serialization.egg-info/SOURCES.txt 2016-02-25 07:07:39.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo.serialization.egg-info/SOURCES.txt 2016-08-10 14:18:40.000000000 +0200
@@ -30,6 +30,11 @@
oslo_serialization/base64.py
oslo_serialization/jsonutils.py
oslo_serialization/msgpackutils.py
+oslo_serialization/serializer/__init__.py
+oslo_serialization/serializer/base_serializer.py
+oslo_serialization/serializer/json_serializer.py
+oslo_serialization/serializer/msgpack_serializer.py
oslo_serialization/tests/__init__.py
oslo_serialization/tests/test_base64.py
-oslo_serialization/tests/test_jsonutils.py
\ No newline at end of file
+oslo_serialization/tests/test_jsonutils.py
+oslo_serialization/tests/test_msgpackutils.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/oslo.serialization.egg-info/pbr.json new/oslo.serialization-2.13.0/oslo.serialization.egg-info/pbr.json
--- old/oslo.serialization-2.4.0/oslo.serialization.egg-info/pbr.json 2016-02-25 07:07:39.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo.serialization.egg-info/pbr.json 2016-08-10 14:18:40.000000000 +0200
@@ -1 +1 @@
-{"git_version": "6b5116b", "is_release": true}
\ No newline at end of file
+{"git_version": "1f86a66", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/oslo.serialization.egg-info/requires.txt new/oslo.serialization-2.13.0/oslo.serialization.egg-info/requires.txt
--- old/oslo.serialization-2.4.0/oslo.serialization.egg-info/requires.txt 2016-02-25 07:07:39.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo.serialization.egg-info/requires.txt 2016-08-10 14:18:40.000000000 +0200
@@ -1,6 +1,5 @@
pbr>=1.6
-Babel>=1.3
six>=1.9.0
msgpack-python>=0.4.0
-oslo.utils>=3.5.0
+oslo.utils>=3.16.0
pytz>=2013.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/oslo_serialization/jsonutils.py new/oslo.serialization-2.13.0/oslo_serialization/jsonutils.py
--- old/oslo.serialization-2.4.0/oslo_serialization/jsonutils.py 2016-02-25 07:07:09.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo_serialization/jsonutils.py 2016-08-10 14:17:11.000000000 +0200
@@ -43,6 +43,7 @@
import six
import six.moves.xmlrpc_client as xmlrpclib
+ipaddress = importutils.try_import("ipaddress")
netaddr = importutils.try_import("netaddr")
_nasty_type_tests = [inspect.ismodule, inspect.isclass, inspect.ismethod,
@@ -51,12 +52,12 @@
inspect.iscode, inspect.isbuiltin, inspect.isroutine,
inspect.isabstract]
-_simple_types = (six.string_types + six.integer_types
+_simple_types = ((six.text_type,) + six.integer_types
+ (type(None), bool, float))
def to_primitive(value, convert_instances=False, convert_datetime=True,
- level=0, max_depth=3):
+ level=0, max_depth=3, encoding='utf-8'):
"""Convert a complex object into primitives.
Handy for JSON serialization. We can optionally handle instances,
@@ -91,6 +92,11 @@
if isinstance(value, _simple_types):
return value
+ if isinstance(value, six.binary_type):
+ if six.PY3:
+ value = value.decode(encoding=encoding)
+ return value
+
# It's not clear why xmlrpclib created their own DateTime type, but
# for our purposes, make it a datetime type which is explicitly
# handled
@@ -109,6 +115,11 @@
if netaddr and isinstance(value, netaddr.IPAddress):
return six.text_type(value)
+ if ipaddress and isinstance(value,
+ (ipaddress.IPv4Address,
+ ipaddress.IPv6Address)):
+ return six.text_type(value)
+
# value of itertools.count doesn't get caught by nasty_type_tests
# and results in infinite loop when list(value) is called.
if type(value) == itertools.count:
@@ -126,7 +137,7 @@
return 'mock'
if level > max_depth:
- return '?'
+ return None
# The try block may not be necessary after the class check above,
# but just in case ...
@@ -135,10 +146,11 @@
convert_instances=convert_instances,
convert_datetime=convert_datetime,
level=level,
- max_depth=max_depth)
+ max_depth=max_depth,
+ encoding=encoding)
if isinstance(value, dict):
- return dict((recursive(k), recursive(v))
- for k, v in six.iteritems(value))
+ return {recursive(k): recursive(v)
+ for k, v in six.iteritems(value)}
elif hasattr(value, 'iteritems'):
return recursive(dict(value.iteritems()), level=level + 1)
# Python 3 does not have iteritems
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/oslo_serialization/msgpackutils.py new/oslo.serialization-2.13.0/oslo_serialization/msgpackutils.py
--- old/oslo.serialization-2.4.0/oslo_serialization/msgpackutils.py 2016-02-25 07:07:09.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo_serialization/msgpackutils.py 2016-08-10 14:17:11.000000000 +0200
@@ -13,7 +13,7 @@
# under the License.
'''
-Msgpack related utilities.
+MessagePack related utilities.
This module provides a few things:
@@ -41,6 +41,36 @@
netaddr = importutils.try_import("netaddr")
+
+class Interval(object):
+ """Small and/or simple immutable integer/float interval class.
+
+ Interval checking is **inclusive** of the min/max boundaries.
+ """
+
+ def __init__(self, min_value, max_value):
+ if min_value > max_value:
+ raise ValueError("Minimum value %s must be less than"
+ " or equal to maximum value %s" % (min_value,
+ max_value))
+ self._min_value = min_value
+ self._max_value = max_value
+
+ @property
+ def min_value(self):
+ return self._min_value
+
+ @property
+ def max_value(self):
+ return self._max_value
+
+ def __contains__(self, value):
+ return value >= self.min_value and value <= self.max_value
+
+ def __repr__(self):
+ return 'Interval(%s, %s)' % (self._min_value, self._max_value)
+
+
# Expose these so that users don't have to import msgpack to gain these.
PackException = msgpack.PackException
@@ -61,48 +91,115 @@
.. versionadded:: 1.5
"""
- # Applications can assign 0 to 127 to store
- # application-specific type information...
+ reserved_extension_range = Interval(0, 32)
+ """
+ These ranges are **always** reserved for use by ``oslo.serialization`` and
+ its own add-ons extensions (these extensions are meant to be generally
+ applicable to all of python).
+ """
+
+ non_reserved_extension_range = Interval(33, 127)
+ """
+ These ranges are **always** reserved for use by applications building
+ their own type specific handlers (the meaning of extensions in this range
+ will typically vary depending on application).
+ """
+
min_value = 0
+ """
+ Applications can assign 0 to 127 to store application (or library)
+ specific type handlers; see above ranges for what is reserved by this
+ library and what is not.
+ """
+
max_value = 127
+ """
+ Applications can assign 0 to 127 to store application (or library)
+ specific type handlers; see above ranges for what is reserved by this
+ library and what is not.
+ """
def __init__(self):
self._handlers = {}
+ self._num_handlers = 0
self.frozen = False
def __iter__(self):
- return six.itervalues(self._handlers)
+ """Iterates over **all** registered handlers."""
+ for handlers in six.itervalues(self._handlers):
+ for h in handlers:
+ yield h
- def register(self, handler):
+ def register(self, handler, reserved=False, override=False):
"""Register a extension handler to handle its associated type."""
if self.frozen:
raise ValueError("Frozen handler registry can't be modified")
+ if reserved:
+ ok_interval = self.reserved_extension_range
+ else:
+ ok_interval = self.non_reserved_extension_range
ident = handler.identity
- if ident < self.min_value:
+ if ident < ok_interval.min_value:
raise ValueError("Handler '%s' identity must be greater"
- " or equal to %s" % (handler, self.min_value))
- if ident > self.max_value:
+ " or equal to %s" % (handler,
+ ok_interval.min_value))
+ if ident > ok_interval.max_value:
raise ValueError("Handler '%s' identity must be less than"
- " or equal to %s" % (handler, self.max_value))
- if ident in self._handlers:
- raise ValueError("Already registered handler with"
+ " or equal to %s" % (handler,
+ ok_interval.max_value))
+ if ident in self._handlers and override:
+ existing_handlers = self._handlers[ident]
+ # Insert at the front so that overrides get selected before
+ # whatever existed before the override...
+ existing_handlers.insert(0, handler)
+ self._num_handlers += 1
+ elif ident in self._handlers and not override:
+ raise ValueError("Already registered handler(s) with"
" identity %s: %s" % (ident,
self._handlers[ident]))
else:
- self._handlers[ident] = handler
+ self._handlers[ident] = [handler]
+ self._num_handlers += 1
def __len__(self):
- return len(self._handlers)
+ """Return how many extension handlers are registered."""
+ return self._num_handlers
+
+ def __contains__(self, identity):
+ """Return if any handler exists for the given identity (number)."""
+ return identity in self._handlers
+
+ def copy(self, unfreeze=False):
+ """Deep copy the given registry (and its handlers)."""
+ c = type(self)()
+ for ident, handlers in six.iteritems(self._handlers):
+ cloned_handlers = []
+ for h in handlers:
+ if hasattr(h, 'copy'):
+ h = h.copy(c)
+ cloned_handlers.append(h)
+ c._handlers[ident] = cloned_handlers
+ c._num_handlers += len(cloned_handlers)
+ if not unfreeze and self.frozen:
+ c.frozen = True
+ return c
def get(self, identity):
- """Get the handle for the given numeric identity (or none)."""
- return self._handlers.get(identity, None)
+ """Get the handler for the given numeric identity (or none)."""
+ maybe_handlers = self._handlers.get(identity)
+ if maybe_handlers:
+ # Prefer the first (if there are many) as this is how we
+ # override built-in extensions (for those that wish to do this).
+ return maybe_handlers[0]
+ else:
+ return None
def match(self, obj):
"""Match the registries handlers to the given object (or none)."""
- for handler in six.itervalues(self._handlers):
- if isinstance(obj, handler.handles):
- return handler
+ for possible_handlers in six.itervalues(self._handlers):
+ for h in possible_handlers:
+ if isinstance(obj, h.handles):
+ return h
return None
@@ -126,22 +223,42 @@
def __init__(self, registry):
self._registry = registry
+ def copy(self, registry):
+ return type(self)(registry)
+
def serialize(self, dt):
dct = {
- 'day': dt.day,
- 'month': dt.month,
- 'year': dt.year,
- 'hour': dt.hour,
- 'minute': dt.minute,
- 'second': dt.second,
- 'microsecond': dt.microsecond,
+ u'day': dt.day,
+ u'month': dt.month,
+ u'year': dt.year,
+ u'hour': dt.hour,
+ u'minute': dt.minute,
+ u'second': dt.second,
+ u'microsecond': dt.microsecond,
}
if dt.tzinfo:
- dct['tz'] = dt.tzinfo.tzname(None)
+ tz = dt.tzinfo.tzname(None)
+ if six.PY2:
+ tz = tz.decode("ascii")
+ dct[u'tz'] = tz
return dumps(dct, registry=self._registry)
def deserialize(self, blob):
dct = loads(blob, registry=self._registry)
+
+ if six.PY3 and b"day" in dct:
+ # NOTE(sileht): oslo.serialization <= 2.4.1 was
+ # storing thing as unicode for py3 while is was
+ # bytes for py2
+ # For python2, we don't care bytes or unicode works
+ # for dict keys and tz
+ # But for python3, we have some backward compability
+ # to take care in case of the payload have been produced
+ # by python2 and now read by python3
+ dct = dict((k.decode("ascii"), v) for k, v in dct.items())
+ if 'tz' in dct:
+ dct['tz'] = dct['tz'].decode("ascii")
+
dt = datetime.datetime(day=dct['day'],
month=dct['month'],
year=dct['year'],
@@ -205,6 +322,9 @@
def __init__(self, registry):
self._registry = registry
+ def copy(self, registry):
+ return type(self)(registry)
+
def serialize(self, obj):
return dumps(list(obj), registry=self._registry)
@@ -224,6 +344,9 @@
def __init__(self, registry):
self._handler = DateTimeHandler(registry)
+ def copy(self, registry):
+ return type(self)(registry)
+
def serialize(self, obj):
dt = datetime.datetime(*tuple(obj.timetuple())[:6])
return self._handler.serialize(dt)
@@ -240,16 +363,23 @@
def __init__(self, registry):
self._registry = registry
+ def copy(self, registry):
+ return type(self)(registry)
+
def serialize(self, d):
dct = {
- 'year': d.year,
- 'month': d.month,
- 'day': d.day,
+ u'year': d.year,
+ u'month': d.month,
+ u'day': d.day,
}
return dumps(dct, registry=self._registry)
def deserialize(self, blob):
dct = loads(blob, registry=self._registry)
+ if six.PY3 and b"day" in dct:
+ # NOTE(sileht): see DateTimeHandler.deserialize()
+ dct = dict((k.decode("ascii"), v) for k, v in dct.items())
+
return datetime.date(year=dct['year'],
month=dct['month'],
day=dct['day'])
@@ -258,14 +388,14 @@
def _serializer(registry, obj):
handler = registry.match(obj)
if handler is None:
- raise TypeError("No serialization handler registered"
- " for type '%s'" % (type(obj).__name__))
+ raise ValueError("No serialization handler registered"
+ " for type '%s'" % (type(obj).__name__))
return msgpack.ExtType(handler.identity, handler.serialize(obj))
def _unserializer(registry, code, data):
handler = registry.get(code)
- if handler is None:
+ if not handler:
return msgpack.ExtType(code, data)
else:
return handler.deserialize(data)
@@ -273,15 +403,15 @@
def _create_default_registry():
registry = HandlerRegistry()
- registry.register(DateTimeHandler(registry))
- registry.register(DateHandler(registry))
- registry.register(UUIDHandler())
- registry.register(CountHandler())
- registry.register(SetHandler(registry))
- registry.register(FrozenSetHandler(registry))
+ registry.register(DateTimeHandler(registry), reserved=True)
+ registry.register(DateHandler(registry), reserved=True)
+ registry.register(UUIDHandler(), reserved=True)
+ registry.register(CountHandler(), reserved=True)
+ registry.register(SetHandler(registry), reserved=True)
+ registry.register(FrozenSetHandler(registry), reserved=True)
if netaddr is not None:
- registry.register(NetAddrIPHandler())
- registry.register(XMLRPCDateTimeHandler(registry))
+ registry.register(NetAddrIPHandler(), reserved=True)
+ registry.register(XMLRPCDateTimeHandler(registry), reserved=True)
registry.frozen = True
return registry
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/oslo_serialization/serializer/base_serializer.py new/oslo.serialization-2.13.0/oslo_serialization/serializer/base_serializer.py
--- old/oslo.serialization-2.4.0/oslo_serialization/serializer/base_serializer.py 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo_serialization/serializer/base_serializer.py 2016-08-10 14:17:11.000000000 +0200
@@ -0,0 +1,58 @@
+# Copyright 2016 Mirantis, Inc.
+#
+# 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.
+
+"""
+Unified and simplified API for oslo.serialization's serializers.
+"""
+
+
+import abc
+import six
+
+
+(a)six.add_metaclass(abc.ABCMeta)
+class BaseSerializer(object):
+ """Generic (de-)serialization definition abstract base class."""
+
+ @abc.abstractmethod
+ def dump(self, obj, fp):
+ """Serialize ``obj`` as a stream to ``fp``.
+
+ :param obj: python object to be serialized
+ :param fp: ``.write()``-supporting file-like object
+ """
+
+ @abc.abstractmethod
+ def dump_as_bytes(self, obj):
+ """Serialize ``obj`` to a byte string.
+
+ :param obj: python object to be serialized
+ :returns: byte string
+ """
+
+ @abc.abstractmethod
+ def load(self, fp):
+ """Deserialize ``fp`` to a python object.
+
+ :param fp: ``.read()``-supporting file-like object
+ :returns: python object
+ """
+
+ @abc.abstractmethod
+ def load_from_bytes(self, s):
+ """Deserialize ``s`` to a python object.
+
+ :param s: byte string to be deserialized
+ :returns: python object
+ """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/oslo_serialization/serializer/json_serializer.py new/oslo.serialization-2.13.0/oslo_serialization/serializer/json_serializer.py
--- old/oslo.serialization-2.4.0/oslo_serialization/serializer/json_serializer.py 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo_serialization/serializer/json_serializer.py 2016-08-10 14:17:11.000000000 +0200
@@ -0,0 +1,38 @@
+# Copyright 2016 Mirantis, Inc.
+#
+# 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.
+
+
+from oslo_serialization import jsonutils
+from oslo_serialization.serializer.base_serializer import BaseSerializer
+
+
+class JSONSerializer(BaseSerializer):
+ """JSON serializer based on the jsonutils module."""
+
+ def __init__(self, default=jsonutils.to_primitive, encoding='utf-8'):
+ self._default = default
+ self._encoding = encoding
+
+ def dump(self, obj, fp):
+ return jsonutils.dump(obj, fp)
+
+ def dump_as_bytes(self, obj):
+ return jsonutils.dump_as_bytes(obj, default=self._default,
+ encoding=self._encoding)
+
+ def load(self, fp):
+ return jsonutils.load(fp, encoding=self._encoding)
+
+ def load_from_bytes(self, s):
+ return jsonutils.loads(s, encoding=self._encoding)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/oslo_serialization/serializer/msgpack_serializer.py new/oslo.serialization-2.13.0/oslo_serialization/serializer/msgpack_serializer.py
--- old/oslo.serialization-2.4.0/oslo_serialization/serializer/msgpack_serializer.py 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo_serialization/serializer/msgpack_serializer.py 2016-08-10 14:17:11.000000000 +0200
@@ -0,0 +1,36 @@
+# Copyright 2016 Mirantis, Inc.
+#
+# 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.
+
+
+from oslo_serialization import msgpackutils
+from oslo_serialization.serializer.base_serializer import BaseSerializer
+
+
+class MessagePackSerializer(BaseSerializer):
+ """MessagePack serializer based on the msgpackutils module."""
+
+ def __init__(self, registry=None):
+ self._registry = registry
+
+ def dump(self, obj, fp):
+ return msgpackutils.dump(obj, fp, registry=self._registry)
+
+ def dump_as_bytes(self, obj):
+ return msgpackutils.dumps(obj, registry=self._registry)
+
+ def load(self, fp):
+ return msgpackutils.load(fp, registry=self._registry)
+
+ def load_from_bytes(self, s):
+ return msgpackutils.loads(s, registry=self._registry)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/oslo_serialization/tests/test_base64.py new/oslo.serialization-2.13.0/oslo_serialization/tests/test_base64.py
--- old/oslo.serialization-2.4.0/oslo_serialization/tests/test_base64.py 2016-02-25 07:07:09.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo_serialization/tests/test_base64.py 2016-08-10 14:17:11.000000000 +0200
@@ -20,37 +20,37 @@
class Base64Tests(test_base.BaseTestCase):
def test_encode_as_bytes(self):
- self.assertEqual(base64.encode_as_bytes(b'text'),
- b'dGV4dA==')
- self.assertEqual(base64.encode_as_bytes(u'text'),
- b'dGV4dA==')
- self.assertEqual(base64.encode_as_bytes(u'e:\xe9'),
- b'ZTrDqQ==')
- self.assertEqual(base64.encode_as_bytes(u'e:\xe9', encoding='latin1'),
- b'ZTrp')
+ self.assertEqual(b'dGV4dA==',
+ base64.encode_as_bytes(b'text'))
+ self.assertEqual(b'dGV4dA==',
+ base64.encode_as_bytes(u'text'))
+ self.assertEqual(b'ZTrDqQ==',
+ base64.encode_as_bytes(u'e:\xe9'))
+ self.assertEqual(b'ZTrp',
+ base64.encode_as_bytes(u'e:\xe9', encoding='latin1'))
def test_encode_as_text(self):
- self.assertEqual(base64.encode_as_text(b'text'),
- u'dGV4dA==')
- self.assertEqual(base64.encode_as_text(u'text'),
- u'dGV4dA==')
- self.assertEqual(base64.encode_as_text(u'e:\xe9'),
- u'ZTrDqQ==')
- self.assertEqual(base64.encode_as_text(u'e:\xe9', encoding='latin1'),
- u'ZTrp')
+ self.assertEqual(u'dGV4dA==',
+ base64.encode_as_text(b'text'))
+ self.assertEqual(u'dGV4dA==',
+ base64.encode_as_text(u'text'))
+ self.assertEqual(u'ZTrDqQ==',
+ base64.encode_as_text(u'e:\xe9'))
+ self.assertEqual(u'ZTrp',
+ base64.encode_as_text(u'e:\xe9', encoding='latin1'))
def test_decode_as_bytes(self):
- self.assertEqual(base64.decode_as_bytes(b'dGV4dA=='),
- b'text')
- self.assertEqual(base64.decode_as_bytes(u'dGV4dA=='),
- b'text')
+ self.assertEqual(b'text',
+ base64.decode_as_bytes(b'dGV4dA=='))
+ self.assertEqual(b'text',
+ base64.decode_as_bytes(u'dGV4dA=='))
def test_decode_as_text(self):
- self.assertEqual(base64.decode_as_text(b'dGV4dA=='),
- u'text')
- self.assertEqual(base64.decode_as_text(u'dGV4dA=='),
- u'text')
- self.assertEqual(base64.decode_as_text(u'ZTrDqQ=='),
- u'e:\xe9')
- self.assertEqual(base64.decode_as_text(u'ZTrp', encoding='latin1'),
- u'e:\xe9')
+ self.assertEqual(u'text',
+ base64.decode_as_text(b'dGV4dA=='))
+ self.assertEqual(u'text',
+ base64.decode_as_text(u'dGV4dA=='))
+ self.assertEqual(u'e:\xe9',
+ base64.decode_as_text(u'ZTrDqQ=='))
+ self.assertEqual(u'e:\xe9',
+ base64.decode_as_text(u'ZTrp', encoding='latin1'))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/oslo_serialization/tests/test_jsonutils.py new/oslo.serialization-2.13.0/oslo_serialization/tests/test_jsonutils.py
--- old/oslo.serialization-2.4.0/oslo_serialization/tests/test_jsonutils.py 2016-02-25 07:07:09.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo_serialization/tests/test_jsonutils.py 2016-08-10 14:17:11.000000000 +0200
@@ -15,6 +15,7 @@
import collections
import datetime
+import ipaddress
import json
import mock
@@ -112,36 +113,39 @@
super(ToPrimitiveTestCase, self).setUp()
self.trans_fixture = self.useFixture(fixture.Translation())
+ def test_bytes(self):
+ self.assertEqual(jsonutils.to_primitive(b'abc'), 'abc')
+
def test_list(self):
- self.assertEqual(jsonutils.to_primitive([1, 2, 3]), [1, 2, 3])
+ self.assertEqual([1, 2, 3], jsonutils.to_primitive([1, 2, 3]))
def test_empty_list(self):
- self.assertEqual(jsonutils.to_primitive([]), [])
+ self.assertEqual([], jsonutils.to_primitive([]))
def test_tuple(self):
- self.assertEqual(jsonutils.to_primitive((1, 2, 3)), [1, 2, 3])
+ self.assertEqual([1, 2, 3], jsonutils.to_primitive((1, 2, 3)))
def test_dict(self):
- self.assertEqual(jsonutils.to_primitive(dict(a=1, b=2, c=3)),
- dict(a=1, b=2, c=3))
+ self.assertEqual(dict(a=1, b=2, c=3),
+ jsonutils.to_primitive(dict(a=1, b=2, c=3)))
def test_empty_dict(self):
- self.assertEqual(jsonutils.to_primitive({}), {})
+ self.assertEqual({}, jsonutils.to_primitive({}))
def test_datetime(self):
x = datetime.datetime(1920, 2, 3, 4, 5, 6, 7)
- self.assertEqual(jsonutils.to_primitive(x),
- '1920-02-03T04:05:06.000007')
+ self.assertEqual('1920-02-03T04:05:06.000007',
+ jsonutils.to_primitive(x))
def test_datetime_preserve(self):
x = datetime.datetime(1920, 2, 3, 4, 5, 6, 7)
- self.assertEqual(jsonutils.to_primitive(x, convert_datetime=False), x)
+ self.assertEqual(x, jsonutils.to_primitive(x, convert_datetime=False))
def test_DateTime(self):
x = xmlrpclib.DateTime()
x.decode("19710203T04:05:06")
- self.assertEqual(jsonutils.to_primitive(x),
- '1971-02-03T04:05:06.000000')
+ self.assertEqual('1971-02-03T04:05:06.000000',
+ jsonutils.to_primitive(x))
def test_iter(self):
class IterClass(object):
@@ -160,7 +164,7 @@
__next__ = next
x = IterClass()
- self.assertEqual(jsonutils.to_primitive(x), [1, 2, 3, 4, 5])
+ self.assertEqual([1, 2, 3, 4, 5], jsonutils.to_primitive(x))
def test_iteritems(self):
class IterItemsClass(object):
@@ -173,7 +177,7 @@
x = IterItemsClass()
p = jsonutils.to_primitive(x)
- self.assertEqual(p, {'a': 1, 'b': 2, 'c': 3})
+ self.assertEqual({'a': 1, 'b': 2, 'c': 3}, p)
def test_iteritems_with_cycle(self):
class IterItemsClass(object):
@@ -204,7 +208,7 @@
x = ItemsClass()
p = jsonutils.to_primitive(x)
- self.assertEqual(p, {'a': 1, 'b': 2, 'c': 3})
+ self.assertEqual({'a': 1, 'b': 2, 'c': 3}, p)
def test_precedence_items_iteritems(self):
class ItemsIterItemsClass(object):
@@ -217,7 +221,7 @@
x = ItemsIterItemsClass()
p = jsonutils.to_primitive(x)
# Prefer iteritems over items
- self.assertEqual(p, {'iteritems': 'iteritems'})
+ self.assertEqual({'iteritems': 'iteritems'}, p)
def test_mapping(self):
# Make sure collections.Mapping is converted to a dict
@@ -237,7 +241,7 @@
x = MappingClass()
p = jsonutils.to_primitive(x)
- self.assertEqual(p, {'a': 1, 'b': 2, 'c': 3})
+ self.assertEqual({'a': 1, 'b': 2, 'c': 3}, p)
def test_instance(self):
class MysteryClass(object):
@@ -247,24 +251,24 @@
self.b = 1
x = MysteryClass()
- self.assertEqual(jsonutils.to_primitive(x, convert_instances=True),
- dict(b=1))
+ self.assertEqual(dict(b=1),
+ jsonutils.to_primitive(x, convert_instances=True))
- self.assertEqual(jsonutils.to_primitive(x), x)
+ self.assertEqual(x, jsonutils.to_primitive(x))
def test_typeerror(self):
x = bytearray # Class, not instance
if six.PY3:
- self.assertEqual(jsonutils.to_primitive(x), u"<class 'bytearray'>")
+ self.assertEqual(u"<class 'bytearray'>", jsonutils.to_primitive(x))
else:
- self.assertEqual(jsonutils.to_primitive(x), u"<type 'bytearray'>")
+ self.assertEqual(u"<type 'bytearray'>", jsonutils.to_primitive(x))
def test_nasties(self):
def foo():
pass
x = [datetime, foo, dir]
ret = jsonutils.to_primitive(x)
- self.assertEqual(len(ret), 3)
+ self.assertEqual(3, len(ret))
self.assertTrue(ret[0].startswith(u"<module 'datetime' from ") or
ret[0].startswith(u"<module 'datetime' (built-in)"))
if six.PY3:
@@ -273,7 +277,7 @@
))
else:
self.assertTrue(ret[1].startswith('<function foo at 0x'))
- self.assertEqual(ret[2], '<built-in function dir>')
+ self.assertEqual('<built-in function dir>', ret[2])
def test_depth(self):
class LevelsGenerator(object):
@@ -288,24 +292,34 @@
l4_obj = LevelsGenerator(4)
- json_l2 = {0: {0: '?'}}
- json_l3 = {0: {0: {0: '?'}}}
- json_l4 = {0: {0: {0: {0: '?'}}}}
+ json_l2 = {0: {0: None}}
+ json_l3 = {0: {0: {0: None}}}
+ json_l4 = {0: {0: {0: {0: None}}}}
ret = jsonutils.to_primitive(l4_obj, max_depth=2)
- self.assertEqual(ret, json_l2)
+ self.assertEqual(json_l2, ret)
ret = jsonutils.to_primitive(l4_obj, max_depth=3)
- self.assertEqual(ret, json_l3)
+ self.assertEqual(json_l3, ret)
ret = jsonutils.to_primitive(l4_obj, max_depth=4)
- self.assertEqual(ret, json_l4)
+ self.assertEqual(json_l4, ret)
- def test_ipaddr(self):
+ def test_ipaddr_using_netaddr(self):
thing = {'ip_addr': netaddr.IPAddress('1.2.3.4')}
ret = jsonutils.to_primitive(thing)
self.assertEqual({'ip_addr': '1.2.3.4'}, ret)
+ def test_ipaddr_using_ipaddress_v4(self):
+ thing = {'ip_addr': ipaddress.ip_address(u'192.168.0.1')}
+ ret = jsonutils.to_primitive(thing)
+ self.assertEqual({'ip_addr': '192.168.0.1'}, ret)
+
+ def test_ipaddr_using_ipaddress_v6(self):
+ thing = {'ip_addr': ipaddress.ip_address(u'2001:db8::')}
+ ret = jsonutils.to_primitive(thing)
+ self.assertEqual({'ip_addr': '2001:db8::'}, ret)
+
def test_message_with_param(self):
msg = self.trans_fixture.lazy('A message with param: %s')
msg = msg % 'test_domain'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/oslo_serialization/tests/test_msgpackutils.py new/oslo.serialization-2.13.0/oslo_serialization/tests/test_msgpackutils.py
--- old/oslo.serialization-2.4.0/oslo_serialization/tests/test_msgpackutils.py 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.serialization-2.13.0/oslo_serialization/tests/test_msgpackutils.py 2016-08-10 14:17:11.000000000 +0200
@@ -0,0 +1,214 @@
+# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
+#
+# 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 datetime
+import itertools
+import uuid
+
+import netaddr
+from oslotest import base as test_base
+from pytz import timezone
+import six
+import six.moves.xmlrpc_client as xmlrpclib
+
+from oslo_serialization import msgpackutils
+
+
+_TZ_FMT = '%Y-%m-%d %H:%M:%S %Z%z'
+
+
+class Color(object):
+ def __init__(self, r, g, b):
+ self.r = r
+ self.g = g
+ self.b = b
+
+
+class ColorHandler(object):
+ handles = (Color,)
+ identity = (
+ msgpackutils.HandlerRegistry.non_reserved_extension_range.min_value + 1
+ )
+
+ @staticmethod
+ def serialize(obj):
+ blob = '%s, %s, %s' % (obj.r, obj.g, obj.b)
+ if six.PY3:
+ blob = blob.encode("ascii")
+ return blob
+
+ @staticmethod
+ def deserialize(data):
+ chunks = [int(c.strip()) for c in data.split(b",")]
+ return Color(chunks[0], chunks[1], chunks[2])
+
+
+class MySpecialSetHandler(object):
+ handles = (set,)
+ identity = msgpackutils.SetHandler.identity
+
+
+def _dumps_loads(obj):
+ obj = msgpackutils.dumps(obj)
+ return msgpackutils.loads(obj)
+
+
+class MsgPackUtilsTest(test_base.BaseTestCase):
+ def test_list(self):
+ self.assertEqual([1, 2, 3], _dumps_loads([1, 2, 3]))
+
+ def test_empty_list(self):
+ self.assertEqual([], _dumps_loads([]))
+
+ def test_tuple(self):
+ # Seems like we do lose whether it was a tuple or not...
+ #
+ # Maybe fixed someday:
+ #
+ # https://github.com/msgpack/msgpack-python/issues/98
+ self.assertEqual([1, 2, 3], _dumps_loads((1, 2, 3)))
+
+ def test_dict(self):
+ self.assertEqual(dict(a=1, b=2, c=3),
+ _dumps_loads(dict(a=1, b=2, c=3)))
+
+ def test_empty_dict(self):
+ self.assertEqual({}, _dumps_loads({}))
+
+ def test_complex_dict(self):
+ src = {
+ 'now': datetime.datetime(1920, 2, 3, 4, 5, 6, 7),
+ 'later': datetime.datetime(1921, 2, 3, 4, 5, 6, 9),
+ 'a': 1,
+ 'b': 2.0,
+ 'c': [],
+ 'd': set([1, 2, 3]),
+ 'zzz': uuid.uuid4(),
+ 'yyy': 'yyy',
+ 'ddd': b'bbb',
+ 'today': datetime.date.today(),
+ }
+ self.assertEqual(src, _dumps_loads(src))
+
+ def test_itercount(self):
+ it = itertools.count(1)
+ six.next(it)
+ six.next(it)
+ it2 = _dumps_loads(it)
+ self.assertEqual(six.next(it), six.next(it2))
+
+ it = itertools.count(0)
+ it2 = _dumps_loads(it)
+ self.assertEqual(six.next(it), six.next(it2))
+
+ def test_itercount_step(self):
+ it = itertools.count(1, 3)
+ it2 = _dumps_loads(it)
+ self.assertEqual(six.next(it), six.next(it2))
+
+ def test_set(self):
+ self.assertEqual(set([1, 2]), _dumps_loads(set([1, 2])))
+
+ def test_empty_set(self):
+ self.assertEqual(set([]), _dumps_loads(set([])))
+
+ def test_frozenset(self):
+ self.assertEqual(frozenset([1, 2]), _dumps_loads(frozenset([1, 2])))
+
+ def test_empty_frozenset(self):
+ self.assertEqual(frozenset([]), _dumps_loads(frozenset([])))
+
+ def test_datetime_preserve(self):
+ x = datetime.datetime(1920, 2, 3, 4, 5, 6, 7)
+ self.assertEqual(x, _dumps_loads(x))
+
+ def test_datetime(self):
+ x = xmlrpclib.DateTime()
+ x.decode("19710203T04:05:06")
+ self.assertEqual(x, _dumps_loads(x))
+
+ def test_ipaddr(self):
+ thing = {'ip_addr': netaddr.IPAddress('1.2.3.4')}
+ self.assertEqual(thing, _dumps_loads(thing))
+
+ def test_today(self):
+ today = datetime.date.today()
+ self.assertEqual(today, _dumps_loads(today))
+
+ def test_datetime_tz_clone(self):
+ eastern = timezone('US/Eastern')
+ now = datetime.datetime.now()
+ e_dt = eastern.localize(now)
+ e_dt2 = _dumps_loads(e_dt)
+ self.assertEqual(e_dt, e_dt2)
+ self.assertEqual(e_dt.strftime(_TZ_FMT), e_dt2.strftime(_TZ_FMT))
+
+ def test_datetime_tz_different(self):
+ eastern = timezone('US/Eastern')
+ pacific = timezone('US/Pacific')
+ now = datetime.datetime.now()
+
+ e_dt = eastern.localize(now)
+ p_dt = pacific.localize(now)
+
+ self.assertNotEqual(e_dt, p_dt)
+ self.assertNotEqual(e_dt.strftime(_TZ_FMT), p_dt.strftime(_TZ_FMT))
+
+ e_dt2 = _dumps_loads(e_dt)
+ p_dt2 = _dumps_loads(p_dt)
+
+ self.assertNotEqual(e_dt2, p_dt2)
+ self.assertNotEqual(e_dt2.strftime(_TZ_FMT), p_dt2.strftime(_TZ_FMT))
+
+ self.assertEqual(e_dt, e_dt2)
+ self.assertEqual(p_dt, p_dt2)
+
+ def test_copy_then_register(self):
+ registry = msgpackutils.default_registry
+ self.assertRaises(ValueError,
+ registry.register, MySpecialSetHandler(),
+ reserved=True, override=True)
+ registry = registry.copy(unfreeze=True)
+ registry.register(MySpecialSetHandler(),
+ reserved=True, override=True)
+ h = registry.match(set())
+ self.assertIsInstance(h, MySpecialSetHandler)
+
+ def test_bad_register(self):
+ registry = msgpackutils.default_registry
+ self.assertRaises(ValueError,
+ registry.register, MySpecialSetHandler(),
+ reserved=True, override=True)
+ self.assertRaises(ValueError,
+ registry.register, MySpecialSetHandler())
+ registry = registry.copy(unfreeze=True)
+ registry.register(ColorHandler())
+
+ self.assertRaises(ValueError,
+ registry.register, ColorHandler())
+
+ def test_custom_register(self):
+ registry = msgpackutils.default_registry.copy(unfreeze=True)
+ registry.register(ColorHandler())
+
+ c = Color(255, 254, 253)
+ c_b = msgpackutils.dumps(c, registry=registry)
+ c = msgpackutils.loads(c_b, registry=registry)
+
+ self.assertEqual(255, c.r)
+ self.assertEqual(254, c.g)
+ self.assertEqual(253, c.b)
+
+ def test_object(self):
+ self.assertRaises(ValueError, msgpackutils.dumps, object())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/requirements.txt new/oslo.serialization-2.13.0/requirements.txt
--- old/oslo.serialization-2.4.0/requirements.txt 2016-02-25 07:07:09.000000000 +0100
+++ new/oslo.serialization-2.13.0/requirements.txt 2016-08-10 14:17:11.000000000 +0200
@@ -8,8 +8,7 @@
# that is a likely indicator that the feature belongs somewhere else.
pbr>=1.6 # Apache-2.0
-Babel>=1.3 # BSD
six>=1.9.0 # MIT
msgpack-python>=0.4.0 # Apache-2.0
-oslo.utils>=3.5.0 # Apache-2.0
+oslo.utils>=3.16.0 # Apache-2.0
pytz>=2013.6 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/setup.cfg new/oslo.serialization-2.13.0/setup.cfg
--- old/oslo.serialization-2.4.0/setup.cfg 2016-02-25 07:07:39.000000000 +0100
+++ new/oslo.serialization-2.13.0/setup.cfg 2016-08-10 14:18:40.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 = 1
[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.serialization-2.4.0/test-requirements.txt new/oslo.serialization-2.13.0/test-requirements.txt
--- old/oslo.serialization-2.4.0/test-requirements.txt 2016-02-25 07:07:09.000000000 +0100
+++ new/oslo.serialization-2.13.0/test-requirements.txt 2016-08-10 14:17:11.000000000 +0200
@@ -2,11 +2,12 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking<0.11,>=0.10.0
-mock>=1.2 # BSD
+ipaddress>=1.0.7;python_version<'3.3' # PSF
+mock>=2.0 # BSD
netaddr!=0.7.16,>=0.7.12 # BSD
# this is required for the docs build jobs
-sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD
+sphinx!=1.3b1,<1.3,>=1.2.1 # BSD
oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.4.0/tox.ini new/oslo.serialization-2.13.0/tox.ini
--- old/oslo.serialization-2.4.0/tox.ini 2016-02-25 07:07:09.000000000 +0100
+++ new/oslo.serialization-2.13.0/tox.ini 2016-08-10 14:17:11.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_serialization --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
[testenv:pip-missing-reqs]
# do not install test-requirements as that will pollute the virtualenv for
1
0
Hello community,
here is the log from the commit of package python-oslo.reports for openSUSE:Factory checked in at 2016-09-30 15:29:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.reports (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.reports.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.reports"
Changes:
--------
New Changes file:
--- /dev/null 2016-09-15 12:42:18.240042505 +0200
+++ /work/SRC/openSUSE:Factory/.python-oslo.reports.new/python-oslo.reports.changes 2016-09-30 15:29:39.000000000 +0200
@@ -0,0 +1,97 @@
+-------------------------------------------------------------------
+Wed Aug 31 13:12:29 UTC 2016 - tbechtold(a)suse.com
+
+- update to version 1.14.0
+ * Updated from global requirements
+
+-------------------------------------------------------------------
+Wed Aug 10 12:26:13 UTC 2016 - tbechtold(a)suse.com
+
+- update to 1.13.0:
+ * Updated from global requirements
+ * Add Python 3.5 classifier and venv
+ * Use file modification events instead of signal handler
+ * Imported Translations from Zanata
+ * Trivial: ignore openstack/common in flake8 exclude list
+ * Remove direct dependency on babel
+- Update _service and switch to upstream spec template
+
+-------------------------------------------------------------------
+Mon Apr 4 11:45:19 UTC 2016 - tbechtold(a)suse.com
+
+- update to 1.7.0:
+ * Updated from global requirements
+ * Update .gitreview for stable/mitaka
+
+-------------------------------------------------------------------
+Thu Mar 3 16:21:07 UTC 2016 - tbechtold(a)suse.com
+
+- update to 1.6.0:
+ * Updated from global requirements
+ * Updated from global requirements
+ * Updated from global requirements
+ * Update translation setup
+ * Updated from global requirements
+ * Updated from global requirements
+ * Updated from global requirements
+ * Updated from global requirements
+ * Updated from global requirements
+ * Updated from global requirements
+ * Print the traceback if there was an exception in run(
+ * Rename signal handler argument to 'frame'
+ * Updated from global requirements
+ * Updated from global requirements
+ * Trival: Remove 'MANIFEST.in'
+ * Drop python 2.6 support
+ * Updated from global requirements
+ * Remove Python 2.6 classifier
+ * Updated from global requirements
+ * Remove python 2.6 and cleanup tox.ini
+ * Fix Transition to SIGUSR2 in oslo.reports breaks upgrade
+ * Updated from global requirements
+ * Updated from global requirements
+ * Updated from global requirements
+ * Fix a typo in process.py
+ * remove extraneous coverage omit instruction
+- Adjust Requires
+
+-------------------------------------------------------------------
+Wed Oct 21 06:39:12 UTC 2015 - dmueller(a)suse.com
+
+- update to 0.7.0:
+ * No need for Oslo Incubator Sync
+ * Fix coverage configuration and execution
+ * How to use oslo.reports documentation
+ * add auto-generated api documentation
+ * clean up release notes in toctree
+ * add auto-generated docs for config options
+ * Add shields.io version/downloads links/badges into README.rst
+ * Updated from global requirements
+ * guru_meditation_report: Use SIGUSR2 instead of SIGUSR1
+
+-------------------------------------------------------------------
+Wed Sep 9 07:09:23 UTC 2015 - tbechtold(a)suse.com
+
+- update to 0.5.0:
+ * Updated from global requirements
+ * Add a configuration for the directory to generate gmr
+ * Fill README from information in the wiki
+ * Setup translations
+- Adjust Requires
+
+-------------------------------------------------------------------
+Mon Aug 3 10:02:51 UTC 2015 - tbechtold(a)suse.com
+
+- update to 0.3.0:
+ * Updated from global requirements
+ * Fix mock of open(
+ * Fix GMR break with new psutil versions
+ * Add oslo.utils dependency
+ * Add tox target to find missing requirements
+- Adjust Requires
+
+-------------------------------------------------------------------
+Mon Jul 6 11:40:06 UTC 2015 - rsalevsky(a)suse.com
+
+- initial package creation
+
New:
----
_service
oslo.reports-1.14.0.tar.gz
python-oslo.reports.changes
python-oslo.reports.spec
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.reports.spec ++++++
#
# spec file for package python-oslo.reports
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%global sname oslo.reports
Name: python-oslo.reports
Version: 1.14.0
Release: 0
Summary: OpenStack oslo.reports library
License: Apache-2.0
Group: Development/Languages/Python
Url: https://launchpad.net/%{sname}
Source0: https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
BuildRequires: python-Jinja2 >= 2.8
BuildRequires: python-devel
BuildRequires: python-eventlet >= 0.18.2
BuildRequires: python-greenlet >= 0.3.2
BuildRequires: python-oslo.config >= 3.14.0
BuildRequires: python-oslo.i18n >= 2.1.0
BuildRequires: python-oslo.serialization >= 1.10.0
BuildRequires: python-oslo.utils >= 3.16.0
BuildRequires: python-oslotest >= 1.10.0
BuildRequires: python-pbr >= 1.6
BuildRequires: python-psutil >= 1.1.1
BuildRequires: python-six >= 1.9.0
Requires: python-Jinja2 >= 2.8
Requires: python-oslo.i18n >= 2.1.0
Requires: python-oslo.serialization >= 1.10.0
Requires: python-oslo.utils >= 3.16.0
Requires: python-psutil >= 1.1.1
Requires: python-six >= 1.9.0
BuildArch: noarch
%description
The project oslo.reports hosts a general purpose error report generation
framework, known as the "guru meditation report".
%package doc
Summary: Documentation for OpenStack reports library
Group: Development/Languages/Python
BuildRequires: python-Sphinx
BuildRequires: python-oslosphinx >= 2.5.0
%description doc
The project oslo.reports hosts a general purpose error report generation
framework, known as the "guru meditation report".
This package contains the documentation.
%prep
%setup -q -n %{sname}-%{version}
%build
%{py2_build}
# generate html docs
%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
%{py2_install}
%check
%{__python2} setup.py testr
%files
%license LICENSE
%doc README.rst ChangeLog
%{python2_sitelib}/oslo_reports
%{python2_sitelib}/*.egg-info
%files doc
%license LICENSE
%doc doc/build/html
%changelog
++++++ _service ++++++
<services>
<service mode="disabled" name="renderspec">
<param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/…</param>
<param name="output-name">python-oslo.reports.spec</param>
<param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-req…</param>
</service>
<service mode="disabled" name="download_files">
<param name="changesgenerate">enable</param>
</service>
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
</services>
1
0
Hello community,
here is the log from the commit of package python-oslo.policy for openSUSE:Factory checked in at 2016-09-30 15:29:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.policy (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.policy.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.policy"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.policy/python-oslo.policy.changes 2016-05-19 12:14:42.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-oslo.policy.new/python-oslo.policy.changes 2016-09-30 15:29:26.000000000 +0200
@@ -1,0 +2,58 @@
+Wed Aug 31 16:24:48 UTC 2016 - tbechtold(a)suse.com
+
+- update to version 1.14.0
+ * Revert "Adds debug logging for policy file validation"
+ * Delete H803 in flake8 ignore
+ * Allow policy file to not exist
+ * Updated from global requirements
+
+-------------------------------------------------------------------
+Wed Aug 10 14:42:42 UTC 2016 - tbechtold(a)suse.com
+
+- update to version 1.13.0
+ * Fix mispelled method name in setup.cfg
+ * Add note about not all APIs support policy enforcement by user_id
+ * Imported Translations from Zanata
+ * Fixed unit tests running on Windows
+ * Add Python 3.5 classifier and venv
+ * Adds debug logging for policy file validation
+ * Updated from global requirements
+
+-------------------------------------------------------------------
+Mon Jul 4 15:52:41 UTC 2016 - tbechtold(a)suse.com
+
+- update to 1.11.0:
+ * Updated from global requirements
+ * Imported Translations from Zanata
+ * Improve policy sample generation testing
+ * Add helper scripts for generating policy info
+
+-------------------------------------------------------------------
+Mon Jul 4 10:10:41 UTC 2016 - tbechtold(a)suse.com
+
+- update to 1.9.0:
+ * Add sample file generation script and helper methods
+ * Add equality operator to policy.RuleDefault
+ * Imported Translations from Zanata
+ * Updated from global requirements
+ * Fix typo: 'olso' to 'oslo'
+ * Updated from global requirements
+ * Updated from global requirements
+ * Add reno for release notes management
+ * Add policy registration and authorize method
+ * Updated from global requirements
+ * doc: Fix wrong import statement in usage
+
+-------------------------------------------------------------------
+Sat Jun 4 06:13:56 UTC 2016 - tbechtold(a)suse.com
+
+- update to 1.8.0:
+ * Trivial: ignore openstack/common in flake8 exclude list
+ * Updated from global requirements
+ * Imported Translations from Zanata
+ * Deprecate load_json() in favor of load()
+ * Support policy file in YAML
+- use renderspec source service
+- update spec from upstream
+
+-------------------------------------------------------------------
Old:
----
oslo.policy-1.5.0.tar.gz
New:
----
oslo.policy-1.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.policy.spec ++++++
--- /var/tmp/diff_new_pack.SUNsSX/_old 2016-09-30 15:29:28.000000000 +0200
+++ /var/tmp/diff_new_pack.SUNsSX/_new 2016-09-30 15:29:28.000000000 +0200
@@ -17,30 +17,31 @@
%global sname oslo.policy
-
Name: python-oslo.policy
-Version: 1.5.0
+Version: 1.14.0
Release: 0
Summary: OpenStack Oslo Policy library
License: Apache-2.0
Group: Documentation
Url: https://launchpad.net/%sname
-Source0: https://pypi.python.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.…
+Source0: https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
+BuildRequires: python-PyYAML >= 3.1.0
BuildRequires: python-devel
-BuildRequires: python-oslo.config >= 3.4.0
+BuildRequires: python-oslo.config >= 3.14.0
BuildRequires: python-oslo.i18n >= 2.1.0
BuildRequires: python-oslo.serialization >= 1.10.0
-BuildRequires: python-oslo.utils >= 3.5.0
+BuildRequires: python-oslo.utils >= 3.16.0
BuildRequires: python-oslotest >= 1.10.0
-BuildRequires: python-pbr
-BuildRequires: python-requests >= 2.8.1
-BuildRequires: python-requests-mock >= 0.7.0
-Requires: python-oslo.config >= 3.4.0
+BuildRequires: python-pbr >= 1.6
+BuildRequires: python-requests >= 2.10.0
+BuildRequires: python-requests-mock >= 1.0
+Requires: python-PyYAML >= 3.1.0
+Requires: python-oslo.config >= 3.14.0
Requires: python-oslo.i18n >= 2.1.0
Requires: python-oslo.serialization >= 1.10.0
-Requires: python-oslo.utils >= 3.5.0
-Requires: python-requests >= 2.8.1
+Requires: python-oslo.utils >= 3.16.0
+Requires: python-requests >= 2.10.0
Requires: python-six >= 1.9.0
BuildArch: noarch
@@ -51,7 +52,7 @@
%package doc
Summary: Documentation for the Oslo Policy library
Group: Documentation
-BuildRequires: python-Sphinx >= 1.1.2
+BuildRequires: python-Sphinx
BuildRequires: python-oslosphinx >= 2.5.0
%description doc
@@ -61,7 +62,7 @@
%setup -q -n %{sname}-%{version}
%build
-%{__python2} setup.py build
+%{py2_build}
# generate html docs
%{__python2} setup.py build_sphinx
@@ -69,7 +70,7 @@
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
-%{__python2} setup.py install --skip-build --root %{buildroot}
+%{py2_install}
%check
%{__python2} setup.py testr
@@ -78,6 +79,9 @@
%license LICENSE
%doc README.rst
%{_bindir}/oslopolicy-checker
+%{_bindir}/oslopolicy-list-redundant
+%{_bindir}/oslopolicy-policy-generator
+%{_bindir}/oslopolicy-sample-generator
%{python2_sitelib}/oslo_policy
%{python2_sitelib}/*.egg-info
++++++ _service ++++++
--- /var/tmp/diff_new_pack.SUNsSX/_old 2016-09-30 15:29:28.000000000 +0200
+++ /var/tmp/diff_new_pack.SUNsSX/_new 2016-09-30 15:29:28.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/…</param>
+ <param name="output-name">python-oslo.policy.spec</param>
+ <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-req…</param>
+ </service>
<service mode="disabled" name="download_files">
<param name="changesgenerate">enable</param>
</service>
- <service mode="disabled" name="set_version">
- <param name="basename">oslo.policy</param>
- </service>
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
- <service name="python_requires" mode="disabled">
- </service>
</services>
++++++ oslo.policy-1.5.0.tar.gz -> oslo.policy-1.14.0.tar.gz ++++++
++++ 3284 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-oslo.log for openSUSE:Factory checked in at 2016-09-30 15:29:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.log (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.log.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.log"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.log/python-oslo.log.changes 2016-05-04 08:19:39.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-oslo.log.new/python-oslo.log.changes 2016-09-30 15:29:25.000000000 +0200
@@ -1,0 +2,55 @@
+Tue Aug 30 16:18:31 UTC 2016 - tbechtold(a)suse.com
+
+- update to version 3.16.0
+ * Remove discover from test-requirements
+ * Fixes unit tests on Windows
+ * Fix parameters of assertEqual are misplaced
+ * Updated from global requirements
+ * Add Python 3.5 classifier and venv
+
+-------------------------------------------------------------------
+Wed Aug 10 14:40:34 UTC 2016 - tbechtold(a)suse.com
+
+- update to version 3.12.0
+ * log: don't create foo.log
+ * Improve olso.log test coverage for edge cases
+ * log: Introduce _iter_loggers
+ * Replace "LOG.exception(_" with "LOG.exception(_LE"
+ * Make available to log encoded strings as arguments
+ * Revert "Remove 'verbose' option"
+ * Imported Translations from Zanata
+ * Convert unicode data to utf-8 before calling syslog.syslog()
+ * Provide a normal method for deprecation warnings.
+ * Fix regression causing the default log level to become WARNING
+ * Use new logging specific method for context info
+ * Fix typo: 'Olso' to 'Oslo'
+ * Reload log_config_append config on SIGHUP
+ * Updated from global requirements
+ * Remove 'verbose' option
+ * Reduce READ_FREQ and TIMEOUT for watch-file
+
+-------------------------------------------------------------------
+Tue May 31 05:44:29 UTC 2016 - tbechtold(a)suse.com
+
+- update to 3.7.0:
+ * Fix example issue
+ * Updated from global requirements
+ * Allow reload of 'debug' option
+ * Imported Translations from Zanata
+ * Remove direct dependency on babel
+ * Updated from global requirements
+ * Updated from global requirements
+ * Updated from global requirements
+ * Remove outdated comment in ContextFormatter
+ * Enable log_method_call to work on static method
+ * Explicitly exclude tests from bandit scan
+ * Improve test code coverage of _options
+ * Update reno for stable/mitaka
+ * Unit test cleanup and validation improvements
+ * Added +2 release names for versionutils
+ * Fix broken links in docs usage page
+ * Enable bandit in gate
+ * Updated from global requirements
+- Use renderspec service to update .spec file
+
+-------------------------------------------------------------------
Old:
----
oslo.log-3.2.0.tar.gz
New:
----
oslo.log-3.16.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.log.spec ++++++
--- /var/tmp/diff_new_pack.xc8ecv/_old 2016-09-30 15:29:26.000000000 +0200
+++ /var/tmp/diff_new_pack.xc8ecv/_new 2016-09-30 15:29:26.000000000 +0200
@@ -16,76 +16,81 @@
#
-%define version_unconverted 3.2.0
-
+%global sname oslo.log
Name: python-oslo.log
-Version: 3.2.0
+Version: 3.16.0
Release: 0
-Summary: OpenStack logging API
+Summary: OpenStack log library
License: Apache-2.0
Group: Development/Languages/Python
-Url: https://launchpad.net/oslo/
-Source: https://pypi.python.org/packages/source/o/oslo.log/oslo.log-%{version}.tar.…
-BuildRequires: openstack-suse-macros
+Url: https://launchpad.net/%{sname}
+Source0: https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
+BuildRequires: openstack-macros
BuildRequires: python-devel
-BuildRequires: python-pbr
-# Test requirements
-BuildRequires: python-coverage
-BuildRequires: python-debtcollector
-BuildRequires: python-fixtures
-BuildRequires: python-mock
-BuildRequires: python-oslo.config
-BuildRequires: python-oslo.context
-BuildRequires: python-oslo.i18n
-BuildRequires: python-oslo.serialization
-BuildRequires: python-oslo.utils
-BuildRequires: python-oslosphinx
-BuildRequires: python-oslotest
-BuildRequires: python-pyinotify
-BuildRequires: python-python-dateutil
-BuildRequires: python-python-subunit
-BuildRequires: python-sphinx
-BuildRequires: python-testrepository
-BuildRequires: python-testscenarios
-BuildRequires: python-testtools
-
-Requires: python-Babel >= 1.3
+BuildRequires: python-mock >= 2.0
+BuildRequires: python-oslo.config >= 3.14.0
+BuildRequires: python-oslo.context >= 2.6.0
+BuildRequires: python-oslo.i18n >= 2.1.0
+BuildRequires: python-oslo.serialization >= 1.10.0
+BuildRequires: python-oslo.utils >= 3.16.0
+BuildRequires: python-oslotest >= 1.10.0
+BuildRequires: python-pbr >= 1.6
+BuildRequires: python-pyinotify >= 0.9.6
+BuildRequires: python-python-dateutil >= 2.4.2
+BuildRequires: python-python-subunit >= 0.0.18
+BuildRequires: python-six >= 1.9.0
+BuildRequires: python-testrepository >= 0.0.18
+BuildRequires: python-testscenarios >= 0.4
+BuildRequires: python-testtools >= 1.4.0
Requires: python-debtcollector >= 1.2.0
-Requires: python-oslo.config >= 3.4.0
-Requires: python-oslo.context >= 0.2.0
+Requires: python-oslo.config >= 3.14.0
+Requires: python-oslo.context >= 2.6.0
Requires: python-oslo.i18n >= 2.1.0
Requires: python-oslo.serialization >= 1.10.0
-Requires: python-oslo.utils >= 3.5.0
+Requires: python-oslo.utils >= 3.16.0
Requires: python-pyinotify >= 0.9.6
Requires: python-python-dateutil >= 2.4.2
Requires: python-six >= 1.9.0
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
BuildArch: noarch
-%endif
%description
-OpenStack logging configuration library provides standardized configuration for
-all openstack projects. It also provides custom formatters, handlers and
-support for context specific logging (like resource ids etc).
+OpenStack logging configuration library provides standardized configuration
+for all openstack projects.It also provides custom formatters, handlers and
+support for context specific logging (like resource id's etc).
+
+%package doc
+Summary: Documentation for OpenStack log library
+Group: Development/Languages/Python
+BuildRequires: python-Sphinx
+BuildRequires: python-oslosphinx >= 2.5.0
+
+%description doc
+Documentation for the oslo.log library.
%prep
-%setup -q -n oslo.log-%{version}
+%setup -q -n %{sname}-%{version}
%build
-%{__python2} setup.py build
+%{py2_build}
+
+# generate html docs
+%{__python2} setup.py build_sphinx
+rm -rf doc/build/html/.{doctrees,buildinfo}
%install
-%{__python2} setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%{py2_install}
%check
testr init && testr run --parallel
%files
-%defattr(-,root,root,-)
-%doc README.rst LICENSE AUTHORS ChangeLog
-%{python2_sitelib}/*
+%license LICENSE
+%doc ChangeLog README.rst
+%{python2_sitelib}/oslo_log
+%{python2_sitelib}/*.egg-info
+
+%files doc
+%license LICENSE
+%doc doc/build/html
%changelog
++++++ _service ++++++
--- /var/tmp/diff_new_pack.xc8ecv/_old 2016-09-30 15:29:26.000000000 +0200
+++ /var/tmp/diff_new_pack.xc8ecv/_new 2016-09-30 15:29:26.000000000 +0200
@@ -1,14 +1,14 @@
<services>
+ <service mode="disabled" name="renderspec">
+ <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/…</param>
+ <param name="output-name">python-oslo.log.spec</param>
+ <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-req…</param>
+ </service>
<service mode="disabled" name="download_files">
<param name="changesgenerate">enable</param>
<param name="changeslinesmax">300</param>
</service>
- <service mode="disabled" name="set_version">
- <param name="basename">oslo.log</param>
- </service>
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
- <service name="python_requires" mode="disabled">
- </service>
</services>
++++++ oslo.log-3.2.0.tar.gz -> oslo.log-3.16.0.tar.gz ++++++
++++ 2776 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-oslo.i18n for openSUSE:Factory checked in at 2016-09-30 15:29:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.i18n (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.i18n.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.i18n"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.i18n/python-oslo.i18n.changes 2015-10-30 13:42:19.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-oslo.i18n.new/python-oslo.i18n.changes 2016-09-30 15:29:21.000000000 +0200
@@ -1,0 +2,62 @@
+Fri Sep 2 19:09:31 UTC 2016 - tbechtold(a)suse.com
+
+- update to version 3.9.0
+ * Fix parameters of assertEqual are misplaced
+ * Updated from global requirements
+
+-------------------------------------------------------------------
+Wed Aug 10 13:55:18 UTC 2016 - tbechtold(a)suse.com
+
+- - update to version 3.8.0
+ * Imported Translations from Zanata
+ * Updated from global requirements
+ * Don't include openstack/common in flake8 exclude list
+
+-------------------------------------------------------------------
+Thu Jun 2 09:10:19 UTC 2016 - tbechtold(a)suse.com
+
+- use renderspec source service
+- update spec from upstream
+
+-------------------------------------------------------------------
+Tue Apr 26 15:20:12 UTC 2016 - rhafer(a)suse.de
+
+- update to 3.6.0
+ * Updated from global requirements
+ * Better isolate tests and fixtures from environment
+ * Imported Translations from Zanata
+
+-------------------------------------------------------------------
+Thu Mar 3 07:11:51 UTC 2016 - tbechtold(a)suse.com
+
+- update to 3.3.0:
+ * Update translation setup
+ * Updated from global requirements
+ * Imported Translations from Zanata
+ * Updated from global requirements
+ * Updated from global requirements
+ * add versionadded designations to newer functions
+ * doc: contextual/plural translation requires oslo.i18n >=2.1.0
+ * Trival: Remove 'MANIFEST.in'
+ * [doc] Update _i18n.py example to pass pep8
+ * Add missing blank in usage.rst
+ * Remove Python 2.6 workround for logging
+ * Drop python 2.6 support
+ * Updated from global requirements
+ * Remove python 2.6 classifier
+ * Remove python 2.6 and cleanup tox.ini
+ * Improved integration module documentation
+ * Updated from global requirements
+ * Imported Translations from Zanata
+ * Fix coverage configuration and execution
+ * No need for Oslo Incubator Sync
+ * Enhance the formatting error robustness patch
+ * Imported Translations from Zanata
+ * Move 'history' -> release notes section
+ * Add shields.io version/downloads links/badges into README.rst
+ * Change ignore-errors to ignore_errors
+ * Added the home-page value with Oslo wiki
+ * Updated from global requirements
+- Switch to .spec file from rpm-packaging upstream project
+
+-------------------------------------------------------------------
Old:
----
oslo.i18n-2.6.0.tar.gz
New:
----
oslo.i18n-3.9.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.i18n.spec ++++++
--- /var/tmp/diff_new_pack.uB16lQ/_old 2016-09-30 15:29:22.000000000 +0200
+++ /var/tmp/diff_new_pack.uB16lQ/_new 2016-09-30 15:29:22.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-oslo.i18n
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,21 +17,20 @@
%global sname oslo.i18n
-
Name: python-oslo.i18n
-Version: 2.6.0
+Version: 3.9.0
Release: 0
Summary: OpenStack i18n library
License: Apache-2.0
Group: Development/Languages/Python
Url: https://launchpad.net/%{sname}
-Source0: https://pypi.python.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.…
+Source0: https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
-BuildRequires: python-Babel
-BuildRequires: python-oslotest
-BuildRequires: python-pbr
-BuildRequires: python-setuptools
-Requires: python-Babel >= 1.3
+BuildRequires: python-Babel >= 2.3.4
+BuildRequires: python-mock >= 2.0
+BuildRequires: python-oslotest >= 1.10.0
+BuildRequires: python-pbr >= 1.6
+Requires: python-Babel >= 2.3.4
Requires: python-six >= 1.9.0
BuildArch: noarch
@@ -44,7 +43,7 @@
Summary: Documentation for OpenStack i18n library
Group: Development/Languages/Python
BuildRequires: python-Sphinx
-BuildRequires: python-oslosphinx
+BuildRequires: python-oslosphinx >= 2.5.0
%description doc
Documentation for the oslo.i18n library.
@@ -53,29 +52,27 @@
%setup -q -n %{sname}-%{version}
%build
-%{__python2} setup.py build
+%{py2_build}
%install
-%{__python2} setup.py install --skip-build --root %{buildroot}
+%{py2_install}
# generate html docs
-sphinx-build doc/source html
+%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
-rm -rf html/.{doctrees,buildinfo}
+rm -rf doc/build/html/.{doctrees,buildinfo}
%check
-export PYTHONPATH="%{python2_sitelib}:%{buildroot}%{python2_sitelib}"
-export PYTHON="python -S"
-testr init && testr run --parallel
+%{__python2} setup.py test
%files
-%defattr(-,root,root,-)
-%doc AUTHORS ChangeLog CONTRIBUTING.rst HACKING.rst LICENSE PKG-INFO README.rst
+%doc AUTHORS ChangeLog CONTRIBUTING.rst README.rst
+%license LICENSE
%{python2_sitelib}/oslo_i18n
%{python2_sitelib}/*.egg-info
%files doc
-%doc html
-%doc LICENSE
+%doc doc/build/html
+%license LICENSE
%changelog
++++++ _service ++++++
--- /var/tmp/diff_new_pack.uB16lQ/_old 2016-09-30 15:29:22.000000000 +0200
+++ /var/tmp/diff_new_pack.uB16lQ/_new 2016-09-30 15:29:22.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/…</param>
+ <param name="output-name">python-oslo.i18n.spec</param>
+ <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-req…</param>
+ </service>
<service mode="disabled" name="download_files">
<param name="changesgenerate">enable</param>
</service>
- <service mode="disabled" name="set_version">
- <param name="basename">oslo.i18n</param>
- </service>
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
- <service name="python_requires" mode="disabled">
- </service>
</services>
++++++ oslo.i18n-2.6.0.tar.gz -> oslo.i18n-3.9.0.tar.gz ++++++
++++ 1805 lines of diff (skipped)
1
0
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(a)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(a)suse.com
+
+- update to version 2.8.0
+ * Delete H803 in flake8 ignore list
+
+-------------------------------------------------------------------
+Wed Aug 10 14:37:15 UTC 2016 - tbechtold(a)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(a)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(a)suse.com
+
+- Update .spec from upstream via renderspec source service
+
+-------------------------------------------------------------------
+Tue Jun 14 06:15:21 UTC 2016 - dmueller(a)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(a)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.…
+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/…</param>
+ <param name="output-name">python-oslo.context.spec</param>
+ <param name="requirements">https://raw.githubusercontent.com/openstack/requirements/master/global-requ…</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 <fungi(a)yuggoth.org>
Joe Gordon <joe.gordon0(a)gmail.com>
Joshua Harlow <harlowja(a)yahoo-inc.com>
+Joshua Harlow <jxharlow(a)godaddy.com>
+Kirill Bespalov <kbespalov(a)mirantis.com>
Michael Basnight <mbasnight(a)gmail.com>
Monty Taylor <mordred(a)inaugust.com>
Ronald Bradford <ronald.bradford(a)gmail.com>
@@ -23,4 +25,6 @@
Thomas Herve <thomas.herve(a)enovance.com>
Victor Sergeyev <vsergeyev(a)mirantis.com>
Victor Stinner <vstinner(a)redhat.com>
+Wei Li <wei.li(a)easystack.cn>
Zhongyue Luo <zhongyue.nah(a)intel.com>
+yanheven <yanheven(a)qq.com>
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/keystonemiddlewa…
- 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
1
0