Hello community, here is the log from the commit of package python-gabbi for openSUSE:Factory checked in at 2020-09-17 14:53:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-gabbi (Old) and /work/SRC/openSUSE:Factory/.python-gabbi.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-gabbi" Thu Sep 17 14:53:47 2020 rev:10 rq:835108 version:2.0.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-gabbi/python-gabbi.changes 2020-06-26 21:49:15.098562513 +0200 +++ /work/SRC/openSUSE:Factory/.python-gabbi.new.4249/python-gabbi.changes 2020-09-17 15:05:38.712755807 +0200 @@ -1,0 +2,6 @@ +Thu Sep 17 06:56:23 UTC 2020 - Dirk Mueller <dmuel...@suse.com> + +- update to 2.0.4: + * Display response body when no content-type + +------------------------------------------------------------------- Old: ---- gabbi-2.0.3.tar.gz New: ---- gabbi-2.0.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-gabbi.spec ++++++ --- /var/tmp/diff_new_pack.SqjKsU/_old 2020-09-17 15:05:40.352757365 +0200 +++ /var/tmp/diff_new_pack.SqjKsU/_new 2020-09-17 15:05:40.352757365 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-gabbi -Version: 2.0.3 +Version: 2.0.4 Release: 0 Summary: Declarative HTTP testing library License: Apache-2.0 ++++++ gabbi-2.0.3.tar.gz -> gabbi-2.0.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/ChangeLog new/gabbi-2.0.4/ChangeLog --- old/gabbi-2.0.3/ChangeLog 2020-06-05 13:34:06.000000000 +0200 +++ new/gabbi-2.0.4/ChangeLog 2020-08-25 15:19:01.000000000 +0200 @@ -1,6 +1,12 @@ CHANGES ======= +2.0.4 +----- + +* Release 2.0.4 +* Display response body when no content-type (#285) + 2.0.3 ----- @@ -1033,8 +1039,8 @@ * Initial commit of sphinx infrastructure * Automate test and build a bit more -v0.1.0 ------- +0.1.0 +----- * Extract classes to their own files * Add some docs to GabbiFixture diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/Makefile new/gabbi-2.0.4/Makefile --- old/gabbi-2.0.3/Makefile 2020-01-17 15:35:19.000000000 +0100 +++ new/gabbi-2.0.4/Makefile 2020-08-25 15:07:14.000000000 +0200 @@ -15,7 +15,7 @@ git tag -s \ -m `python -c 'import gabbi; print gabbi.__version__'` \ `python -c 'import gabbi; print gabbi.__version__'` - git push origin master --tags + git push origin main --tags cleanagain: find . -name "*.pyc" |xargs rm || true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/PKG-INFO new/gabbi-2.0.4/PKG-INFO --- old/gabbi-2.0.3/PKG-INFO 2020-06-05 13:34:06.000000000 +0200 +++ new/gabbi-2.0.4/PKG-INFO 2020-08-25 15:19:01.000000000 +0200 @@ -1,12 +1,12 @@ Metadata-Version: 1.2 Name: gabbi -Version: 2.0.3 +Version: 2.0.4 Summary: Declarative HTTP testing library Home-page: https://github.com/cdent/gabbi Author: Chris Dent Author-email: cd...@anticdent.org License: Apache-2 -Description: .. image:: https://travis-ci.org/cdent/gabbi.svg?branch=master +Description: .. image:: https://travis-ci.org/cdent/gabbi.svg?branch=main :target: https://travis-ci.org/cdent/gabbi .. image:: https://readthedocs.org/projects/gabbi/badge/?version=latest :target: https://gabbi.readthedocs.io/en/latest/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/README.rst new/gabbi-2.0.4/README.rst --- old/gabbi-2.0.3/README.rst 2020-04-30 18:41:52.000000000 +0200 +++ new/gabbi-2.0.4/README.rst 2020-08-25 15:08:25.000000000 +0200 @@ -1,4 +1,4 @@ -.. image:: https://travis-ci.org/cdent/gabbi.svg?branch=master +.. image:: https://travis-ci.org/cdent/gabbi.svg?branch=main :target: https://travis-ci.org/cdent/gabbi .. image:: https://readthedocs.org/projects/gabbi/badge/?version=latest :target: https://gabbi.readthedocs.io/en/latest/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/docs/source/format.rst new/gabbi-2.0.4/docs/source/format.rst --- old/gabbi-2.0.3/docs/source/format.rst 2020-01-17 15:35:19.000000000 +0100 +++ new/gabbi-2.0.4/docs/source/format.rst 2020-08-25 15:08:58.000000000 +0200 @@ -334,5 +334,5 @@ is text, json, xml or javascript it will be encoded to UTF-8. -.. _the gabbi tests: https://github.com/cdent/gabbi/tree/master/gabbi/tests/gabbits_intercept +.. _the gabbi tests: https://github.com/cdent/gabbi/tree/main/gabbi/tests/gabbits_intercept .. _gabbi-demo: https://github.com/cdent/gabbi-demo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/docs/source/host.rst new/gabbi-2.0.4/docs/source/host.rst --- old/gabbi-2.0.3/docs/source/host.rst 2020-01-17 15:35:19.000000000 +0100 +++ new/gabbi-2.0.4/docs/source/host.rst 2020-08-25 15:08:47.000000000 +0200 @@ -27,6 +27,6 @@ For the implementation of the above see :meth:`~gabbi.driver.build_tests`. .. _wsgi-intercept: https://pypi.python.org/pypi/wsgi_intercept -.. _intercept examples: https://github.com/cdent/gabbi/blob/master/gabbi/tests/test_intercept.py -.. _full examples: https://github.com/cdent/gabbi/blob/master/gabbi/tests/gabbits_live/google.yaml -.. _live examples: https://github.com/cdent/gabbi/blob/master/gabbi/tests/test_live.py +.. _intercept examples: https://github.com/cdent/gabbi/blob/main/gabbi/tests/test_intercept.py +.. _full examples: https://github.com/cdent/gabbi/blob/main/gabbi/tests/gabbits_live/google.yaml +.. _live examples: https://github.com/cdent/gabbi/blob/main/gabbi/tests/test_live.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/docs/source/release.rst new/gabbi-2.0.4/docs/source/release.rst --- old/gabbi-2.0.3/docs/source/release.rst 2020-06-05 13:23:52.000000000 +0200 +++ new/gabbi-2.0.4/docs/source/release.rst 2020-08-25 15:04:45.000000000 +0200 @@ -5,6 +5,12 @@ highlighting major features and changes. For more detail see the `commit logs`_ on GitHub. +2.0.4 +----- + +* If no content-type is provided with a response and verbose is on for + responses, display the response body as if it were text. + 2.0.3 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/gabbi/__init__.py new/gabbi-2.0.4/gabbi/__init__.py --- old/gabbi-2.0.3/gabbi/__init__.py 2020-06-05 13:23:44.000000000 +0200 +++ new/gabbi-2.0.4/gabbi/__init__.py 2020-08-25 15:06:01.000000000 +0200 @@ -12,4 +12,4 @@ # under the License. """See gabbi.driver and gabbbi.case.""" -__version__ = '2.0.3' +__version__ = '2.0.4' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/gabbi/httpclient.py new/gabbi-2.0.4/gabbi/httpclient.py --- old/gabbi-2.0.3/gabbi/httpclient.py 2020-01-17 15:35:19.000000000 +0100 +++ new/gabbi-2.0.4/gabbi/httpclient.py 2020-08-25 15:03:31.000000000 +0200 @@ -17,6 +17,7 @@ import sys import certifi +import six import urllib3 from gabbi.handlers import jsonhandler @@ -138,9 +139,13 @@ def _print_body(self, headers, content): """Output body if not binary.""" - content_type = utils.extract_content_type(headers)[0] + # Use text/plain as the default so that when there is not content-type + # we can still see the output. + content_type = utils.extract_content_type(headers, 'text/plain')[0] if self._show_body and utils.not_binary(content_type): content = utils.decode_response_content(headers, content) + if isinstance(content, six.binary_type): + content = content.decode('utf-8') # TODO(cdent): Using the JSONHandler here instead of # just the json module to make it clear that eventually # we could pretty print any printable output by using a @@ -148,10 +153,15 @@ # because it would be pointless (no other interesting # handlers) and this approach may be entirely wrong. if content and jsonhandler.JSONHandler.accepts(content_type): - data = jsonhandler.JSONHandler.loads(content) - content = jsonhandler.JSONHandler.dumps(data, pretty=True) + try: + data = jsonhandler.JSONHandler.loads(content) + content = jsonhandler.JSONHandler.dumps(data, pretty=True) + except ValueError: + # It it didn't decode for some reason treat it as a string. + pass self._verbose_output('') - self._verbose_output(content) + if content: + self._verbose_output(content) def _print_header(self, name, value, prefix='', stream=None): """Output one single header.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/gabbi/tests/gabbits_intercept/verbosity.yaml new/gabbi-2.0.4/gabbi/tests/gabbits_intercept/verbosity.yaml --- old/gabbi-2.0.3/gabbi/tests/gabbits_intercept/verbosity.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/gabbi-2.0.4/gabbi/tests/gabbits_intercept/verbosity.yaml 2020-08-25 15:03:31.000000000 +0200 @@ -0,0 +1,7 @@ +# Testing for https://github.com/cdent/gabbi/issues/282 + + +tests: + - name: confirm notempty + verbose: true + GET: /notempty diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/gabbi/tests/simple_wsgi.py new/gabbi-2.0.4/gabbi/tests/simple_wsgi.py --- old/gabbi-2.0.3/gabbi/tests/simple_wsgi.py 2020-01-17 15:35:19.000000000 +0100 +++ new/gabbi-2.0.4/gabbi/tests/simple_wsgi.py 2020-08-25 15:03:31.000000000 +0200 @@ -128,6 +128,15 @@ query_output = json.dumps(query_data) return [query_output.encode('utf-8')] + elif path_info == '/notempty': + # This block is used to experiment with verbosity handling. + # See: https://github.com/cdent/gabbi/issues/282 + content_type = query_data.get('content-type', [None])[0] + headers = [] + if content_type: + headers.append(('Content-type', content_type)) + start_response('200 OK', headers) + return ['notempty'.encode('utf-8')] start_response('200 OK', headers) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/gabbi.egg-info/PKG-INFO new/gabbi-2.0.4/gabbi.egg-info/PKG-INFO --- old/gabbi-2.0.3/gabbi.egg-info/PKG-INFO 2020-06-05 13:34:06.000000000 +0200 +++ new/gabbi-2.0.4/gabbi.egg-info/PKG-INFO 2020-08-25 15:19:01.000000000 +0200 @@ -1,12 +1,12 @@ Metadata-Version: 1.2 Name: gabbi -Version: 2.0.3 +Version: 2.0.4 Summary: Declarative HTTP testing library Home-page: https://github.com/cdent/gabbi Author: Chris Dent Author-email: cd...@anticdent.org License: Apache-2 -Description: .. image:: https://travis-ci.org/cdent/gabbi.svg?branch=master +Description: .. image:: https://travis-ci.org/cdent/gabbi.svg?branch=main :target: https://travis-ci.org/cdent/gabbi .. image:: https://readthedocs.org/projects/gabbi/badge/?version=latest :target: https://gabbi.readthedocs.io/en/latest/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/gabbi.egg-info/SOURCES.txt new/gabbi-2.0.4/gabbi.egg-info/SOURCES.txt --- old/gabbi-2.0.3/gabbi.egg-info/SOURCES.txt 2020-06-05 13:34:06.000000000 +0200 +++ new/gabbi-2.0.4/gabbi.egg-info/SOURCES.txt 2020-08-25 15:19:01.000000000 +0200 @@ -15,6 +15,7 @@ test-failskip.sh test-limit.sh test-requirements.txt +test-verbosity.sh tox.ini docs/Makefile docs/source/conf.py @@ -122,6 +123,7 @@ gabbi/tests/gabbits_intercept/skipall.yaml gabbi/tests/gabbits_intercept/utf8.txt gabbi/tests/gabbits_intercept/values.json +gabbi/tests/gabbits_intercept/verbosity.yaml gabbi/tests/gabbits_intercept/subdir/values.yaml gabbi/tests/gabbits_live/google.yaml gabbi/tests/gabbits_runner/failure.yaml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/gabbi.egg-info/pbr.json new/gabbi-2.0.4/gabbi.egg-info/pbr.json --- old/gabbi-2.0.3/gabbi.egg-info/pbr.json 2020-06-05 13:34:06.000000000 +0200 +++ new/gabbi-2.0.4/gabbi.egg-info/pbr.json 2020-08-25 15:19:01.000000000 +0200 @@ -1 +1 @@ -{"git_version": "8aa4e70", "is_release": true} \ No newline at end of file +{"git_version": "4d54a38", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/test-verbosity.sh new/gabbi-2.0.4/test-verbosity.sh --- old/gabbi-2.0.3/test-verbosity.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/gabbi-2.0.4/test-verbosity.sh 2020-08-25 15:03:31.000000000 +0200 @@ -0,0 +1,5 @@ +#!/bin/bash +# Run a test that confirms that a verbose test will output a response body +# when there is no content-type. + +stestr run "intercept.verbosity" | grep '^notempty' >/dev/null diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gabbi-2.0.3/tox.ini new/gabbi-2.0.4/tox.ini --- old/gabbi-2.0.3/tox.ini 2020-04-30 18:41:52.000000000 +0200 +++ new/gabbi-2.0.4/tox.ini 2020-08-25 15:03:31.000000000 +0200 @@ -1,7 +1,7 @@ [tox] minversion = 3.1.1 skipsdist = True -envlist = py35,py36,py37,py38,pypy3,pep8,limit,failskip,docs,py37-prefix,py37-limit,py37-failskip,py35-pytest,py36-pytest,py37-pytest +envlist = py35,py36,py37,py38,pypy3,pep8,limit,failskip,docs,py37-prefix,py37-limit,py37-verbosity,py37-failskip,py35-pytest,py36-pytest,py37-pytest [testenv] deps = -r{toxinidir}/requirements.txt @@ -40,6 +40,9 @@ [testenv:py37-limit] commands = {toxinidir}/test-limit.sh +[testenv:py37-verbosity] +commands = {toxinidir}/test-verbosity.sh + [testenv:py37-failskip] commands = {toxinidir}/test-failskip.sh