Hello community,

here is the log from the commit of package python-http-parser for 
openSUSE:Factory checked in at 2013-03-01 07:50:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-http-parser (Old)
 and      /work/SRC/openSUSE:Factory/.python-http-parser.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-http-parser", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-http-parser/python-http-parser.changes    
2012-10-08 20:33:57.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-http-parser.new/python-http-parser.changes   
    2013-03-01 07:50:04.000000000 +0100
@@ -1,0 +2,11 @@
+Tue Feb 26 14:05:37 UTC 2013 - [email protected]
+
+- Initial python3 support
+
+-------------------------------------------------------------------
+Sat Feb  9 16:35:29 UTC 2013 - [email protected]
+
+- Update to 0.8.1:
+  * No changelog available
+
+-------------------------------------------------------------------
New Changes file:

--- /dev/null   2013-02-26 18:15:11.936010755 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-http-parser.new/python3-http-parser.changes  
    2013-03-01 07:50:04.000000000 +0100
@@ -0,0 +1,86 @@
+-------------------------------------------------------------------
+Tue Feb 26 14:05:37 UTC 2013 - [email protected]
+
+- Initial python3 support
+
+-------------------------------------------------------------------
+Sat Feb  9 16:35:29 UTC 2013 - [email protected]
+
+- Update to 0.8.1:
+  * No changelog available
+
+-------------------------------------------------------------------
+Sat Oct  6 22:05:50 UTC 2012 - [email protected]
+
+- Update to 0.7.12:
+  * fix __eq__
+  * fix environ update
+- Changes from 0.7.11:
+  * api should be consistent
+- Changes from 0.7.10:
+  * Fixed pyparser.py to work on Python 3
+  * Bugfix: match against upper-cased header names
+  * Bugfix: looking for popped HTTP_SCRIPT_NAME
+- Changes from 0.7.9:
+  * Regenerated parser.c from Cython 0.17
+  * Updated HTTP parser C code
+  * use SocketIO object on python3
+  * fix data type, fix iteration
+- Remove unnecessary rm from %install, those files no longer exist.
+
+-------------------------------------------------------------------
+Sun Sep  9 16:10:02 UTC 2012 - [email protected]
+
+- Update to 0.7.8:
+  * fix python 3 compatibility
+  * fix categories
+  * fix requirements in the readme, add TODO
+- Changes from 0.7.7:
+  * fix setup
+  * add an example: parse a response text file on windows
+  * fix issue 14
+- Changes from 0.7.6:
+  * fix setup.py and rebuild the extension
+  * remove support of py25
+  * use setuptools to install http_parser
+  * chech if self.environ exists before update it
+  * add an example for parse windows response file
+  * add PURGE method
+  * rebuild code
+  * sync http-parser C code from joyent
+  * only create WSGI environ on demand
+- Remove executable bits from example scripts (RPMLINT warning).
+
+-------------------------------------------------------------------
+Tue Feb 28 18:09:50 UTC 2012 - [email protected]
+
+- Update to version 0.7.5:
+  * fix whitespaces
+  * multiple headers values should be separated by a ", " not ","
+  * regenerate the C code
+
+-------------------------------------------------------------------
+Tue Jan 31 13:40:40 UTC 2012 - [email protected]
+
+- Update to version 0.7.4
+
+-------------------------------------------------------------------
+Wed Jan 25 19:24:07 UTC 2012 - [email protected]
+
+- Update to version 0.7.2
+
+-------------------------------------------------------------------
+Sun Nov 27 05:59:08 UTC 2011 - [email protected]
+
+- Update to version 0.7.1
+
+-------------------------------------------------------------------
+Fri Sep 23 12:00:22 UTC 2011 - [email protected]
+
+- Update to version 0.7.0
+
+-------------------------------------------------------------------
+Mon Jun 20 18:30:34 UTC 2011 - [email protected]
+
+- Initital release
+

Old:
----
  http-parser-0.7.12.tar.gz

New:
----
  http-parser-0.8.1.tar.gz
  pre_checkin.sh
  python3-http-parser.changes
  python3-http-parser.spec

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

