Hello community,
here is the log from the commit of package python-web.py for openSUSE:Factory checked in at 2012-07-02 11:07:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-web.py (Old)
and /work/SRC/openSUSE:Factory/.python-web.py.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-web.py", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-web.py/python-web.py.changes 2012-03-22 12:39:51.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-web.py.new/python-web.py.changes 2012-07-02 11:07:48.000000000 +0200
@@ -1,0 +2,19 @@
+Fri Jun 29 08:23:50 UTC 2012 - cfarrell@suse.com
+
+- Updated to 0.37
+* Fixed datestr issue on Windows -- #155
+* Fixed Python 2.4 compatability issues (tx fredludlow)
+* Fixed error in utils.safewrite (tx shuge) -- #95
+* Allow use of web.data() with app.request() -- #105
+* Fixed an issue with session initializaton (tx beardedprojamz) -- #109
+* Allow custom message on 400 Bad Request (tx patryk) -- #121
+* Made djangoerror work on GAE. -- #80
+* Handle malformatted data in the urls. -- #117
+* Made it easier to stop the dev server -- #100, #122
+* Added support fot customizing cookie_path in session (tx larsga) -- #89
+* Added exception for "415 Unsupported Media" (tx JirkaChadima) -- #145
+* Added GroupedDropdown to support `<optgroup>` tag (tx jzellman) -- #152
+* Fixed failure in embedded interpreter - #87
+* Optimized web.cookies (tx benhoyt) - #148
+
+-------------------------------------------------------------------
Old:
----
web.py-0.36.tar.gz
New:
----
web.py-0.37.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-web.py.spec ++++++
--- /var/tmp/diff_new_pack.paMyRr/_old 2012-07-02 11:07:50.000000000 +0200
+++ /var/tmp/diff_new_pack.paMyRr/_new 2012-07-02 11:07:50.000000000 +0200
@@ -11,12 +11,13 @@
# 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/
#
+
Name: python-web.py
-Version: 0.36
+Version: 0.37
Release: 0
Url: http://webpy.org/
Summary: web.py: makes web apps
++++++ web.py-0.36.tar.gz -> web.py-0.37.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/web.py-0.36/PKG-INFO new/web.py-0.37/PKG-INFO
--- old/web.py-0.36/PKG-INFO 2011-07-04 12:11:27.000000000 +0200
+++ new/web.py-0.37/PKG-INFO 2012-06-26 07:21:31.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: web.py
-Version: 0.36
+Version: 0.37
Summary: web.py: makes web apps
Home-page: http://webpy.org/
Author: Anand Chitipothu
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/web.py-0.36/web/__init__.py new/web.py-0.37/web/__init__.py
--- old/web.py-0.36/web/__init__.py 2011-07-04 12:10:39.000000000 +0200
+++ new/web.py-0.37/web/__init__.py 2012-06-26 07:19:55.000000000 +0200
@@ -3,7 +3,7 @@
from __future__ import generators
-__version__ = "0.36"
+__version__ = "0.37"
__author__ = [
"Aaron Swartz ",
"Anand Chitipothu "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/web.py-0.36/web/application.py new/web.py-0.37/web/application.py
--- old/web.py-0.36/web/application.py 2011-07-04 12:10:39.000000000 +0200
+++ new/web.py-0.37/web/application.py 2012-06-26 07:19:55.000000000 +0200
@@ -5,6 +5,8 @@
import webapi as web
import webapi, wsgi, utils
import debugerror
+import httpserver
+
from utils import lstrips, safeunicode
import sys
@@ -201,7 +203,7 @@
if 'HTTP_CONTENT_TYPE' in env:
env['CONTENT_TYPE'] = env.pop('HTTP_CONTENT_TYPE')
- if method in ["POST", "PUT"]:
+ if method not in ["HEAD", "GET"]:
data = data or ''
import StringIO
if isinstance(data, dict):
@@ -309,6 +311,13 @@
function.
"""
return wsgi.runwsgi(self.wsgifunc(*middleware))
+
+ def stop(self):
+ """Stops the http server started by run.
+ """
+ if httpserver.server:
+ httpserver.server.stop()
+ httpserver.server = None
def cgirun(self, *middleware):
"""
@@ -366,8 +375,10 @@
ctx.fullpath = ctx.path + ctx.query
for k, v in ctx.iteritems():
+ # convert all string values to unicode values and replace
+ # malformed data with a suitable replacement marker.
if isinstance(v, str):
- ctx[k] = safeunicode(v)
+ ctx[k] = v.decode('utf-8', 'replace')
# status must always be str
ctx.status = '200 OK'
@@ -636,9 +647,12 @@
if so, reloads them.
"""
- SUFFIX = '$py.class' if sys.platform.startswith('java') else '.pyc'
"""File suffix of compiled modules."""
-
+ if sys.platform.startswith('java'):
+ SUFFIX = '$py.class'
+ else:
+ SUFFIX = '.pyc'
+
def __init__(self):
self.mtimes = {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/web.py-0.36/web/db.py new/web.py-0.37/web/db.py
--- old/web.py-0.36/web/db.py 2011-07-04 12:10:39.000000000 +0200
+++ new/web.py-0.37/web/db.py 2012-06-26 07:19:55.000000000 +0200
@@ -1019,6 +1019,7 @@
self.paramstyle = db.paramstyle
keywords['database'] = keywords.pop('db')
+ keywords['pooling'] = False # sqlite don't allows connections to be shared by threads
self.dbname = "sqlite"
DB.__init__(self, db, keywords)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/web.py-0.36/web/debugerror.py new/web.py-0.37/web/debugerror.py
--- old/web.py-0.36/web/debugerror.py 2011-07-04 12:10:39.000000000 +0200
+++ new/web.py-0.37/web/debugerror.py 2012-06-26 07:19:55.000000000 +0200
@@ -217,7 +217,7 @@
<div id="explanation">
<p>
You're seeing this error because you have <code>web.config.debug</code>
- set to <code>True</code>. Set that to <code>False</code> if you don't to see this.
+ set to <code>True</code>. Set that to <code>False</code> if you don't want to see this.
</p>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/web.py-0.36/web/form.py new/web.py-0.37/web/form.py
--- old/web.py-0.36/web/form.py 2011-07-04 12:10:39.000000000 +0200
+++ new/web.py-0.37/web/form.py 2012-06-26 07:19:55.000000000 +0200
@@ -8,8 +8,15 @@
import utils, net
def attrget(obj, attr, value=None):
- if hasattr(obj, 'has_key') and obj.has_key(attr): return obj[attr]
- if hasattr(obj, attr): return getattr(obj, attr)
+ try:
+ if hasattr(obj, 'has_key') and obj.has_key(attr):
+ return obj[attr]
+ except TypeError:
+ # Handle the case where has_key takes different number of arguments.
+ # This is the case with Model objects on appengine. See #134
+ pass
+ if hasattr(obj, attr):
+ return getattr(obj, attr)
return value
class Form(object):
@@ -18,7 +25,7 @@
>>> f = Form(Textbox("x"))
>>> f.render()
- '<table>\n <tr><th><label for="x">x</label></th><td><input type="text" id="x" name="x"/></td></tr>\n</table>'
+ u'<table>\n <tr><th><label for="x">x</label></th><td><input type="text" id="x" name="x"/></td></tr>\n</table>'
"""
def __init__(self, *inputs, **kw):
self.inputs = inputs
@@ -187,9 +194,9 @@
"""Textbox input.
>>> Textbox(name='foo', value='bar').render()
- '<input type="text" id="foo" value="bar" name="foo"/>'
+ u'<input type="text" id="foo" value="bar" name="foo"/>'
>>> Textbox(name='foo', value=0).render()
- '<input type="text" id="foo" value="0" name="foo"/>'
+ u'<input type="text" id="foo" value="0" name="foo"/>'
"""
def get_type(self):
return 'text'
@@ -198,7 +205,7 @@
"""Password input.
>>> Password(name='password', value='secret').render()
- '<input type="password" id="password" value="secret" name="password"/>'
+ u'<input type="password" id="password" value="secret" name="password"/>'
"""
def get_type(self):
@@ -208,7 +215,7 @@
"""Textarea input.
>>> Textarea(name='foo', value='bar').render()
- '<textarea id="foo" name="foo">bar</textarea>'
+ u'<textarea id="foo" name="foo">bar</textarea>'
"""
def render(self):
attrs = self.attrs.copy()
@@ -220,9 +227,9 @@
r"""Dropdown/select input.
>>> Dropdown(name='foo', args=['a', 'b', 'c'], value='b').render()
- '<select id="foo" name="foo">\n <option value="a">a</option>\n <option selected="selected" value="b">b</option>\n <option value="c">c</option>\n</select>\n'
+ u'<select id="foo" name="foo">\n <option value="a">a</option>\n <option selected="selected" value="b">b</option>\n <option value="c">c</option>\n</select>\n'
>>> Dropdown(name='foo', args=[('a', 'aa'), ('b', 'bb'), ('c', 'cc')], value='b').render()
- '<select id="foo" name="foo">\n <option value="a">aa</option>\n <option selected="selected" value="b">bb</option>\n <option value="c">cc</option>\n</select>\n'
+ u'<select id="foo" name="foo">\n <option value="a">aa</option>\n <option selected="selected" value="b">bb</option>\n <option value="c">cc</option>\n</select>\n'
"""
def __init__(self, name, args, *validators, **attrs):
self.args = args
@@ -235,15 +242,48 @@
x = '