Hello community,

here is the log from the commit of package python-WebError for openSUSE:Factory 
checked in at 2018-06-27 10:22:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-WebError (Old)
 and      /work/SRC/openSUSE:Factory/.python-WebError.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-WebError"

Wed Jun 27 10:22:51 2018 rev:9 rq:619211 version:0.13.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-WebError/python-WebError.changes  
2013-10-25 11:35:29.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-WebError.new/python-WebError.changes     
2018-06-27 10:23:05.596379471 +0200
@@ -1,0 +2,5 @@
+Tue Jun 26 19:35:03 UTC 2018 - [email protected]
+
+- Clean up SPEC file (still py2k-only, so no change to the singlespec)
+
+-------------------------------------------------------------------

Old:
----
  WebError-0.10.3.tar.gz

New:
----
  WebError-0.13.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-WebError.spec ++++++
--- /var/tmp/diff_new_pack.94qUgw/_old  2018-06-27 10:23:06.316353217 +0200
+++ /var/tmp/diff_new_pack.94qUgw/_new  2018-06-27 10:23:06.320353071 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-WebError
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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
@@ -16,15 +16,16 @@
 #
 
 
+%define modname WebError
 Name:           python-WebError
-Version:        0.10.3
+Version:        0.13.1
 Release:        0
-Url:            http://pypi.python.org/pypi/WebError
 Summary:        Web Error handling and exception catching
 License:        MIT
 Group:          Development/Languages/Python
-Source:         
http://pypi.python.org/packages/source/W/WebError/WebError-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+URL:            https://github.com/Pylons/weberror
+Source:         
https://files.pythonhosted.org/packages/source/W/%{modname}/%{modname}-%{version}.tar.gz
+BuildRequires:  fdupes
 BuildRequires:  python-Paste
 BuildRequires:  python-Pygments
 BuildRequires:  python-Tempita
@@ -35,6 +36,7 @@
 BuildRequires:  python-setuptools
 BuildRequires:  python-simplejson
 BuildRequires:  python-xml
+BuildArch:      noarch
 Requires:       python-Paste
 Requires:       python-Pygments
 Requires:       python-Tempita
@@ -43,32 +45,26 @@
 Requires:       python-xml
 Provides:       python-weberror = %{version}
 Obsoletes:      python-weberror < %{version}
-%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()")}
-BuildRequires:  python-ordereddict
-%else
-BuildArch:      noarch
-%endif
 
 %description
 A web error handling and exception catching module for Paste applications.
 
 %prep
-%setup -q -n WebError-%{version}
-chmod 644 
WebError.egg-info/{top_level.txt,SOURCES.txt,PKG-INFO,not-zip-safe,dependency_links.txt,requires.txt,entry_points.txt,paster_plugins.txt}
 # Fix wrong permissions
+%setup -q -n %{modname}-%{version}
 
 %build
 python setup.py build
 
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%fdupes %{buildroot}%{python_sitelib}
 
 %check
 python setup.py test
 
 %files