Other differences:
------------------
++++++ python-http-parser.spec ++++++
--- /var/tmp/diff_new_pack.LNjcad/_old  2013-03-01 07:50:05.000000000 +0100
+++ /var/tmp/diff_new_pack.LNjcad/_new  2013-03-01 07:50:05.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-http-parser
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 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:           python-http-parser
-Version:        0.7.12
+Version:        0.8.1
 Release:        0
 Url:            https://github.com/benoitc/http-parser/
 Summary:        HTTP Request/Response Parser for Python in C

++++++ python3-http-parser.spec ++++++
#
# spec file for package python-http-parser
#
# Copyright (c) 2013 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# 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:           python3-http-parser
Version:        0.8.1
Release:        0
Url:            https://github.com/benoitc/http-parser/
Summary:        HTTP Request/Response Parser for Python in C
License:        MIT
Group:          Development/Languages/Python
Source:         
http://pypi.python.org/packages/source/h/http-parser/http-parser-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python3-devel
BuildRequires:  python3-distribute
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python3_sitearch: %global python_sitearch %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif

%description
HTTP request/response parser for Python in C under MIT License, based on
http-parser from Ryan Dahl.

%prep
%setup -q -n http-parser-%{version}

%build
CFLAGS="%{optflags} -fno-strict-aliasing" python3 setup.py build

