packages: python-pesto/python-pesto.spec, python-pesto/python-pesto-multith...

matkor matkor at pld-linux.org
Thu Oct 21 10:31:47 CEST 2010


Author: matkor                       Date: Thu Oct 21 08:31:47 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- Release 2. Multithread fix added.

---- Files affected:
packages/python-pesto:
   python-pesto.spec (1.1 -> 1.2) , python-pesto-multithread.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/python-pesto/python-pesto.spec
diff -u packages/python-pesto/python-pesto.spec:1.1 packages/python-pesto/python-pesto.spec:1.2
--- packages/python-pesto/python-pesto.spec:1.1	Tue Sep 28 22:18:29 2010
+++ packages/python-pesto/python-pesto.spec	Thu Oct 21 10:31:42 2010
@@ -4,11 +4,12 @@
 Summary(pl.UTF-8):	Biblioteka dla Pythonowych aplikacji sieciowych
 Name:		python-%{module}
 Version:	19
-Release:	1
+Release:	2
 License:	BSD
 Group:		Development/Languages/Python
 Source0:	http://pypi.python.org/packages/source/p/%{module}/%{module}-%{version}.tar.gz
 # Source0-md5:	3f279d94147b511de47b3ae067d59a38
+Patch0:         %{name}-multithread.patch
 URL:		http://pesto.redgecko.org/index.html
 # BuildRequires:	python-distribute
 BuildRequires:	rpm-pythonprov
@@ -34,7 +35,7 @@
 
 %prep
 %setup -q -n %{module}-%{version}
-
+%patch0 -p1
 %{__python} setup.py build
 
 %install
@@ -65,6 +66,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2010/10/21 08:31:42  matkor
+- Release 2. Multithread fix added.
+
 Revision 1.1  2010/09/28 20:18:29  matkor
 - Initial version 19.
 

================================================================
Index: packages/python-pesto/python-pesto-multithread.patch
diff -u /dev/null packages/python-pesto/python-pesto-multithread.patch:1.1
--- /dev/null	Thu Oct 21 10:31:47 2010
+++ packages/python-pesto/python-pesto-multithread.patch	Thu Oct 21 10:31:42 2010
@@ -0,0 +1,27 @@
+--- ./pesto/core.py.multithread	2010-10-21 10:22:09.000000000 +0200
++++ ./pesto/core.py	2010-10-21 10:22:33.000000000 +0200
+@@ -69,11 +69,24 @@ class PestoWSGIApplication(object):
+         """
+         WSGI callable - take ``pesto_app`` and adapt it to the WSGI interface.
+         """
++        """
++        # Previous version of code
+         self._content_iter = None
+         self.environ = environ
+         self.start_response = start_response
+         self.request = Request(environ)
+         return self
++        """
++        # We need PestoWSGIApplication instance for each request we get as it may have different environ and start_response values.
++        # Especially in multi thread environment like mod_wsgi
++        wrapper =  PestoWSGIApplication(self._pesto_app)
++        wrapper._app_args  = self._app_args
++        wrapper._app_kwargs =  self._app_kwargs
++        wrapper.environ =  environ
++        wrapper.start_response = start_response
++        wrapper.request = Request(environ)
++        return wrapper
++        
+ 
+     def __get__(self, obj, obj_class=None):
+         self._instance = obj
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/python-pesto/python-pesto.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list