-%defattr(-,root,root,-)
-%doc CHANGELOG LICENSE README
+%license LICENSE
+%doc CHANGELOG README.rst
 %{python_sitelib}/*
 
 %changelog

++++++ WebError-0.10.3.tar.gz -> WebError-0.13.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/.hgignore 
new/WebError-0.13.1/.hgignore
--- old/WebError-0.10.3/.hgignore       2010-11-09 23:18:23.000000000 +0100
+++ new/WebError-0.13.1/.hgignore       1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-
-# Automatically generated by `hgimportsvn`
-syntax:glob
-.svn
-.coverage
-*.pyc
-*.egg-info
-ez_setup
-*.egg-info
-*.egg
-test_logger.log
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/.hgtags new/WebError-0.13.1/.hgtags
--- old/WebError-0.10.3/.hgtags 2010-02-13 05:52:47.000000000 +0100
+++ new/WebError-0.13.1/.hgtags 1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-641409089c70fa587f9535f2752eb0424dbf9d65 v0.8a
-2812e5d66cbbdeb54594d46a0da768459038bcfa v0.8
-018397c549de6366aebd1c2a4ddd809997e14ef2 v0.9
-4abb0b1bcb8d95efe79de71c96002b580582560e v0.9.1
-02d8a5923a5c899bee2464af450ac0f1268b5e20 v0.10
-a7942bc0fd124522de37c1f33e11e2463afaeb0e v0.10
-b78d1b83347b515a9b838b4e88756baa8d67e68b v0.10.1
-602a4d02080667d9a7adf9830140d75e64e54c36 v0.10.2
-602a4d02080667d9a7adf9830140d75e64e54c36 v0.10.2
-19525cc8a25c6beb9dda23fb893b303af033cceb v0.10.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/CHANGELOG 
new/WebError-0.13.1/CHANGELOG
--- old/WebError-0.10.3/CHANGELOG       2010-11-09 23:27:05.000000000 +0100
+++ new/WebError-0.13.1/CHANGELOG       2016-04-10 03:46:28.000000000 +0200
@@ -1,40 +1,83 @@
+.. -*-rst-*-
+
 WebError Changelog
 ==================
 
+0.13.1 (09/04/2016)
+-------------------
+
+  * Fixed an +1 issues with the fix in pull request #14 breaking the previous
+    version. This was fixed in https://github.com/Pylons/weberror/pull/16
+
+0.13 (15/03/2016)
+-----------------
+
+  * Fixed an issue with the debug view detection that was causing failures
+    when WebError was used with pyramid_debugtoolbar. See:
+    https://github.com/Pylons/weberror/pull/14
+
+0.12 (08/02/2016)
+-----------------
+
+  * Fixed an CSRF verification error when the token was of type unicode. See:
+    https://github.com/Pylons/weberror/pull/11
+
+0.11 (07/21/2015)
+-----------------
+
+  * Remove XSS issues by requiring a CSRF token for relay commands. Patch by
+    Jordan Milne.
+
 0.10.3 (11/9/2010)
-* Don't require simplejson on Python 2.6
+------------------
+
+  * Don't require simplejson on Python 2.6
 
 0.10.2 (2/12/2010)
-* Fix bug when displaying UTF-8 type errors.
-* Fix bug when emailing data with UTF-8.
+------------------
+
+  * Fix bug when displaying UTF-8 type errors.
+  * Fix bug when emailing data with UTF-8.
 
 0.10.1 (12/29/2008)
-* Fix view source when __file__ is .pyo or $py.class.
+-------------------
+
+  * Fix view source when __file__ is .pyo or $py.class.
 
 0.10 (12/18/2008)
-* Fix indentation of code lines in the traceback view.
-* Enable syntax highlighting in view source.
-* Fix a case where the response could become unicode; fix the docstring
-  patching when using python -O
+-----------------
+
+  * Fix indentation of code lines in the traceback view.
+  * Enable syntax highlighting in view source.
+  * Fix a case where the response could become unicode; fix the docstring
+    patching when using python -O
 
 0.9.1 (10/28/2008)
-* Python 2.6 compatibility
-* Making main page links more accessible to browsers with no JS on per
-  Pylons Trac ticket #489.
+------------------
+
+  * Python 2.6 compatibility
+  * Making main page links more accessible to browsers with no JS on per
+    Pylons Trac ticket #489.
 
 0.9 (07/08/2008)
-* Switched to using Pygments for highlighting.
-* Added better handling of exceptions that don't cleanly convert to str().
-* Added dependency library listings for XML output.
+----------------
+
+  * Switched to using Pygments for highlighting.
+  * Added better handling of exceptions that don't cleanly convert to str().
+  * Added dependency library listings for XML output.
 
 0.8 (06/12/2008)
-* Added fairly basic pdbcapture system.
-* Fixed errors in unicode handling and exception displaying.
-* Updated JS to use jQuery where applicable. Updated jQuery lib and added
-  jQuery hotkeys plugin.
-* Refactored to a flatter layout.
+----------------
+
+  * Added fairly basic pdbcapture system.
+  * Fixed errors in unicode handling and exception displaying.
+  * Updated JS to use jQuery where applicable. Updated jQuery lib and added
+    jQuery hotkeys plugin.
+  * Refactored to a flatter layout.
 
 0.8a (02/27/2008)
-* Fixed error in email due to restructuring of project.
-* Added xml formattor output.
-* Added try/except in case an objects repr throws an exception.
+-----------------
+
+  * Fixed error in email due to restructuring of project.
+  * Added xml formattor output.
+  * Added try/except in case an objects repr throws an exception.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/MANIFEST.in 
new/WebError-0.13.1/MANIFEST.in
--- old/WebError-0.10.3/MANIFEST.in     2008-04-21 22:29:56.000000000 +0200
+++ new/WebError-0.13.1/MANIFEST.in     2016-04-10 03:43:23.000000000 +0200
@@ -1,2 +1,7 @@
+include README.rst CHANGELOG LICENSE
 recursive-include weberror/eval-media *
-recursive-include weberror eval_template.html
+recursive-include weberror *.html
+recursive-exclude weberror *.pyc
+recursive-include tests *
+recursive-exclude tests *.pyc
+recursive-exclude tests *.log
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/PKG-INFO new/WebError-0.13.1/PKG-INFO
--- old/WebError-0.10.3/PKG-INFO        2010-11-09 23:27:41.000000000 +0100
+++ new/WebError-0.13.1/PKG-INFO        2016-04-10 03:48:46.000000000 +0200
@@ -1,12 +1,136 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: WebError
-Version: 0.10.3
+Version: 0.13.1
 Summary: Web Error handling and exception catching
-Home-page: UNKNOWN
+Home-page: https://bitbucket.org/bbangert/weberror
 Author: Ben Bangert, Ian Bicking, Mark Ramm
-Author-email: UNKNOWN
+Author-email: [email protected]
 License: MIT
-Description: UNKNOWN
+Description: .. -*-rst-*-
+        
+        NOTICE
+        ======
+        
+        This software is not actively maintained. Simple bugfixes and other 
patches
+        will be accepted, and released.
+        
+        Introduction
+        ============
+        
+        WebError provides WSGI middleware for the debugging and handling of 
errors
+        inside of WSGI applications.
+        
+        Usage
+        =====
+        
+        There are two primary WSGI middleware components:
+        
+        weberror.errormiddleware.make_error_middleware 
+        ----------------------------------------------
+        
+        This middleware should be used for production deployed applications 
and is used
+        to track extra information regarding errors that occur. These error 
entries can
+        additionally be emailed to a given email address using the 
*error_email*
+        option. Example usage::
+        
+          from weberror.errormiddleware import make_error_middleware
+          app = make_error_middleware(app, global_conf)
+        
+        
+        weberror.evalexception.make_eval_exception
+        ------------------------------------------
+        
+        This middleware is used to help debug errors in wsgi applications 
during
+        development and should not be used in production. Example usage::
+        
+          from weberror.evalexception import make_eval_exception
+          app = make_eval_exception(app, global_conf)
+        
+        
+        .. -*-rst-*-
+        
+        WebError Changelog
+        ==================
+        
+        0.13.1 (09/04/2016)
+        -------------------
+        
+          * Fixed an +1 issues with the fix in pull request #14 breaking the 
previous
+            version. This was fixed in 
https://github.com/Pylons/weberror/pull/16
+        
+        0.13 (15/03/2016)
+        -----------------
+        
+          * Fixed an issue with the debug view detection that was causing 
failures
+            when WebError was used with pyramid_debugtoolbar. See:
+            https://github.com/Pylons/weberror/pull/14
+        
+        0.12 (08/02/2016)
+        -----------------
+        
+          * Fixed an CSRF verification error when the token was of type 
unicode. See:
+            https://github.com/Pylons/weberror/pull/11
+        
+        0.11 (07/21/2015)
+        -----------------
+        
+          * Remove XSS issues by requiring a CSRF token for relay commands. 
Patch by
+            Jordan Milne.
+        
+        0.10.3 (11/9/2010)
+        ------------------
+        
+          * Don't require simplejson on Python 2.6
+        
+        0.10.2 (2/12/2010)
+        ------------------
+        
+          * Fix bug when displaying UTF-8 type errors.
+          * Fix bug when emailing data with UTF-8.
+        
+        0.10.1 (12/29/2008)
+        -------------------
+        
+          * Fix view source when __file__ is .pyo or $py.class.
+        
+        0.10 (12/18/2008)
+        -----------------
+        
+          * Fix indentation of code lines in the traceback view.
+          * Enable syntax highlighting in view source.
+          * Fix a case where the response could become unicode; fix the 
docstring
+            patching when using python -O
+        
+        0.9.1 (10/28/2008)
+        ------------------
+        
+          * Python 2.6 compatibility
+          * Making main page links more accessible to browsers with no JS on 
per
+            Pylons Trac ticket #489.
+        
+        0.9 (07/08/2008)
+        ----------------
+        
+          * Switched to using Pygments for highlighting.
+          * Added better handling of exceptions that don't cleanly convert to 
str().
+          * Added dependency library listings for XML output.
+        
+        0.8 (06/12/2008)
+        ----------------
+        
+          * Added fairly basic pdbcapture system.
+          * Fixed errors in unicode handling and exception displaying.
+          * Updated JS to use jQuery where applicable. Updated jQuery lib and 
added
+            jQuery hotkeys plugin.
+          * Refactored to a flatter layout.
+        
+        0.8a (02/27/2008)
+        -----------------
+        
+          * Fixed error in email due to restructuring of project.
+          * Added xml formattor output.
+          * Added try/except in case an objects repr throws an exception.
+        
 Keywords: wsgi
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/README.rst 
new/WebError-0.13.1/README.rst
--- old/WebError-0.10.3/README.rst      1970-01-01 01:00:00.000000000 +0100
+++ new/WebError-0.13.1/README.rst      2016-04-10 03:43:23.000000000 +0200
@@ -0,0 +1,39 @@
+.. -*-rst-*-
+
+NOTICE
+======
+
+This software is not actively maintained. Simple bugfixes and other patches
+will be accepted, and released.
+
+Introduction
+============
+
+WebError provides WSGI middleware for the debugging and handling of errors
+inside of WSGI applications.
+
+Usage
+=====
+
+There are two primary WSGI middleware components:
+
+weberror.errormiddleware.make_error_middleware 
+----------------------------------------------
+
+This middleware should be used for production deployed applications and is used
+to track extra information regarding errors that occur. These error entries can
+additionally be emailed to a given email address using the *error_email*
+option. Example usage::
+
+  from weberror.errormiddleware import make_error_middleware
+  app = make_error_middleware(app, global_conf)
+
+
+weberror.evalexception.make_eval_exception
+------------------------------------------
+
+This middleware is used to help debug errors in wsgi applications during
+development and should not be used in production. Example usage::
+
+  from weberror.evalexception import make_eval_exception
+  app = make_eval_exception(app, global_conf)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/WebError.egg-info/PKG-INFO 
new/WebError-0.13.1/WebError.egg-info/PKG-INFO
--- old/WebError-0.10.3/WebError.egg-info/PKG-INFO      2010-11-09 
23:27:39.000000000 +0100
+++ new/WebError-0.13.1/WebError.egg-info/PKG-INFO      2016-04-10 
03:48:46.000000000 +0200
@@ -1,12 +1,136 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: WebError
-Version: 0.10.3
+Version: 0.13.1
 Summary: Web Error handling and exception catching
-Home-page: UNKNOWN
+Home-page: https://bitbucket.org/bbangert/weberror
 Author: Ben Bangert, Ian Bicking, Mark Ramm
-Author-email: UNKNOWN
+Author-email: [email protected]
 License: MIT
-Description: UNKNOWN
+Description: .. -*-rst-*-
+        
+        NOTICE
+        ======
+        
+        This software is not actively maintained. Simple bugfixes and other 
patches
+        will be accepted, and released.
+        
+        Introduction
+        ============
+        
+        WebError provides WSGI middleware for the debugging and handling of 
errors
+        inside of WSGI applications.
+        
+        Usage
+        =====
+        
+        There are two primary WSGI middleware components:
+        
+        weberror.errormiddleware.make_error_middleware 
+        ----------------------------------------------
+        
+        This middleware should be used for production deployed applications 
and is used
+        to track extra information regarding errors that occur. These error 
entries can
+        additionally be emailed to a given email address using the 
*error_email*
+        option. Example usage::
+        
+          from weberror.errormiddleware import make_error_middleware
+          app = make_error_middleware(app, global_conf)
+        
+        
+        weberror.evalexception.make_eval_exception
+        ------------------------------------------
+        
+        This middleware is used to help debug errors in wsgi applications 
during
+        development and should not be used in production. Example usage::
+        
+          from weberror.evalexception import make_eval_exception
+          app = make_eval_exception(app, global_conf)
+        
+        
+        .. -*-rst-*-
+        
+        WebError Changelog
+        ==================
+        
+        0.13.1 (09/04/2016)
+        -------------------
+        
+          * Fixed an +1 issues with the fix in pull request #14 breaking the 
previous
+            version. This was fixed in 
https://github.com/Pylons/weberror/pull/16
+        
+        0.13 (15/03/2016)
+        -----------------
+        
+          * Fixed an issue with the debug view detection that was causing 
failures
+            when WebError was used with pyramid_debugtoolbar. See:
+            https://github.com/Pylons/weberror/pull/14
+        
+        0.12 (08/02/2016)
+        -----------------
+        
+          * Fixed an CSRF verification error when the token was of type 
unicode. See:
+            https://github.com/Pylons/weberror/pull/11
+        
+        0.11 (07/21/2015)
+        -----------------
+        
+          * Remove XSS issues by requiring a CSRF token for relay commands. 
Patch by
+            Jordan Milne.
+        
+        0.10.3 (11/9/2010)
+        ------------------
+        
+          * Don't require simplejson on Python 2.6
+        
+        0.10.2 (2/12/2010)
+        ------------------
+        
+          * Fix bug when displaying UTF-8 type errors.
+          * Fix bug when emailing data with UTF-8.
+        
+        0.10.1 (12/29/2008)
+        -------------------
+        
+          * Fix view source when __file__ is .pyo or $py.class.
+        
+        0.10 (12/18/2008)
+        -----------------
+        
+          * Fix indentation of code lines in the traceback view.
+          * Enable syntax highlighting in view source.
+          * Fix a case where the response could become unicode; fix the 
docstring
+            patching when using python -O
+        
+        0.9.1 (10/28/2008)
+        ------------------
+        
+          * Python 2.6 compatibility
+          * Making main page links more accessible to browsers with no JS on 
per
+            Pylons Trac ticket #489.
+        
+        0.9 (07/08/2008)
+        ----------------
+        
+          * Switched to using Pygments for highlighting.
+          * Added better handling of exceptions that don't cleanly convert to 
str().
+          * Added dependency library listings for XML output.
+        
+        0.8 (06/12/2008)
+        ----------------
+        
+          * Added fairly basic pdbcapture system.
+          * Fixed errors in unicode handling and exception displaying.
+          * Updated JS to use jQuery where applicable. Updated jQuery lib and 
added
+            jQuery hotkeys plugin.
+          * Refactored to a flatter layout.
+        
+        0.8a (02/27/2008)
+        -----------------
+        
+          * Fixed error in email due to restructuring of project.
+          * Added xml formattor output.
+          * Added try/except in case an objects repr throws an exception.
+        
 Keywords: wsgi
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/WebError.egg-info/SOURCES.txt 
new/WebError-0.13.1/WebError.egg-info/SOURCES.txt
--- old/WebError-0.10.3/WebError.egg-info/SOURCES.txt   2010-11-09 
23:27:39.000000000 +0100
+++ new/WebError-0.13.1/WebError.egg-info/SOURCES.txt   2016-04-10 
03:48:46.000000000 +0200
@@ -1,9 +1,7 @@
-.hgignore
-.hgtags
 CHANGELOG
 LICENSE
 MANIFEST.in
-README
+README.rst
 setup.cfg
 setup.py
 WebError.egg-info/PKG-INFO
@@ -11,7 +9,6 @@
 WebError.egg-info/dependency_links.txt
 WebError.egg-info/entry_points.txt
 WebError.egg-info/not-zip-safe
-WebError.egg-info/paster_plugins.txt
 WebError.egg-info/requires.txt
 WebError.egg-info/top_level.txt
 tests/__init__.py
@@ -29,6 +26,7 @@
 weberror/evalexception.py
 weberror/formatter.py
 weberror/pdbcapture.py
+weberror/pdbcapture_response.html
 weberror/reporter.py
 weberror/eval-media/debug.js
 weberror/eval-media/jquery-1.2.1.min.js
@@ -43,5 +41,6 @@
 weberror/util/__init__.py
 weberror/util/errorapp.py
 weberror/util/escaping.py
+weberror/util/security.py
 weberror/util/serial_number_generator.py
 weberror/util/source_encoding.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/WebError.egg-info/paster_plugins.txt 
new/WebError-0.13.1/WebError.egg-info/paster_plugins.txt
--- old/WebError-0.10.3/WebError.egg-info/paster_plugins.txt    2007-11-27 
03:49:58.000000000 +0100
+++ new/WebError-0.13.1/WebError.egg-info/paster_plugins.txt    1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-PasteScript
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/WebError.egg-info/requires.txt 
new/WebError-0.13.1/WebError.egg-info/requires.txt
--- old/WebError-0.10.3/WebError.egg-info/requires.txt  2010-11-09 
23:27:39.000000000 +0100
+++ new/WebError-0.13.1/WebError.egg-info/requires.txt  2016-04-10 
03:48:46.000000000 +0200
@@ -1,4 +1,4 @@
 WebOb
 Tempita
 Pygments
-Paste>=1.7.1
\ No newline at end of file
+Paste>=1.7.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/setup.cfg 
new/WebError-0.13.1/setup.cfg
--- old/WebError-0.10.3/setup.cfg       2010-11-09 23:27:41.000000000 +0100
+++ new/WebError-0.13.1/setup.cfg       2016-04-10 03:48:46.000000000 +0200
@@ -4,7 +4,7 @@
 tag_svn_revision = 0
 
 [nosetests]
-verbosity = 2
 verbose = True
+verbosity = 2
 with-doctest = True
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/setup.py new/WebError-0.13.1/setup.py
--- old/WebError-0.10.3/setup.py        2010-11-09 23:25:31.000000000 +0100
+++ new/WebError-0.13.1/setup.py        2016-04-10 03:45:04.000000000 +0200
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 import sys
 
-version = '0.10.3'
+version = '0.13.1'
 
 install_requires = [
     'WebOb',
@@ -14,11 +14,14 @@
 if sys.version_info[:2] < (2, 6):
     install_requires.append('simplejson')
 
+README = open('README.rst').read()
+CHANGELOG = open('CHANGELOG').read()
+
+
 setup(name='WebError',
       version=version,
       description="Web Error handling and exception catching",
-      long_description="""\
-""",
+      long_description=README + '\n\n' + CHANGELOG,
       classifiers=[
           "Development Status :: 5 - Production/Stable",
           "Intended Audience :: Developers",
@@ -33,12 +36,12 @@
       ],
       keywords='wsgi',
       author='Ben Bangert, Ian Bicking, Mark Ramm',
-      author_email='',
-      url='',
+      author_email='[email protected]',
+      url='https://bitbucket.org/bbangert/weberror',
       license='MIT',
       packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
       include_package_data=True,
-      package_data = { 'weberror.evalexception': [ "*.html.tmpl", "media/*" ] 
},
+      package_data={'weberror.evalexception': ["*.html.tmpl", "media/*"]},
       zip_safe=False,
       install_requires=install_requires,
       test_suite='nose.collector',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/tests/test_reporter.py 
new/WebError-0.13.1/tests/test_reporter.py
--- old/WebError-0.10.3/tests/test_reporter.py  2008-03-19 02:28:33.000000000 
+0100
+++ new/WebError-0.13.1/tests/test_reporter.py  2016-04-10 03:43:23.000000000 
+0200
@@ -44,3 +44,37 @@
     assert len(content.splitlines()) == 8
     assert 'ZeroDivisionError' in content
 
+def test_file():
+    fn = setup_file('test_file.log')
+    f = open(fn, 'w')
+    rep = FileReporter(
+        file=f,
+        show_hidden_frames=False)
+
+    try:
+        int('a')
+    except:
+        exc_data = collector.collect_exception(*sys.exc_info())
+    else:
+        assert 0
+    rep.report(exc_data)
+    f.flush()
+    content = open(fn).read()
+    assert len(content.splitlines()) == 4
+    assert 'ValueError' in content
+    assert 'int' in content
+    assert 'test_reporter.py' in content
+    assert 'test_file' in content
+
+    try:
+        1 / 0
+    except:
+        exc_data = collector.collect_exception(*sys.exc_info())
+    else:
+        assert 0
+    rep.report(exc_data)
+    f.flush()
+    content = open(fn).read()
+    print content
+    assert len(content.splitlines()) == 8
+    assert 'ZeroDivisionError' in content
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/weberror/errormiddleware.py 
new/WebError-0.13.1/weberror/errormiddleware.py
--- old/WebError-0.10.3/weberror/errormiddleware.py     2010-02-13 
05:52:22.000000000 +0100
+++ new/WebError-0.13.1/weberror/errormiddleware.py     2016-04-10 
03:43:23.000000000 +0200
@@ -61,6 +61,10 @@
           response should be more minimal; it should not be a complete
           HTML page.
 
+      `show_error_reason``:
+          If set to true and when debug mode is off,
+          exception_type and exception_value are posted after error_message.
+
     Environment Configuration:
     
       ``paste.throw_errors``:
@@ -93,7 +97,8 @@
                  error_subject_prefix=None,
                  error_message=None,
                  xmlhttp_key=None,
-                 reporters=None):
+                 reporters=None,
+                 show_error_reason=None):
         from paste.util import converters
         self.application = application
         # @@: global_conf should be handled elsewhere in a separate
@@ -144,7 +149,11 @@
                     reporter = reporter()
                 reporters.append(reporter)
         self.reporters = reporters or []
-            
+
+        if show_error_reason is None:
+            show_error_reason = global_conf.get('show_error_reason')
+        self.show_error_reason = converters.asbool(show_error_reason)
+
     def __call__(self, environ, start_response):
         """
         The WSGI application interface.
@@ -203,7 +212,8 @@
             error_subject_prefix=self.error_subject_prefix,
             error_message=self.error_message,
             simple_html_error=simple_html_error,
-            reporters=self.reporters)
+            reporters=self.reporters,
+            show_error_reason=self.show_error_reason)
 
 class ResponseStartChecker(object):
     def __init__(self, start_response):
@@ -350,6 +360,7 @@
                      error_message=None,
                      simple_html_error=False,
                      reporters=None,
+                     show_error_reason=False
                      ):
     """
     For exception handling outside of a web context
@@ -430,11 +441,21 @@
             extra_data = ''
             reported = True
         else:
-            msg = error_message or '''
+            default_msg = '''
             An error occurred.  See the error logs for more information.
-            (Turn debug on to display exception reports here)
             '''
-            return_error = error_template('', msg, '')
+            if not show_error_reason:
+                default_msg += '''(Turn debug on to display exception reports 
here)'''
+
+            msg = error_message or default_msg
+
+            if show_error_reason:
+                extra = "%s - %s" % (exc_data.exception_type, 
exc_data.exception_value)
+                extra = cgi.escape(extra).encode('ascii', 'xmlcharrefreplace')
+            else:
+                extra = ''
+
+            return_error = error_template('', msg, extra)
     else:
         return_error = None
     if not reported and error_stream:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/weberror/eval-media/debug.js 
new/WebError-0.13.1/weberror/eval-media/debug.js
--- old/WebError-0.10.3/weberror/eval-media/debug.js    2008-12-29 
21:38:49.000000000 +0100
+++ new/WebError-0.13.1/weberror/eval-media/debug.js    2016-04-10 
03:43:23.000000000 +0200
@@ -75,7 +75,8 @@
     var vars = {
         tbid: tbid,
         debugcount: debug_count,
-        input: input.value
+        input: input.value,
+        csrf_token: csrf_token
     };
     showElement(output);
     callbackXHR(url, vars, function (data) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/weberror/eval_template.html 
new/WebError-0.13.1/weberror/eval_template.html
--- old/WebError-0.10.3/weberror/eval_template.html     2008-12-29 
21:38:49.000000000 +0100
+++ new/WebError-0.13.1/weberror/eval_template.html     2016-04-10 
03:43:23.000000000 +0200
@@ -6,6 +6,7 @@
 <script type="text/javascript">
   debug_base = {{repr(prefix)}};
   debug_count = {{counter}};
+  csrf_token = {{repr(csrf_token)}};
 </script>
 
 <!-- CSS Imports -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/weberror/evalexception.py 
new/WebError-0.13.1/weberror/evalexception.py
--- old/WebError-0.10.3/weberror/evalexception.py       2009-03-31 
20:35:29.000000000 +0200
+++ new/WebError-0.13.1/weberror/evalexception.py       2016-04-10 
03:43:23.000000000 +0200
@@ -45,7 +45,7 @@
 
 import evalcontext
 from weberror import errormiddleware, formatter, collector
-from weberror.util import escaping
+from weberror.util import security
 from tempita import HTMLTemplate
 from webob import Request, Response
 from webob import exc
@@ -163,7 +163,25 @@
     debug_info_replacement.exposed = True
     return debug_info_replacement
 
+def check_csrf_token(func):
+    """
+    A decorator to verify that the sender is same-origin with the debug app
+    """
+    def new_fn(self, req):
+        if 'csrf_token' not in req.params:
+            return exc.HTTPForbidden("You must provide a CSRF token")
+
+        csrf_token = req.params['csrf_token']
+        if not security.valid_csrf_token(csrf_secret, csrf_token):
+            return exc.HTTPForbidden("Invalid CSRF token")
+
+        return func(self, req)
+
+    new_fn.exposed = True
+    return new_fn
+
 debug_counter = itertools.count(int(time.time()))
+csrf_secret = security.gen_csrf_secret()
 
 def get_debug_count(req):
     """
@@ -197,6 +215,7 @@
                  xmlhttp_key=None, media_paths=None, 
                  templating_formatters=None, head_html='', footer_html='',
                  reporters=None, libraries=None,
+                 debug_url_prefix=None,
                  **params):
         self.libraries = libraries or []
         self.application = application
@@ -213,6 +232,12 @@
             else:
                 xmlhttp_key = global_conf.get('xmlhttp_key', '_')
         self.xmlhttp_key = xmlhttp_key
+        if debug_url_prefix is None:
+            if global_conf is None:
+                debug_url_prefix = '_debug'
+            else:
+                debug_url_prefix = global_conf.get('debug_url_prefix', 
'_debug')
+        self.debug_url_prefix = debug_url_prefix.split('/')
         self.media_paths = media_paths or {}
         self.error_template = 
HTMLTemplate.from_filename(error_template_filename)
         if reporters is None:
@@ -229,13 +254,15 @@
         environ['weberror.evalexception'] = environ['paste.evalexception'] = \
             self
         req = Request(environ)
-        if req.path_info_peek() == '_debug':
+        req_path = req.path_info.split('/')[1:len(self.debug_url_prefix) + 1]
+        if req_path == self.debug_url_prefix:
             return self.debug(req)(environ, start_response)
         else:
             return self.respond(environ, start_response)
 
     def debug(self, req):
-        assert req.path_info_pop() == '_debug'
+        for path_part in self.debug_url_prefix:
+            assert req.path_info_pop() == path_part
         next_part = req.path_info_pop()
         method = getattr(self, next_part, None)
         if method is None:
@@ -244,35 +271,6 @@
             return exc.HTTPForbidden('Access to %r is forbidden' % next_part)
         return method(req)
     
-    def relay(self, req):
-        """Relay a request to a remote machine for JS proxying"""
-        host = req.GET['host']
-        conn = httplib.HTTPConnection(host)
-        headers = req.headers
-        
-        # Re-assemble the query string
-        query_str = {}
-        for param, val in req.GET.iteritems():
-            if param in ['host', 'path']: continue
-            query_str[param] = val
-        query_str = urllib.urlencode(query_str)
-        
-        # Transport a GET or a POST
-        if req.method == 'GET':
-            conn.request("GET", '%s?%s' % (req.GET['path'], query_str), 
headers=headers)
-        elif req.method == 'POST':
-            conn.request("POST", req.GET['path'], req.body, headers=headers)
-        
-        # Handle the response and pull out the headers to proxy back
-        resp = conn.getresponse()
-        res = Response()
-        for header, value in resp.getheaders():
-            if header.lower() in ['server', 'date']: continue
-            res.headers[header] = value
-        res.body = resp.read()
-        return res
-    relay.exposed=True
-    
     def post_traceback(self, req):
         """Post the long XML traceback to the host and path provided"""
         debug_info = req.debug_info
@@ -292,7 +290,7 @@
             res.headers[header] = value
         res.body = resp.read()
         return res
-    post_traceback = get_debug_info(post_traceback)
+    post_traceback = check_csrf_token(get_debug_info(post_traceback))
     
     def media(self, req):
         """Static path where images and other files live"""
@@ -379,7 +377,7 @@
                preserve_whitespace(output)))
         return res
 
-    exec_input = get_debug_info(exec_input)
+    exec_input = check_csrf_token(get_debug_info(exec_input))
 
     def source_code(self, req):
         location = req.params['location']
@@ -388,7 +386,7 @@
         if module is None:
             # Something weird indeed
             res = Response(content_type='text/html', charset='utf8')
-            res.body = 'The module <code>%s</code> does not have an entry in 
sys.modules' % module_name
+            res.unicode_body = 'The module <code>%s</code> does not have an 
entry in sys.modules' % html_quote(module_name)
             return res
         filename = module.__file__
         if filename[-4:] in ('.pyc', '.pyo'):
@@ -401,7 +399,7 @@
         html = (
             ('<div>Module: <b>%s</b> file: %s</div>'
              '<style type="text/css">%s</style>'
-             % (module_name, filename, formatter.pygments_css))
+             % (html_quote(module_name), html_quote(filename), 
formatter.pygments_css))
             + formatter.highlight(filename, source, linenos=True))
         source_lines = len(source.splitlines())
         if source_lines < 60:
@@ -416,7 +414,7 @@
         req = Request(environ)
         if req.environ.get('paste.throw_errors'):
             return self.application(environ, start_response)
-        base_path = req.application_url + '/_debug'
+        base_path = req.application_url + '/' + '/'.join(self.debug_url_prefix)
         req.environ['paste.throw_errors'] = True
         started = []
         def detect_start_response(status, headers, exc_info=None):
@@ -575,6 +573,7 @@
             template_data=template_data,
             set_tab=tab,
             prefix=self.base_path,
+            csrf_token=security.generate_csrf_token(csrf_secret),
             counter=self.counter,
             )
         return [page]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/weberror/pdbcapture_response.html 
new/WebError-0.13.1/weberror/pdbcapture_response.html
--- old/WebError-0.10.3/weberror/pdbcapture_response.html       1970-01-01 
01:00:00.000000000 +0100
+++ new/WebError-0.13.1/weberror/pdbcapture_response.html       2016-04-10 
03:43:23.000000000 +0200
@@ -0,0 +1,110 @@
+{{py: base_url = state['base_url']}}
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; utf8">
+
+<link rel="stylesheet" type="text/css"
+      href="{{base_url}}/.pdbcapture/media/traceback.css">
+<script type="text/javascript">
+baseUrl = {{repr(base_url)}};
+callbackUrl = {{repr(base_url+'/.pdbcapture')}};
+stateId = {{state['id']}};
+</script>
+<script type="text/javascript"
+        src="{{base_url}}/.pdbcapture/media/jquery-1.2.1.min.js"></script>
+<script type="text/javascript"
+        src="{{base_url}}/.pdbcapture/media/jquery.scrollTo-min.js"></script>
+<script type="text/javascript"
+        src="{{base_url}}/.pdbcapture/static/debug.js"></script>
+<script type="text/javascript">
+
+function inputSubmit() {
+  var el = jQuery('#stdin').get(0);
+  var stdin = el.value + '\n';
+  el.value = '';
+  refreshOutput(stdin);
+  jQuery('#stdin').focus();
+}
+
+var outputRefreshing = false;
+
+function refreshOutput(stdin) {
+  stdin = stdin || '';
+  if (! stdin && outputRefreshing) {
+    return;
+  }
+  outputRefreshing = true;
+  jQuery.getJSON(
+    callbackUrl+'?id='+stateId+'&stdin='+encodeURIComponent(stdin),
+    function (data) {
+      if (data.response) {
+        var newHref = location.href;
+        if (newHref.indexOf('?') == -1) {
+          newHref += '?';
+        } else {
+          newHref += '&';
+        }
+        newHref += '__pdbid__=' + stateId;
+        location.href = newHref;
+      }
+      if (data.stdout) {
+        var ta = jQuery('#stdout').get(0);
+        ta.value += data.stdout;
+        jQuery('#stdout').scrollTo(10000);
+      }
+      if (! data.stdinPending) {
+        if (stdin) {
+          // Check quickly when we expect something back
+          var time = 50;
+        } else {
+          var time = 500;
+        }
+        setTimeout('refreshOutput()', time);
+      } // else should flash input or something spiffy
+      outputRefreshing = false;
+    });
+}
+
+jQuery(document).ready(function() {
+  jQuery('#stdout').get(0).value = startingText;
+  var stdin = jQuery('#stdin');
+  stdin.focus();
+  stdin.bind('keypress', function (e) {
+      if (e.keyCode == 13) { // enter was hit
+        inputSubmit();
+      }
+      return true;
+    });
+  stdin.get(0).value = '';
+});
+
+var startingText = {{repr(''.join(state['stdout'])) | html}};
+{{py:state['stdout'][:] = []}}
+
+</script>
+
+<style type="text/css">
+textarea#stdout {
+  font-family: monospace;
+}
+
+#stdin {
+  border: 1px solid #000;
+  font-family: monospace;
+}
+
+body {
+  margin: 0.5em;
+}
+</style>
+
+<title>Debug</title>
+</head>
+
+<body>
+<textarea id="stdout" style="width: 100%; height: 85%" rows=10></textarea><br>
+<input type="text" style="width: 100%" id="stdin" autocomplete="0">
+
+
+
+</body> </html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/weberror/reporter.py 
new/WebError-0.13.1/weberror/reporter.py
--- old/WebError-0.10.3/weberror/reporter.py    2010-02-13 05:52:22.000000000 
+0100
+++ new/WebError-0.13.1/weberror/reporter.py    2016-04-10 03:43:23.000000000 
+0200
@@ -4,8 +4,10 @@
 from email.MIMEText import MIMEText
 from email.MIMEMultipart import MIMEMultipart
 import smtplib
+import ssl
 import time
 from weberror import formatter
+from email.utils import formatdate
 
 class Reporter(object):
 
@@ -54,8 +56,8 @@
                         self.to_addresses, msg.as_string())
         try:
             server.quit()
-        except sslerror:
-            # sslerror is raised in tls connections on closing sometimes
+        except ssl.SSLError:
+            # SSLError is raised in tls connections on closing sometimes
             pass
 
     def check_params(self):
@@ -93,6 +95,7 @@
         msg['Subject'] = as_str(self.subject_prefix) + subject
         msg['From'] = as_str(self.from_address)
         msg['To'] = as_str(', '.join(self.to_addresses))
+        msg['Date'] = formatdate()
         return msg
 
 class LogReporter(Reporter):
@@ -123,7 +126,7 @@
             "You must give a file object")
 
     def report(self, exc_data):
-        text = self.format_text(
+        text, head_text = self.format_text(
             exc_data, show_hidden_frames=self.show_hidden_frames)
         self.file.write(text + '\n' + '-'*60 + '\n')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebError-0.10.3/weberror/util/security.py 
new/WebError-0.13.1/weberror/util/security.py
--- old/WebError-0.10.3/weberror/util/security.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/WebError-0.13.1/weberror/util/security.py       2016-04-10 
03:43:23.000000000 +0200
@@ -0,0 +1,54 @@
+import calendar
+from datetime import datetime, timedelta
+import os
+
+import hashlib
+import hmac
+
+
+if hasattr(hmac, 'compare_digest'):
+    # Python 2.7.7 / 3.3 have a built-in timing independant comparison function
+    constant_time_compare = hmac.compare_digest
+else:
+    def constant_time_compare(actual, expected):
+        """
+        Returns True if the two strings are equal, False otherwise
+
+        The time taken is dependent on the number of characters provided
+        instead of the number of characters that match.
+        """
+        actual_len = len(actual)
+        expected_len = len(expected)
+        result = actual_len ^ expected_len
+        if expected_len > 0:
+            for i in xrange(actual_len):
+                result |= ord(actual[i]) ^ ord(expected[i % expected_len])
+        return result == 0
+
+
+def gen_csrf_secret():
+    return os.urandom(32)
+
+
+def generate_csrf_token(secret):
+    # Make tokens valid for 3 days
+    expiry_dt = datetime.utcnow() + timedelta(days=3)
+    expiry_ts = str(calendar.timegm(expiry_dt.utctimetuple()))
+
+    hashed = hmac.new(secret, expiry_ts, hashlib.sha256).hexdigest()
+    return ','.join((expiry_ts, hashed))
+
+
+def valid_csrf_token(secret, token):
+    try:
+        expiry_ts, hashed = token.split(',')
+        expiry_dt = datetime.utcfromtimestamp(int(expiry_ts))
+    except ValueError, e:
+        return False
+
+    if expiry_dt < datetime.utcnow():
+        return False
+
+    expected = hmac.new(secret, expiry_ts, hashlib.sha256).hexdigest()
+
+    return constant_time_compare(str(hashed), expected)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/WebError-0.10.3/weberror/util/serial_number_generator.py 
new/WebError-0.13.1/weberror/util/serial_number_generator.py
--- old/WebError-0.10.3/weberror/util/serial_number_generator.py        
2008-09-29 21:11:14.000000000 +0200
+++ new/WebError-0.13.1/weberror/util/serial_number_generator.py        
2016-04-10 03:43:23.000000000 +0200
@@ -17,6 +17,39 @@
 
 base = len(good_characters)
 
+def lazy_result(return_type, dummy_initial=None):
+    """Decorator to allow for on-demand evaluation (limited scope of use!)"""
+    if not issubclass(return_type, basestring):
+        raise NotImplementedError
+
+    class _lazy_class(return_type):
+        """lazified access to value of %s type""" % return_type.__name__
+        def __new__(self, *args, **kwargs):
+            return super(_lazy_class, self).__new__(self, dummy_initial)
+        def __init__(self, *args, **kwargs):
+            self._args = args
+            self._kwargs = kwargs
+            self._active = Ellipsis
+        def __call__(self, **kwargs):
+            if self._active is Ellipsis:
+                # explicit caller can possibly override keyword arguments
+                kwargs.update(self._kwargs)
+                self._active = self._generator(*self._args, **kwargs)
+            return self._active
+    _lazy_class.__name__ = "lazy_%s" % return_type.__name__
+
+    # not everything implemented (and will never be 100%)
+    _lazy_class.__str__ = lambda self: str(self())
+    _lazy_class.__repr__ = lambda self: repr(self())
+    _lazy_class.__cmp__ = lambda self, other: cmp(self(), other)
+    _lazy_class.__getslice__ = lambda self, **kws: slice(self(), **kws)
+
+    def _generating_lazy_class(generator):
+        _lazy_class._generator = staticmethod(generator)
+        return _lazy_class
+
+    return _generating_lazy_class
+
 def make_identifier(number):
     """
     Encodes a number as an identifier.
@@ -37,6 +70,7 @@
         number = number / base
     return ''.join(result)
 
+@lazy_result(str)
 def hash_identifier(s, length, pad=True, hasher=md5, prefix='',
                     group=None, upper=False):
     """
@@ -120,4 +154,4 @@
 if __name__ == '__main__':
     import doctest
     doctest.testmod()
-    
+


Reply via email to