Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1466591 Details for
Bug 1605828
python-pecan-notario: FTBFS in Fedora rawhide
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
build.log
build.log (text/plain), 29.76 KB, created by
Mohan Boddu
on 2018-07-20 17:11:28 UTC
(
hide
)
Description:
build.log
Filename:
MIME Type:
Creator:
Mohan Boddu
Created:
2018-07-20 17:11:28 UTC
Size:
29.76 KB
patch
obsolete
>Mock Version: 1.3.4 >Mock Version: 1.3.4 >ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-pecan-notario.spec'], chrootPath='/var/lib/mock/f29-build-13055129-949986/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7fb89819afd0>timeout=172800uid=1000gid=425user='mockbuild'nspawn_args=[]printOutput=False) >Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-pecan-notario.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False >Building target platforms: noarch >Building for target noarch >Wrote: /builddir/build/SRPMS/python-pecan-notario-0.0.3-11.fc29.src.rpm >Child return code was: 0 >ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/python-pecan-notario.spec'], chrootPath='/var/lib/mock/f29-build-13055129-949986/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7fb89819afd0>timeout=172800uid=1000gid=425user='mockbuild'nspawn_args=[]printOutput=False) >Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/python-pecan-notario.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False >Building target platforms: noarch >Building for target noarch >Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.lDOKVy >+ umask 022 >+ cd /builddir/build/BUILD >+ cd /builddir/build/BUILD >+ rm -rf pecan-notario-0.0.3 >+ /usr/bin/gzip -dc /builddir/build/SOURCES/pecan-notario-0.0.3.tar.gz >+ /usr/bin/tar -xof - >+ STATUS=0 >+ '[' 0 -ne 0 ']' >+ cd pecan-notario-0.0.3 >+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . >+ exit 0 >Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.L74a0y >+ umask 022 >+ cd /builddir/build/BUILD >+ cd pecan-notario-0.0.3 >+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' >+ LDFLAGS='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' >+ /usr/bin/python2 setup.py build '--executable=/usr/bin/python2 -s' >running build >running build_py >creating build >creating build/lib >creating build/lib/pecan_notario >copying pecan_notario/decorator.py -> build/lib/pecan_notario >copying pecan_notario/__init__.py -> build/lib/pecan_notario >copying pecan_notario/exceptions.py -> build/lib/pecan_notario >+ sleep 1 >+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' >+ LDFLAGS='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' >+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s' >running build >running build_py >+ sleep 1 >+ exit 0 >Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.IdJ8gF >+ umask 022 >+ cd /builddir/build/BUILD >+ '[' /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch '!=' / ']' >+ rm -rf /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch >++ dirname /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch >+ mkdir -p /builddir/build/BUILDROOT >+ mkdir /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch >+ cd pecan-notario-0.0.3 >+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' >+ LDFLAGS='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' >+ /usr/bin/python2 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch >running install >running install_lib >creating /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr >creating /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib >creating /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7 >creating /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7/site-packages >creating /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7/site-packages/pecan_notario >copying build/lib/pecan_notario/decorator.py -> /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7/site-packages/pecan_notario >copying build/lib/pecan_notario/__init__.py -> /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7/site-packages/pecan_notario >copying build/lib/pecan_notario/exceptions.py -> /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7/site-packages/pecan_notario >byte-compiling /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7/site-packages/pecan_notario/decorator.py to decorator.pyc >byte-compiling /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7/site-packages/pecan_notario/__init__.py to __init__.pyc >byte-compiling /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7/site-packages/pecan_notario/exceptions.py to exceptions.pyc >writing byte-compilation script '/tmp/tmpzV1UK4.py' >/usr/bin/python2 -O /tmp/tmpzV1UK4.py >removing /tmp/tmpzV1UK4.py >running install_egg_info >running egg_info >writing requirements to pecan_notario.egg-info/requires.txt >writing pecan_notario.egg-info/PKG-INFO >writing top-level names to pecan_notario.egg-info/top_level.txt >writing dependency_links to pecan_notario.egg-info/dependency_links.txt >writing entry points to pecan_notario.egg-info/entry_points.txt >reading manifest file 'pecan_notario.egg-info/SOURCES.txt' >reading manifest template 'MANIFEST.in' >writing manifest file 'pecan_notario.egg-info/SOURCES.txt' >Copying pecan_notario.egg-info to /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7/site-packages/pecan_notario-0.0.3-py2.7.egg-info >running install_scripts >+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' >+ LDFLAGS='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' >+ /usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch >running install >running install_lib >creating /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7 >creating /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7/site-packages >creating /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7/site-packages/pecan_notario >copying build/lib/pecan_notario/decorator.py -> /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7/site-packages/pecan_notario >copying build/lib/pecan_notario/__init__.py -> /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7/site-packages/pecan_notario >copying build/lib/pecan_notario/exceptions.py -> /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7/site-packages/pecan_notario >byte-compiling /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7/site-packages/pecan_notario/decorator.py to decorator.cpython-37.pyc >byte-compiling /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7/site-packages/pecan_notario/__init__.py to __init__.cpython-37.pyc >byte-compiling /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7/site-packages/pecan_notario/exceptions.py to exceptions.cpython-37.pyc >writing byte-compilation script '/tmp/tmpy_qkudg_.py' >/usr/bin/python3 /tmp/tmpy_qkudg_.py >removing /tmp/tmpy_qkudg_.py >running install_egg_info >running egg_info >writing pecan_notario.egg-info/PKG-INFO >writing dependency_links to pecan_notario.egg-info/dependency_links.txt >writing entry points to pecan_notario.egg-info/entry_points.txt >writing requirements to pecan_notario.egg-info/requires.txt >writing top-level names to pecan_notario.egg-info/top_level.txt >reading manifest file 'pecan_notario.egg-info/SOURCES.txt' >reading manifest template 'MANIFEST.in' >writing manifest file 'pecan_notario.egg-info/SOURCES.txt' >Copying pecan_notario.egg-info to /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7/site-packages/pecan_notario-0.0.3-py3.7.egg-info >running install_scripts >+ /usr/lib/rpm/find-debuginfo.sh -j6 --strict-build-id -m -i --build-id-seed 0.0.3-11.fc29 --unique-debug-suffix -0.0.3-11.fc29.noarch --unique-debug-src-base python-pecan-notario-0.0.3-11.fc29.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/pecan-notario-0.0.3 >find: 'debug': No such file or directory >+ /usr/lib/rpm/check-buildroot >+ /usr/lib/rpm/redhat/brp-ldconfig >/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory >+ /usr/lib/rpm/brp-compress >+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip >+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 1 >Bytecompiling .py files below /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python3.7 using /usr/bin/python3.7 >Bytecompiling .py files below /builddir/build/BUILDROOT/python-pecan-notario-0.0.3-11.fc29.noarch/usr/lib/python2.7 using /usr/bin/python2.7 >+ /usr/lib/rpm/brp-python-hardlink >+ /usr/lib/rpm/redhat/brp-mangle-shebangs >Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.fuBm9N >+ umask 022 >+ cd /builddir/build/BUILD >+ cd pecan-notario-0.0.3 >++ pwd >+ export PYTHONPATH=/builddir/build/BUILD/pecan-notario-0.0.3 >+ PYTHONPATH=/builddir/build/BUILD/pecan-notario-0.0.3 >+ py.test-2.7 -v pecan_notario/tests >============================= test session starts ============================== >platform linux2 -- Python 2.7.15, pytest-3.6.3, py-1.5.4, pluggy-0.6.0 -- /usr/bin/python2 >cachedir: .pytest_cache >rootdir: /builddir/build/BUILD/pecan-notario-0.0.3, inifile: >collecting ... collected 21 items >pecan_notario/tests/functional/test_decorator.py::TestWrapperValidation::test_basic_functionality PASSED [ 4%] >pecan_notario/tests/functional/test_decorator.py::TestWrapperValidation::test_basic_error PASSED [ 9%] >pecan_notario/tests/functional/test_decorator.py::TestWrapperValidation::test_add_the_actual_error PASSED [ 14%] >pecan_notario/tests/functional/test_decorator.py::TestWrapperValidation::test_no_errors PASSED [ 19%] >pecan_notario/tests/functional/test_decorator.py::TestWrapperValidation::test_with_empty_content PASSED [ 23%] >pecan_notario/tests/functional/test_decorator.py::TestWrapperValidation::test_with_invalid_data PASSED [ 28%] >pecan_notario/tests/functional/test_decorator.py::TestCustomHandler::test_basic_functionality PASSED [ 33%] >pecan_notario/tests/functional/test_decorator.py::TestCustomHandler::test_basic_error PASSED [ 38%] >pecan_notario/tests/functional/test_decorator.py::TestCustomHandler::test_add_the_actual_error PASSED [ 42%] >pecan_notario/tests/functional/test_decorator.py::TestCustomHandler::test_no_errors PASSED [ 47%] >pecan_notario/tests/functional/test_decorator.py::TestCustomHandler::test_with_empty_content PASSED [ 52%] >pecan_notario/tests/functional/test_decorator.py::TestCustomHandler::test_with_invalid_data PASSED [ 57%] >pecan_notario/tests/functional/test_decorator.py::TestCallableHandler::test_basic_functionality PASSED [ 61%] >pecan_notario/tests/functional/test_decorator.py::TestCallableHandler::test_basic_error PASSED [ 66%] >pecan_notario/tests/functional/test_decorator.py::TestCallableHandler::test_add_the_actual_error PASSED [ 71%] >pecan_notario/tests/functional/test_decorator.py::TestCallableHandler::test_no_errors PASSED [ 76%] >pecan_notario/tests/functional/test_decorator.py::TestCallableHandler::test_with_empty_content PASSED [ 80%] >pecan_notario/tests/functional/test_decorator.py::TestCallableHandler::test_with_invalid_data PASSED [ 85%] >pecan_notario/tests/functional/test_decorator.py::TestDefaultValidation::test_basic_functionality PASSED [ 90%] >pecan_notario/tests/functional/test_decorator.py::TestDefaultValidation::test_basic_error FAILED [ 95%] >pecan_notario/tests/functional/test_decorator.py::TestDefaultValidation::test_status_int_is_set FAILED [100%] >=================================== FAILURES =================================== >____________________ TestDefaultValidation.test_basic_error ____________________ >self = <test_decorator.TestDefaultValidation object at 0xf65a368c> > def test_basic_error(self): > body = '{"key":"vvalue"}' > response = self.app.post( > '/', > body, > [('Content-Type', 'application/json')], >> expect_errors=True, > ) >pecan_notario/tests/functional/test_decorator.py:168: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/usr/lib/python2.7/site-packages/webtest/app.py:379: in post > content_type=content_type) >/usr/lib/python2.7/site-packages/webtest/app.py:755: in _gen_request > expect_errors=expect_errors) >/usr/lib/python2.7/site-packages/webtest/app.py:625: in do_request > res = req.get_response(app, catch_exc_info=True) >/usr/lib/python2.7/site-packages/webob/request.py:1309: in send > application, catch_exc_info=True) >/usr/lib/python2.7/site-packages/webob/request.py:1277: in call_application > app_iter = application(self.environ, start_response) >/usr/lib/python2.7/site-packages/webtest/lint.py:200: in lint_app > iterator = application(environ, start_response_wrapper) >/usr/lib/python2.7/site-packages/pecan/core.py:840: in __call__ > return super(Pecan, self).__call__(environ, start_response) >/usr/lib/python2.7/site-packages/pecan/core.py:742: in __call__ > return state.response(environ, start_response) >/usr/lib/python2.7/site-packages/webob/exc.py:362: in __call__ > app_iter = self.generate_response(environ, start_response) >pecan_notario/exceptions.py:29: in generate_response > content_type=content_type >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >self = <Response at 0xf659e5cc 400 Failed Validation> >body = '{"error": "-> key -> vvalue did not match \'value\'"}' >status = '400 Failed Validation' >headerlist = [('Content-Type', 'text/html; charset=UTF-8'), ('Content-Type', 'application/json')] >app_iter = None, content_type = 'application/json', conditional_response = None >charset = <object object at 0xf7a188f8>, kw = {}, encoding = None >code_has_body = True > def __init__(self, body=None, status=None, headerlist=None, app_iter=None, > content_type=None, conditional_response=None, charset=_marker, > **kw): > # Do some sanity checking, and turn json_body into an actual body > if app_iter is None and body is None and ('json_body' in kw or 'json' in kw): > if 'json_body' in kw: > json_body = kw.pop('json_body') > else: > json_body = kw.pop('json') > body = json.dumps(json_body, separators=(',', ':')).encode('UTF-8') > > if content_type is None: > content_type = 'application/json' > > if app_iter is None: > if body is None: > body = b'' > elif body is not None: > raise TypeError( > "You may only give one of the body and app_iter arguments") > > # Set up Response.status > if status is None: > self._status = '200 OK' > else: > self.status = status > > # Initialize headers > self._headers = None > if headerlist is None: > self._headerlist = [] > else: > self._headerlist = headerlist > > # Set the encoding for the Response to charset, so if a charset is > # passed but the Content-Type does not allow for a charset, we can > # still encode text_type body's. > # r = Response( > # content_type='application/foo', > # charset='UTF-8', > # body=u'somebody') > # Should work without issues, and the header will be correctly set to > # Content-Type: application/foo with no charset on it. > > encoding = None > if charset is not _marker: > encoding = charset > > # Does the status code have a body or not? > code_has_body = ( > self._status[0] != '1' and > self._status[:3] not in ('204', '205', '304') > ) > > # We only set the content_type to the one passed to the constructor or > # the default content type if there is none that exists AND there was > # no headerlist passed. If a headerlist was provided then most likely > # the ommission of the Content-Type is on purpose and we shouldn't try > # to be smart about it. > # > # Also allow creation of a empty Response with just the status set to a > # Response with empty body, such as Response(status='204 No Content') > # without the default content_type being set (since empty bodies have > # no Content-Type) > # > # Check if content_type is set because default_content_type could be > # None, in which case there is no content_type, and thus we don't need > # to anything > > content_type = content_type or self.default_content_type > > if headerlist is None and code_has_body and content_type: > # Set up the charset, if the content_type doesn't already have one > > has_charset = 'charset=' in content_type > > # If the Content-Type already has a charset, we don't set the user > # provided charset on the Content-Type, so we shouldn't use it as > # the encoding for text_type based body's. > if has_charset: > encoding = None > > # Do not use the default_charset for the encoding because we > # want things like > # Response(content_type='image/jpeg',body=u'foo') to raise when > # trying to encode the body. > > new_charset = encoding > > if ( > not has_charset and > charset is _marker and > self.default_charset > ): > new_charset = self.default_charset > > # Optimize for the default_content_type as shipped by > # WebOb, becuase we know that 'text/html' has a charset, > # otherwise add a charset if the content_type has a charset. > # > # Even if the user supplied charset explicitly, we do not add > # it to the Content-Type unless it has has a charset, instead > # the user supplied charset is solely used for encoding the > # body if it is a text_type > > if ( > new_charset and > ( > content_type == 'text/html' or > _content_type_has_charset(content_type) > ) > ): > content_type += '; charset=' + new_charset > > self._headerlist.append(('Content-Type', content_type)) > > # Set up conditional response > if conditional_response is None: > self.conditional_response = self.default_conditional_response > else: > self.conditional_response = bool(conditional_response) > > # Set up app_iter if the HTTP Status code has a body > if app_iter is None and code_has_body: > if isinstance(body, text_type): > # Fall back to trying self.charset if encoding is not set. In > # most cases encoding will be set to the default value. > encoding = encoding or self.charset > if encoding is None: > raise TypeError( >> "You cannot set the body to a text value without a " > "charset") >E TypeError: You cannot set the body to a text value without a charset >/usr/lib/python2.7/site-packages/webob/response.py:310: TypeError >_________________ TestDefaultValidation.test_status_int_is_set _________________ >self = <test_decorator.TestDefaultValidation object at 0xf641b26c> > def test_status_int_is_set(self): > body = '{"key":"vvalue"}' > response = self.app.post( > '/', > body, > [('Content-Type', 'application/json')], >> expect_errors=True, > ) >pecan_notario/tests/functional/test_decorator.py:179: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/usr/lib/python2.7/site-packages/webtest/app.py:379: in post > content_type=content_type) >/usr/lib/python2.7/site-packages/webtest/app.py:755: in _gen_request > expect_errors=expect_errors) >/usr/lib/python2.7/site-packages/webtest/app.py:625: in do_request > res = req.get_response(app, catch_exc_info=True) >/usr/lib/python2.7/site-packages/webob/request.py:1309: in send > application, catch_exc_info=True) >/usr/lib/python2.7/site-packages/webob/request.py:1277: in call_application > app_iter = application(self.environ, start_response) >/usr/lib/python2.7/site-packages/webtest/lint.py:200: in lint_app > iterator = application(environ, start_response_wrapper) >/usr/lib/python2.7/site-packages/pecan/core.py:840: in __call__ > return super(Pecan, self).__call__(environ, start_response) >/usr/lib/python2.7/site-packages/pecan/core.py:742: in __call__ > return state.response(environ, start_response) >/usr/lib/python2.7/site-packages/webob/exc.py:362: in __call__ > app_iter = self.generate_response(environ, start_response) >pecan_notario/exceptions.py:29: in generate_response > content_type=content_type >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >self = <Response at 0xf641bb4c 400 Failed Validation> >body = '{"error": "-> key -> vvalue did not match \'value\'"}' >status = '400 Failed Validation' >headerlist = [('Content-Type', 'text/html; charset=UTF-8'), ('Content-Type', 'application/json')] >app_iter = None, content_type = 'application/json', conditional_response = None >charset = <object object at 0xf7a188f8>, kw = {}, encoding = None >code_has_body = True > def __init__(self, body=None, status=None, headerlist=None, app_iter=None, > content_type=None, conditional_response=None, charset=_marker, > **kw): > # Do some sanity checking, and turn json_body into an actual body > if app_iter is None and body is None and ('json_body' in kw or 'json' in kw): > if 'json_body' in kw: > json_body = kw.pop('json_body') > else: > json_body = kw.pop('json') > body = json.dumps(json_body, separators=(',', ':')).encode('UTF-8') > > if content_type is None: > content_type = 'application/json' > > if app_iter is None: > if body is None: > body = b'' > elif body is not None: > raise TypeError( > "You may only give one of the body and app_iter arguments") > > # Set up Response.status > if status is None: > self._status = '200 OK' > else: > self.status = status > > # Initialize headers > self._headers = None > if headerlist is None: > self._headerlist = [] > else: > self._headerlist = headerlist > > # Set the encoding for the Response to charset, so if a charset is > # passed but the Content-Type does not allow for a charset, we can > # still encode text_type body's. > # r = Response( > # content_type='application/foo', > # charset='UTF-8', > # body=u'somebody') > # Should work without issues, and the header will be correctly set to > # Content-Type: application/foo with no charset on it. > > encoding = None > if charset is not _marker: > encoding = charset > > # Does the status code have a body or not? > code_has_body = ( > self._status[0] != '1' and > self._status[:3] not in ('204', '205', '304') > ) > > # We only set the content_type to the one passed to the constructor or > # the default content type if there is none that exists AND there was > # no headerlist passed. If a headerlist was provided then most likely > # the ommission of the Content-Type is on purpose and we shouldn't try > # to be smart about it. > # > # Also allow creation of a empty Response with just the status set to a > # Response with empty body, such as Response(status='204 No Content') > # without the default content_type being set (since empty bodies have > # no Content-Type) > # > # Check if content_type is set because default_content_type could be > # None, in which case there is no content_type, and thus we don't need > # to anything > > content_type = content_type or self.default_content_type > > if headerlist is None and code_has_body and content_type: > # Set up the charset, if the content_type doesn't already have one > > has_charset = 'charset=' in content_type > > # If the Content-Type already has a charset, we don't set the user > # provided charset on the Content-Type, so we shouldn't use it as > # the encoding for text_type based body's. > if has_charset: > encoding = None > > # Do not use the default_charset for the encoding because we > # want things like > # Response(content_type='image/jpeg',body=u'foo') to raise when > # trying to encode the body. > > new_charset = encoding > > if ( > not has_charset and > charset is _marker and > self.default_charset > ): > new_charset = self.default_charset > > # Optimize for the default_content_type as shipped by > # WebOb, becuase we know that 'text/html' has a charset, > # otherwise add a charset if the content_type has a charset. > # > # Even if the user supplied charset explicitly, we do not add > # it to the Content-Type unless it has has a charset, instead > # the user supplied charset is solely used for encoding the > # body if it is a text_type > > if ( > new_charset and > ( > content_type == 'text/html' or > _content_type_has_charset(content_type) > ) > ): > content_type += '; charset=' + new_charset > > self._headerlist.append(('Content-Type', content_type)) > > # Set up conditional response > if conditional_response is None: > self.conditional_response = self.default_conditional_response > else: > self.conditional_response = bool(conditional_response) > > # Set up app_iter if the HTTP Status code has a body > if app_iter is None and code_has_body: > if isinstance(body, text_type): > # Fall back to trying self.charset if encoding is not set. In > # most cases encoding will be set to the default value. > encoding = encoding or self.charset > if encoding is None: > raise TypeError( >> "You cannot set the body to a text value without a " > "charset") >E TypeError: You cannot set the body to a text value without a charset >/usr/lib/python2.7/site-packages/webob/response.py:310: TypeError >===================== 2 failed, 19 passed in 0.72 seconds ====================== >RPM build errors: >error: Bad exit status from /var/tmp/rpm-tmp.fuBm9N (%check) > Bad exit status from /var/tmp/rpm-tmp.fuBm9N (%check) >Child return code was: 1 >EXCEPTION: [Error()] >Traceback (most recent call last): > File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 89, in trace > result = func(*args, **kw) > File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 582, in do > raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode) >mockbuild.exception.Error: Command failed. See logs for output. > # bash --login -c /usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/python-pecan-notario.spec
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1605828
: 1466591 |
1466592
|
1466593