%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
# Remove exec bits from example scripts
chmod a-x examples/*

%files
%defattr(-,root,root)
%doc LICENSE NOTICE README.rst examples
%{python3_sitearch}/*

%changelog
++++++ http-parser-0.7.12.tar.gz -> http-parser-0.8.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-parser-0.7.12/.gitignore 
new/http-parser-0.8.1/.gitignore
--- old/http-parser-0.7.12/.gitignore   2012-10-04 16:14:38.000000000 +0200
+++ new/http-parser-0.8.1/.gitignore    2013-02-09 10:19:33.000000000 +0100
@@ -9,6 +9,8 @@
 setuptools-*
 .svn/*
 .DS_Store
+.cache/*
+.tox/*
 *.so
 http_parser/parser.so
 http_parser.egg-info
@@ -16,3 +18,4 @@
 .coverage
 doc/.sass-cache
 http_parser/__pycache__
+MANIFEST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-parser-0.7.12/PKG-INFO 
new/http-parser-0.8.1/PKG-INFO
--- old/http-parser-0.7.12/PKG-INFO     2012-10-04 16:48:43.000000000 +0200
+++ new/http-parser-0.8.1/PKG-INFO      2013-02-09 11:33:21.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: http-parser
-Version: 0.7.12
+Version: 0.8.1
 Summary: http request/response parser
 Home-page: http://github.com/benoitc/http-parser
 Author: Benoit Chesneau
@@ -17,6 +17,11 @@
         
         Project url: https://github.com/benoitc/http-parser/
         
+        .. image::
+            https://secure.travis-ci.org/benoitc/http-parser.png?branch=master
+            :alt: Build Status
+            :target: https://travis-ci.org/benoitc/http-parser
+        
         Requirements:
         -------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-parser-0.7.12/README.rst 
new/http-parser-0.8.1/README.rst
--- old/http-parser-0.7.12/README.rst   2012-10-04 16:14:38.000000000 +0200
+++ new/http-parser-0.8.1/README.rst    2013-02-09 10:42:06.000000000 +0100
@@ -9,6 +9,11 @@
 
 Project url: https://github.com/benoitc/http-parser/
 
+.. image::
+    https://secure.travis-ci.org/benoitc/http-parser.png?branch=master
+    :alt: Build Status
+    :target: https://travis-ci.org/benoitc/http-parser
+
 Requirements:
 -------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-parser-0.7.12/THANKS 
new/http-parser-0.8.1/THANKS
--- old/http-parser-0.7.12/THANKS       2012-10-04 16:31:43.000000000 +0200
+++ new/http-parser-0.8.1/THANKS        2013-02-09 10:24:06.000000000 +0100
@@ -1,3 +1,5 @@
 Benoit Calvez <[email protected]>
 Brian Rosner <[email protected]>
 Christian Wyglendowski <[email protected]>
+Ronny Pfannschmidt <[email protected]>
+Mike Gilbert <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-parser-0.7.12/http_parser/__init__.py 
new/http-parser-0.8.1/http_parser/__init__.py
--- old/http-parser-0.7.12/http_parser/__init__.py      2012-10-04 
16:46:58.000000000 +0200
+++ new/http-parser-0.8.1/http_parser/__init__.py       2013-02-09 
11:32:09.000000000 +0100
@@ -3,5 +3,5 @@
 # This file is part of http_parser released under the MIT license.
 # See the NOTICE for more information.
 
-version_info = (0, 7, 12)
+version_info = (0, 8, 1)
 __version__ = ".".join(map(str, version_info))
Files old/http-parser-0.7.12/http_parser/__init__.pyc and 
new/http-parser-0.8.1/http_parser/__init__.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-parser-0.7.12/http_parser/_socketio.py 
new/http-parser-0.8.1/http_parser/_socketio.py
--- old/http-parser-0.7.12/http_parser/_socketio.py     1970-01-01 
01:00:00.000000000 +0100
+++ new/http-parser-0.8.1/http_parser/_socketio.py      2013-02-09 
10:55:57.000000000 +0100
@@ -0,0 +1,140 @@
+"""
+socketio taken from the python3 stdlib
+"""
+import io
+import sys
+from socket import timeout, error, socket
+from errno import EINTR, EAGAIN, EWOULDBLOCK
+
+_blocking_errnos = EAGAIN, EWOULDBLOCK
+
+
+# python2.6 fixes
+
+def _recv_into_sock_py26(sock, buf):
+    data = sock.recv(len(buf))
+    l = len(data)
+    buf[:l] = data
+    return l
+
+
+if sys.version_info < (2, 7, 0, 'final'):
+    _recv_into_sock = _recv_into_sock_py26
+else:
+    _recv_into_sock = lambda sock, buf: sock.recv_into(buf)
+
+
+class SocketIO(io.RawIOBase):
+
+    """Raw I/O implementation for stream sockets.
+
+    This class supports the makefile() method on sockets.  It provides
+    the raw I/O interface on top of a socket object.
+    """
+
+    # One might wonder why not let FileIO do the job instead.  There are two
+    # main reasons why FileIO is not adapted:
+    # - it wouldn't work under Windows (where you can't used read() and
+    #   write() on a socket handle)
+    # - it wouldn't work with socket timeouts (FileIO would ignore the
+    #   timeout and consider the socket non-blocking)
+
+    # XXX More docs
+
+    def __init__(self, sock, mode):
+        if mode not in ("r", "w", "rw", "rb", "wb", "rwb"):
+            raise ValueError("invalid mode: %r" % mode)
+        io.RawIOBase.__init__(self)
+        self._sock = sock
+        if "b" not in mode:
+            mode += "b"
+        self._mode = mode
+        self._reading = "r" in mode
+        self._writing = "w" in mode
+        self._timeout_occurred = False
+
+    def readinto(self, b):
+        """Read up to len(b) bytes into the writable buffer *b* and return
+        the number of bytes read.  If the socket is non-blocking and no bytes
+        are available, None is returned.
+
+        If *b* is non-empty, a 0 return value indicates that the connection
+        was shutdown at the other end.
+        """
+        self._checkClosed()
+        self._checkReadable()
+        if self._timeout_occurred:
+            raise IOError("cannot read from timed out object")
+        while True:
+            try:
+                return _recv_into_sock(self._sock, b)
+            except timeout:
+                self._timeout_occurred = True
+                raise
+            except error as e:
+                n = e.args[0]
+                if n == EINTR:
+                    continue
+                if n in _blocking_errnos:
+                    return None
+                raise
+
+    def write(self, b):
+        """Write the given bytes or bytearray object *b* to the socket
+        and return the number of bytes written.  This can be less than
+        len(b) if not all data could be written.  If the socket is
+        non-blocking and no bytes could be written None is returned.
+        """
+        self._checkClosed()
+        self._checkWritable()
+        try:
+            return self._sock.send(b)
+        except error as e:
+            # XXX what about EINTR?
+            if e.args[0] in _blocking_errnos:
+                return None
+            raise
+
+    def readable(self):
+        """True if the SocketIO is open for reading.
+        """
+        return self._reading and not self.closed
+
+    def writable(self):
+        """True if the SocketIO is open for writing.
+        """
+        return self._writing and not self.closed
+
+    def fileno(self):
+        """Return the file descriptor of the underlying socket.
+        """
+        self._checkClosed()
+        return self._sock.fileno()
+
+    @property
+    def name(self):
+        if not self.closed:
+            return self.fileno()
+        else:
+            return -1
+
+    @property
+    def mode(self):
+        return self._mode
+
+    def close(self):
+        """Close the SocketIO object.  This doesn't close the underlying
+        socket, except if all references to it have disappeared.
+        """
+        if self.closed:
+            return
+        io.RawIOBase.close(self)
+        self._sock._decref_socketios()
+        self._sock = None
+
+    def _checkClosed(self, msg=None):
+        """Internal: raise an ValueError if file is closed
+        """
+        if self.closed:
+            raise ValueError("I/O operation on closed file."
+                             if msg is None else msg)
Files old/http-parser-0.7.12/http_parser/_socketio.pyc and 
new/http-parser-0.8.1/http_parser/_socketio.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-parser-0.7.12/http_parser/http.py 
new/http-parser-0.8.1/http_parser/http.py
--- old/http-parser-0.7.12/http_parser/http.py  2012-10-04 16:14:38.000000000 
+0200
+++ new/http-parser-0.8.1/http_parser/http.py   2013-02-09 10:19:33.000000000 
+0100
@@ -189,9 +189,12 @@
 
         # fetch data
         b = bytearray(DEFAULT_BUFFER_SIZE)
+
+        # if a nonblocking socket is used
+        # then pep 3116 demands read/readinto to return 0
         recved = self.stream.readinto(b)
         if recved is None:
-            raise NoMoreData("no more data")
+            raise IOError('nonblocking socket used in blocking code')
 
         del b[recved:]
         to_parse = bytes(b)
Files old/http-parser-0.7.12/http_parser/http.pyc and 
new/http-parser-0.8.1/http_parser/http.pyc differ
Files old/http-parser-0.7.12/http_parser/parser.so and 
new/http-parser-0.8.1/http_parser/parser.so differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-parser-0.7.12/http_parser/pyparser.py 
new/http-parser-0.8.1/http_parser/pyparser.py
--- old/http-parser-0.7.12/http_parser/pyparser.py      2012-10-04 
16:40:11.000000000 +0200
+++ new/http-parser-0.8.1/http_parser/pyparser.py       2013-02-09 
11:29:07.000000000 +0100
@@ -374,10 +374,11 @@
 
         # detect encoding and set decompress object
         encoding = self._headers.get('content-encoding')
-        if encoding == "gzip":
-            self.__decompress_obj = zlib.decompressobj(16+zlib.MAX_WBITS)
-        elif encoding == "deflate":
-            self.__decompress_obj = zlib.decompressobj()
+        if self.decompress:
+            if encoding == "gzip":
+                self.__decompress_obj = zlib.decompressobj(16+zlib.MAX_WBITS)
+            elif encoding == "deflate":
+                self.__decompress_obj = zlib.decompressobj()
 
         rest = data[idx+4:]
         self._buf = [rest]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-parser-0.7.12/http_parser/reader.py 
new/http-parser-0.8.1/http_parser/reader.py
--- old/http-parser-0.7.12/http_parser/reader.py        2012-10-04 
16:14:38.000000000 +0200
+++ new/http-parser-0.8.1/http_parser/reader.py 2013-02-09 10:54:33.000000000 
+0100
@@ -4,36 +4,10 @@
 
 # See the NOTICE for more information.
 
-from errno import EINTR, EAGAIN, EWOULDBLOCK
 from io import DEFAULT_BUFFER_SIZE, RawIOBase
-import socket
-import sys
-import types
 
 from http_parser.util import StringIO
 
-_blocking_errnos = ( EAGAIN, EWOULDBLOCK )
-
-if sys.version_info < (2, 7, 0, 'final'):
-    # in python 2.6 socket.recv_into doesn't support bytesarray
-    import array
-    def _readinto(sock, b):
-        l = max(len(b), DEFAULT_BUFFER_SIZE)
-        while True:
-            try:
-                buf = sock.recv(l)
-                recved = len(buf)
-                b[0:recved] = buf
-                return recved
-            except socket.error as e:
-                n = e.args[0]
-                if n == EINTR:
-                    continue
-                if n in _blocking_errnos:
-                    return None
-                raise
-else:
-    _readinto = None
 
 class HttpBodyReader(RawIOBase):
     """ Raw implementation to stream http body """
@@ -128,66 +102,8 @@
             iterable = string
         IterReader.__init__(self, iterable)
 
+from http_parser._socketio import SocketIO
 
-if sys.version_info[0] == 3:
-    from socket import SocketIO
-    class SocketReader(SocketIO):
-
-        def __init__(self, sock):
-            SocketIO.__init__(self, sock, mode="rb")
-else:
-    class SocketReader(RawIOBase):
-        """ a raw reader for sockets or socket like interface. based
-        on SocketIO object from python3.2 """
-
-        def __init__(self, sock):
-            RawIOBase.__init__(self)
-            self._sock = sock
-
-        if _readinto is not None:
-            def readinto(self, b):
-                try:
-                    self._checkClosed()
-                except AttributeError:
-                    pass
-                self._checkReadable()
-                return _readinto(self._sock, b)
-
-        else:
-            def readinto(self, b):
-                try:
-                    self._checkClosed()
-                except AttributeError:
-                    pass
-                self._checkReadable()
-
-                while True:
-                    try:
-                        return self._sock.recv_into(b)
-                    except socket.error as e:
-                        n = e.args[0]
-                        if n == EINTR:
-                            continue
-                        if n in _blocking_errnos:
-                            return None
-                        raise
-
-        def readable(self):
-            """True if the SocketIO is open for reading.
-            """
-            return not self.closed
-
-        def fileno(self):
-            """Return the file descriptor of the underlying socket.
-            """
-            self._checkClosed()
-            return self._sock.fileno()
-
-        def close(self):
-            """Close the SocketIO object. This doesn't close the underlying
-            socket, except if all references to it have disappeared.
-            """
-            if self.closed:
-                return
-            RawIOBase.close(self)
-            self._sock = None
+class SocketReader(SocketIO):
+    def __init__(self, sock):
+        super(SocketReader, self).__init__(sock, mode='rb')
Files old/http-parser-0.7.12/http_parser/reader.pyc and 
new/http-parser-0.8.1/http_parser/reader.pyc differ
Files old/http-parser-0.7.12/http_parser/util.pyc and 
new/http-parser-0.8.1/http_parser/util.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/http-parser-0.7.12/setup.py 
new/http-parser-0.8.1/setup.py
--- old/http-parser-0.7.12/setup.py     2012-10-04 16:31:02.000000000 +0200
+++ new/http-parser-0.8.1/setup.py      2013-02-09 10:34:05.000000000 +0100
@@ -10,6 +10,7 @@
 from distutils.command.sdist import sdist as _sdist
 import glob
 from imp import load_source
+import io
 import os
 import shutil
 import sys
@@ -49,7 +50,7 @@
 VERSION = http_parser.__version__
 
 # get long description
-with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
+with io.open(os.path.join(os.path.dirname(__file__), 'README.rst'), 
encoding='utf8') as f:
     LONG_DESCRIPTION = f.read()
 
 def _system(cmd):
@@ -157,5 +158,3 @@
 
 if __name__ == "__main__":
     run_setup(not IS_PYPY)
-
-

++++++ pre_checkin.sh ++++++
#!/bin/sh

sed 's,^\(Name: *\)python-,\1python3-,;s,^\(Requires: 
*\)python-,\1python3-,;s,^\(BuildRequires: *\)python-,\1python3-,;s,python 
setup.py,python3 
setup.py,;s,python_sitelib,python3_sitelib,;s,python_sitearch,python3_sitearch,'
 python-http-parser.spec > python3-http-parser.spec
cp python-http-parser.changes python3-http-parser.changes
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to