Hello community, here is the log from the commit of package python3-bottle for openSUSE:Factory checked in at 2015-01-12 09:49:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-bottle (Old) and /work/SRC/openSUSE:Factory/.python3-bottle.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-bottle" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-bottle/python3-bottle.changes 2014-05-21 16:21:05.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-bottle.new/python3-bottle.changes 2015-01-12 09:49:55.000000000 +0100 @@ -1,0 +2,13 @@ +Sat Jan 10 19:26:22 UTC 2015 - a...@gmx.de + +- specfile: update copyright year + +- update to version 0.12.8: + * Fixed bug where BaseResponse.copy() would not copy Cookies due to + a behaviour change in newest Python 3.x releases. + * add 422 response code string + * clean whitespace + * don't fail when request content type is application/json but the + body is empty + +------------------------------------------------------------------- Old: ---- bottle-0.12.7.tar.gz New: ---- bottle-0.12.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-bottle.spec ++++++ --- /var/tmp/diff_new_pack.MlAinO/_old 2015-01-12 09:49:55.000000000 +0100 +++ /var/tmp/diff_new_pack.MlAinO/_new 2015-01-12 09:49:55.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package python3-bottle # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products 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,7 +17,7 @@ Name: python3-bottle -Version: 0.12.7 +Version: 0.12.8 Release: 0 Url: http://bottlepy.org/ Summary: Fast and simple WSGI-framework for small web-applications ++++++ bottle-0.12.7.tar.gz -> bottle-0.12.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottle-0.12.7/PKG-INFO new/bottle-0.12.8/PKG-INFO --- old/bottle-0.12.7/PKG-INFO 2014-04-29 19:25:40.000000000 +0200 +++ new/bottle-0.12.8/PKG-INFO 2014-12-28 17:52:33.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: bottle -Version: 0.12.7 +Version: 0.12.8 Summary: Fast and simple WSGI-framework for small web-applications. Home-page: http://bottlepy.org/ Author: Marcel Hellkamp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottle-0.12.7/bottle.py new/bottle-0.12.8/bottle.py --- old/bottle-0.12.7/bottle.py 2014-04-29 19:24:14.000000000 +0200 +++ new/bottle-0.12.8/bottle.py 2014-12-28 17:49:14.000000000 +0100 @@ -16,7 +16,7 @@ from __future__ import with_statement __author__ = 'Marcel Hellkamp' -__version__ = '0.12.7' +__version__ = '0.12.8' __license__ = 'MIT' # The gevent server adapter needs to patch some modules before they are imported @@ -1117,7 +1117,10 @@ exhaustion. ''' ctype = self.environ.get('CONTENT_TYPE', '').lower().split(';')[0] if ctype == 'application/json': - return json_loads(self._get_body_string()) + b = self._get_body_string() + if not b: + return None + return json_loads(b) return None def _iter_body(self, read, bufsize): @@ -1154,7 +1157,7 @@ maxread -= len(part) if read(2) != rn: raise err - + @DictProperty('environ', 'bottle.request.body', read_only=True) def _body(self): body_iter = self._iter_chunked if self.chunked else self._iter_body @@ -1469,7 +1472,7 @@ copy._headers = dict((k, v[:]) for (k, v) in self._headers.items()) if self._cookies: copy._cookies = SimpleCookie() - copy._cookies.load(self._cookies.output()) + copy._cookies.load(self._cookies.output(header='')) return copy def __iter__(self): @@ -2094,7 +2097,7 @@ def load_dict(self, source, namespace='', make_namespaces=False): ''' Import values from a dictionary structure. Nesting can be used to represent namespaces. - + >>> ConfigDict().load_dict({'name': {'space': {'key': 'value'}}}) {'name.space.key': 'value'} ''' @@ -2350,7 +2353,7 @@ def filename(self): ''' Name of the file on the client file system, but normalized to ensure file system compatibility. An empty filename is returned as 'empty'. - + Only ASCII letters, digits, dashes, underscores and dots are allowed in the final filename. Accents are removed, if possible. Whitespace is replaced by a single dash. Leading or tailing dots @@ -2774,20 +2777,20 @@ from cherrypy import wsgiserver self.options['bind_addr'] = (self.host, self.port) self.options['wsgi_app'] = handler - + certfile = self.options.get('certfile') if certfile: del self.options['certfile'] keyfile = self.options.get('keyfile') if keyfile: del self.options['keyfile'] - + server = wsgiserver.CherryPyWSGIServer(**self.options) if certfile: server.ssl_certificate = certfile if keyfile: server.ssl_private_key = keyfile - + try: server.start() finally: @@ -3642,6 +3645,7 @@ #: A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found') HTTP_CODES = httplib.responses HTTP_CODES[418] = "I'm a teapot" # RFC 2324 +HTTP_CODES[422] = "Unprocessable Entity" # RFC 4918 HTTP_CODES[428] = "Precondition Required" HTTP_CODES[429] = "Too Many Requests" HTTP_CODES[431] = "Request Header Fields Too Large" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottle-0.12.7/test/test_environ.py new/bottle-0.12.8/test/test_environ.py --- old/bottle-0.12.7/test/test_environ.py 2014-04-29 17:13:16.000000000 +0200 +++ new/bottle-0.12.8/test/test_environ.py 2014-12-28 17:47:42.000000000 +0100 @@ -394,6 +394,14 @@ e['CONTENT_LENGTH'] = str(len(json_dumps(test))) self.assertEqual(BaseRequest(e).json, None) + def test_json_header_empty_body(self): + """Request Content-Type is application/json but body is empty""" + e = {'CONTENT_TYPE': 'application/json'} + wsgiref.util.setup_testing_defaults(e) + wsgiref.util.setup_testing_defaults(e) + e['CONTENT_LENGTH'] = "0" + self.assertEqual(BaseRequest(e).json, None) + def test_isajax(self): e = {} wsgiref.util.setup_testing_defaults(e) ++++++ bottle-docs.pdf ++++++ (binary differes) -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org