Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-httpretty for 
openSUSE:Factory checked in at 2021-03-29 18:21:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-httpretty (Old)
 and      /work/SRC/openSUSE:Factory/.python-httpretty.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-httpretty"

Mon Mar 29 18:21:10 2021 rev:18 rq:880621 version:1.0.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-httpretty/python-httpretty.changes        
2020-12-16 10:59:54.935536186 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-httpretty.new.2401/python-httpretty.changes  
    2021-03-29 18:21:13.322228119 +0200
@@ -1,0 +2,10 @@
+Mon Mar 22 20:00:53 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Updater to 1.0.5
+  * Bugfix: Support socket.socketpair() . #402
+  * Bugfix: Prevent exceptions from re-applying monkey patches.
+    #406
+- Release 1.0.4
+  * Python 3.8 and 3.9 support. #407
+
+-------------------------------------------------------------------

Old:
----
  httpretty-1.0.3.tar.gz

New:
----
  httpretty-1.0.5.tar.gz

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

Other differences:
------------------
++++++ python-httpretty.spec ++++++
--- /var/tmp/diff_new_pack.kEIB1u/_old  2021-03-29 18:21:13.806228615 +0200
+++ /var/tmp/diff_new_pack.kEIB1u/_new  2021-03-29 18:21:13.810228619 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-httpretty
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-httpretty
-Version:        1.0.3
+Version:        1.0.5
 Release:        0
 Summary:        HTTP client mocking tool for Python
 License:        MIT
@@ -35,7 +35,6 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module sure}
 BuildRequires:  %{python_module tornado}
-BuildRequires:  %{python_module twine >= 1.15.0}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildArch:      noarch
@@ -76,6 +75,6 @@
 %license COPYING
 %doc README.rst
 %{python_sitelib}/httpretty
-%{python_sitelib}/httpretty*egg-info
+%{python_sitelib}/httpretty-%{version}*-info
 
 %changelog

++++++ httpretty-1.0.3.tar.gz -> httpretty-1.0.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/PKG-INFO new/httpretty-1.0.5/PKG-INFO
--- old/httpretty-1.0.3/PKG-INFO        2020-11-24 21:50:24.000000000 +0100
+++ new/httpretty-1.0.5/PKG-INFO        2021-01-06 03:43:31.325078500 +0100
@@ -1,12 +1,12 @@
 Metadata-Version: 1.2
 Name: httpretty
-Version: 1.0.3
+Version: 1.0.5
 Summary: HTTP client mock for Python
 Home-page: https://httpretty.readthedocs.io
 Author: Gabriel Falcao
 Author-email: gabr...@nacaolivre.org
 License: MIT
-Description: HTTPretty 1.0.3
+Description: HTTPretty 1.0.5
         ===============
         
         HTTP Client mocking tool for Python. Provides a full fake TCP socket 
module. Inspired by `FakeWeb <https://github.com/chrisk/fakeweb>`_
@@ -21,6 +21,8 @@
         
         - **3.6**
         - **3.7**
+        - **3.8**
+        - **3.9**
         
         .. image:: 
https://github.com/gabrielfalcao/HTTPretty/raw/master/docs/source/_static/logo.svg?sanitize=true
         
@@ -30,10 +32,7 @@
         .. image:: 
https://img.shields.io/codecov/c/github/gabrielfalcao/HTTPretty
            :target: https://codecov.io/gh/gabrielfalcao/HTTPretty
         
-        .. image:: 
https://img.shields.io/github/workflow/status/gabrielfalcao/HTTPretty/python-3.6?label=python%203.6
-           :target: https://github.com/gabrielfalcao/HTTPretty/actions
-        
-        .. image:: 
https://img.shields.io/github/workflow/status/gabrielfalcao/HTTPretty/python-3.7?label=python%203.7
+        .. image:: 
https://img.shields.io/github/workflow/status/gabrielfalcao/HTTPretty/HTTPretty%20Tests
            :target: https://github.com/gabrielfalcao/HTTPretty/actions
         
         .. image:: https://img.shields.io/readthedocs/httpretty
@@ -177,6 +176,8 @@
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python
 Classifier: Topic :: Internet :: WWW/HTTP
 Classifier: Topic :: Software Development :: Testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/README.rst 
new/httpretty-1.0.5/README.rst
--- old/httpretty-1.0.3/README.rst      2020-11-24 21:50:14.000000000 +0100
+++ new/httpretty-1.0.5/README.rst      2021-01-06 03:43:17.000000000 +0100
@@ -1,4 +1,4 @@
-HTTPretty 1.0.3
+HTTPretty 1.0.5
 ===============
 
 HTTP Client mocking tool for Python. Provides a full fake TCP socket module. 
Inspired by `FakeWeb <https://github.com/chrisk/fakeweb>`_
@@ -13,6 +13,8 @@
 
 - **3.6**
 - **3.7**
+- **3.8**
+- **3.9**
 
 .. image:: 
https://github.com/gabrielfalcao/HTTPretty/raw/master/docs/source/_static/logo.svg?sanitize=true
 
@@ -22,10 +24,7 @@
 .. image:: https://img.shields.io/codecov/c/github/gabrielfalcao/HTTPretty
    :target: https://codecov.io/gh/gabrielfalcao/HTTPretty
 
-.. image:: 
https://img.shields.io/github/workflow/status/gabrielfalcao/HTTPretty/python-3.6?label=python%203.6
-   :target: https://github.com/gabrielfalcao/HTTPretty/actions
-
-.. image:: 
https://img.shields.io/github/workflow/status/gabrielfalcao/HTTPretty/python-3.7?label=python%203.7
+.. image:: 
https://img.shields.io/github/workflow/status/gabrielfalcao/HTTPretty/HTTPretty%20Tests
    :target: https://github.com/gabrielfalcao/HTTPretty/actions
 
 .. image:: https://img.shields.io/readthedocs/httpretty
Binary files old/httpretty-1.0.3/docs/build/doctrees/acks.doctree and 
new/httpretty-1.0.5/docs/build/doctrees/acks.doctree differ
Binary files old/httpretty-1.0.3/docs/build/doctrees/api.doctree and 
new/httpretty-1.0.5/docs/build/doctrees/api.doctree differ
Binary files old/httpretty-1.0.3/docs/build/doctrees/changelog.doctree and 
new/httpretty-1.0.5/docs/build/doctrees/changelog.doctree differ
Binary files old/httpretty-1.0.3/docs/build/doctrees/contributing.doctree and 
new/httpretty-1.0.5/docs/build/doctrees/contributing.doctree differ
Binary files old/httpretty-1.0.3/docs/build/doctrees/environment.pickle and 
new/httpretty-1.0.5/docs/build/doctrees/environment.pickle differ
Binary files old/httpretty-1.0.3/docs/build/doctrees/index.doctree and 
new/httpretty-1.0.5/docs/build/doctrees/index.doctree differ
Binary files old/httpretty-1.0.3/docs/build/doctrees/introduction.doctree and 
new/httpretty-1.0.5/docs/build/doctrees/introduction.doctree differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/docs/source/changelog.rst 
new/httpretty-1.0.5/docs/source/changelog.rst
--- old/httpretty-1.0.3/docs/source/changelog.rst       2020-11-24 
21:43:21.000000000 +0100
+++ new/httpretty-1.0.5/docs/source/changelog.rst       2021-01-06 
03:38:43.000000000 +0100
@@ -1,6 +1,17 @@
 Release Notes
 =============
 
+1.0.5
+-----
+
+- Bugfix: Support `socket.socketpair() 
<https://docs.python.org/3/library/socket.html#socket.socketpair>`_ . `#402 
<https://github.com/gabrielfalcao/HTTPretty/issues/402>`_
+- Bugfix: Prevent exceptions from re-applying monkey patches. `#406 
<https://github.com/gabrielfalcao/HTTPretty/issues/406>`_
+
+1.0.4
+-----
+
+- Python 3.8 and 3.9 support. `#407 
<https://github.com/gabrielfalcao/HTTPretty/issues/407>`_
+
 1.0.3
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/docs/source/introduction.rst 
new/httpretty-1.0.5/docs/source/introduction.rst
--- old/httpretty-1.0.3/docs/source/introduction.rst    2020-03-26 
00:26:38.000000000 +0100
+++ new/httpretty-1.0.5/docs/source/introduction.rst    2021-01-05 
21:24:07.000000000 +0100
@@ -95,7 +95,7 @@
          return [200, response_headers, json.dumps({"hello": "world"})]
 
      httpretty.register_uri(
-         HTTPretty.POST, "https://httpretty.example.com/api";,
+         httpretty.POST, "https://httpretty.example.com/api";,
          body=request_callback)
 
      response = requests.post('https://httpretty.example.com/api', 
headers={'Content-Type': 'application/json'}, data='{"nothing": "here"}')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/httpretty/core.py 
new/httpretty-1.0.5/httpretty/core.py
--- old/httpretty-1.0.3/httpretty/core.py       2020-11-24 21:42:12.000000000 
+0100
+++ new/httpretty-1.0.5/httpretty/core.py       2021-01-06 03:37:32.000000000 
+0100
@@ -73,6 +73,7 @@
 from errno import EAGAIN
 
 old_socket = socket.socket
+old_socketpair = getattr(socket, 'socketpair', None)
 old_SocketType = socket.SocketType
 old_create_connection = socket.create_connection
 old_gethostbyname = socket.gethostbyname
@@ -360,6 +361,10 @@
         raise AssertionError('socket {} is not 
connected'.format(self.fakesocket.truesock))
 
 
+def fake_socketpair(*args, **kw):
+    with restored_libs():
+        return old_socketpair(*args, **kw)
+
 class fakesock(object):
     """
     fake :py:mod:`socket`
@@ -450,7 +455,7 @@
 
             if not self.is_http:
                 self.connect_truesock()
-            elif self.truesock and not self.__truesock_is_connected__:
+            elif self.truesock and not self.real_socket_is_connected():
                 # TODO: remove nested if
                 matcher = httpretty.match_http_address(self._host, self._port)
                 if matcher is None:
@@ -470,14 +475,15 @@
             return self.truesock.bind(address)
 
         def connect_truesock(self):
+            if self.__truesock_is_connected__:
+                return self.truesock
+
             if httpretty.allow_net_connect and not self.truesock:
                 self.truesock = self.create_socket()
             elif not self.truesock:
                 raise UnmockedError()
-
-            if self.__truesock_is_connected__:
-                return self.truesock
-            with restored_libs():
+            undo_patch_socket()
+            try:
                 hostname = self._address[0]
                 port = 80
                 if len(self._address) == 2:
@@ -490,6 +496,9 @@
                 sock.connect(self._address)
                 self.__truesock_is_connected__ = True
                 self.truesock = sock
+            finally:
+                apply_patch_socket()
+
             return self.truesock
 
         def real_socket_is_connected(self):
@@ -647,18 +656,6 @@
             self._entry = matcher.get_next_entry(method, info, request)
 
         def forward_and_trace(self, function_name, *a, **kw):
-            if self.truesock and not self.__truesock_is_connected__:
-                self.truesock = self.create_socket()
-                ### self.connect_truesock()
-
-            if self.__truesock_is_connected__:
-                function = getattr(self.truesock, function_name)
-
-            if self.is_http:
-                if self.truesock and not self.__truesock_is_connected__:
-                    self.truesock = self.create_socket()
-                    ### self.connect_truesock()
-
             if not self.truesock:
                 raise UnmockedError()
 
@@ -681,18 +678,12 @@
             return self.forward_and_trace('recvfrom_into', *args, **kwargs)
 
         def recv_into(self, *args, **kwargs):
-            if self.truesock and not self.__truesock_is_connected__:
-                self.connect_truesock()
             return self.forward_and_trace('recv_into', *args, **kwargs)
 
         def recvfrom(self, *args, **kwargs):
-            if self.truesock and not self.__truesock_is_connected__:
-                self.connect_truesock()
             return self.forward_and_trace('recvfrom', *args, **kwargs)
 
         def recv(self, buffersize=None, *args, **kwargs):
-            if self.truesock and not self.__truesock_is_connected__:
-                self.connect_truesock()
             buffersize = buffersize or self._bufsize
             return self.forward_and_trace('recv', buffersize, *args, **kwargs)
 
@@ -1624,6 +1615,7 @@
 
     new_wrap = None
     socket.socket = fakesock.socket
+    socket.socketpair = fake_socketpair
     socket._socketobject = fakesock.socket
     if not bad_socket_shadow:
         socket.SocketType = fakesock.socket
@@ -1634,6 +1626,7 @@
     socket.getaddrinfo = fake_getaddrinfo
 
     socket.__dict__['socket'] = fakesock.socket
+    socket.__dict__['socketpair'] = fake_socketpair
     socket.__dict__['_socketobject'] = fakesock.socket
     if not bad_socket_shadow:
         socket.__dict__['SocketType'] = fakesock.socket
@@ -1680,6 +1673,7 @@
 
 def undo_patch_socket():
     socket.socket = old_socket
+    socket.socketpair = old_socketpair
     socket.SocketType = old_SocketType
     socket._socketobject = old_socket
 
@@ -1689,6 +1683,7 @@
     socket.getaddrinfo = old_getaddrinfo
 
     socket.__dict__['socket'] = old_socket
+    socket.__dict__['socketpair'] = old_socketpair
     socket.__dict__['_socketobject'] = old_socket
     socket.__dict__['SocketType'] = old_SocketType
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/httpretty/version.py 
new/httpretty-1.0.5/httpretty/version.py
--- old/httpretty-1.0.3/httpretty/version.py    2020-11-24 21:50:14.000000000 
+0100
+++ new/httpretty-1.0.5/httpretty/version.py    2021-01-06 03:43:17.000000000 
+0100
@@ -1 +1 @@
-version = '1.0.3'
+version = '1.0.5'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/httpretty.egg-info/PKG-INFO 
new/httpretty-1.0.5/httpretty.egg-info/PKG-INFO
--- old/httpretty-1.0.3/httpretty.egg-info/PKG-INFO     2020-11-24 
21:50:24.000000000 +0100
+++ new/httpretty-1.0.5/httpretty.egg-info/PKG-INFO     2021-01-06 
03:43:30.000000000 +0100
@@ -1,12 +1,12 @@
 Metadata-Version: 1.2
 Name: httpretty
-Version: 1.0.3
+Version: 1.0.5
 Summary: HTTP client mock for Python
 Home-page: https://httpretty.readthedocs.io
 Author: Gabriel Falcao
 Author-email: gabr...@nacaolivre.org
 License: MIT
-Description: HTTPretty 1.0.3
+Description: HTTPretty 1.0.5
         ===============
         
         HTTP Client mocking tool for Python. Provides a full fake TCP socket 
module. Inspired by `FakeWeb <https://github.com/chrisk/fakeweb>`_
@@ -21,6 +21,8 @@
         
         - **3.6**
         - **3.7**
+        - **3.8**
+        - **3.9**
         
         .. image:: 
https://github.com/gabrielfalcao/HTTPretty/raw/master/docs/source/_static/logo.svg?sanitize=true
         
@@ -30,10 +32,7 @@
         .. image:: 
https://img.shields.io/codecov/c/github/gabrielfalcao/HTTPretty
            :target: https://codecov.io/gh/gabrielfalcao/HTTPretty
         
-        .. image:: 
https://img.shields.io/github/workflow/status/gabrielfalcao/HTTPretty/python-3.6?label=python%203.6
-           :target: https://github.com/gabrielfalcao/HTTPretty/actions
-        
-        .. image:: 
https://img.shields.io/github/workflow/status/gabrielfalcao/HTTPretty/python-3.7?label=python%203.7
+        .. image:: 
https://img.shields.io/github/workflow/status/gabrielfalcao/HTTPretty/HTTPretty%20Tests
            :target: https://github.com/gabrielfalcao/HTTPretty/actions
         
         .. image:: https://img.shields.io/readthedocs/httpretty
@@ -177,6 +176,8 @@
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python
 Classifier: Topic :: Internet :: WWW/HTTP
 Classifier: Topic :: Software Development :: Testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/setup.py new/httpretty-1.0.5/setup.py
--- old/httpretty-1.0.3/setup.py        2020-03-20 01:54:16.000000000 +0100
+++ new/httpretty-1.0.5/setup.py        2021-01-05 23:35:41.000000000 +0100
@@ -67,6 +67,8 @@
         'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
+        'Programming Language :: Python :: 3.9',
         'Programming Language :: Python',
         'Topic :: Internet :: WWW/HTTP',
         'Topic :: Software Development :: Testing'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/tests/functional/test_httplib2.py 
new/httpretty-1.0.5/tests/functional/test_httplib2.py
--- old/httpretty-1.0.3/tests/functional/test_httplib2.py       2020-03-20 
01:54:16.000000000 +0100
+++ new/httpretty-1.0.5/tests/functional/test_httplib2.py       2021-01-06 
00:16:20.000000000 +0100
@@ -265,7 +265,7 @@
 @httprettified
 @within(two=microseconds)
 def test_callback_response(now):
-    ("HTTPretty should all a callback function to be set as the body with"
+    ("HTTPretty should call a callback function to be set as the body with"
      " httplib2")
 
     def request_callback(request, uri, headers):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/tests/functional/test_urllib2.py 
new/httpretty-1.0.5/tests/functional/test_urllib2.py
--- old/httpretty-1.0.3/tests/functional/test_urllib2.py        2020-03-20 
01:54:16.000000000 +0100
+++ new/httpretty-1.0.5/tests/functional/test_urllib2.py        2021-01-06 
00:16:12.000000000 +0100
@@ -287,7 +287,7 @@
 @httprettified
 @within(two=microseconds)
 def test_callback_response(now):
-    ("HTTPretty should all a callback function to be set as the body with"
+    ("HTTPretty should call a callback function to be set as the body with"
      " urllib2")
 
     def request_callback(request, uri, headers):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httpretty-1.0.3/tests/functional/testserver.py 
new/httpretty-1.0.5/tests/functional/testserver.py
--- old/httpretty-1.0.3/tests/functional/testserver.py  2020-03-10 
03:53:00.000000000 +0100
+++ new/httpretty-1.0.5/tests/functional/testserver.py  2021-01-05 
23:33:23.000000000 +0100
@@ -56,6 +56,17 @@
         self.write("<- HELLO WORLD ->")
 
 
+def subprocess_server_tornado(app, port, data={}):
+    from httpretty import HTTPretty
+    HTTPretty.disable()
+
+    http = HTTPServer(app)
+    HTTPretty.disable()
+
+    http.listen(int(port))
+    IOLoop.instance().start()
+
+
 class TornadoServer(object):
     is_running = False
 
@@ -71,22 +82,13 @@
         ])
 
     def start(self):
-        def go(app, port, data={}):
-            from httpretty import HTTPretty
-            HTTPretty.disable()
-
-            http = HTTPServer(app)
-            HTTPretty.disable()
-
-            http.listen(int(port))
-            IOLoop.instance().start()
 
         app = self.get_handlers()
 
         data = {}
         args = (app, self.port, data)
         HTTPretty.disable()
-        self.process = Process(target=go, args=args)
+        self.process = Process(target=subprocess_server_tornado, args=args)
         self.process.start()
         time.sleep(1)
 
@@ -99,6 +101,22 @@
             self.is_running = False
 
 
+def subprocess_server_tcp(port):
+    from httpretty import HTTPretty
+    HTTPretty.disable()
+    import socket
+    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+    s.bind(('localhost', port))
+    s.listen(True)
+    conn, addr = s.accept()
+
+    while True:
+        data = conn.recv(1024)
+        conn.send(b"RECEIVED: " + bytes(data))
+
+    conn.close()
+
+
 class TCPServer(object):
     def __init__(self, port):
         self.port = int(port)
@@ -106,23 +124,9 @@
     def start(self):
         HTTPretty.disable()
 
-        def go(port):
-            from httpretty import HTTPretty
-            HTTPretty.disable()
-            import socket
-            s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-            s.bind(('localhost', port))
-            s.listen(True)
-            conn, addr = s.accept()
-
-            while True:
-                data = conn.recv(1024)
-                conn.send(b"RECEIVED: " + bytes(data))
-
-            conn.close()
 
         args = [self.port]
-        self.process = Process(target=go, args=args)
+        self.process = Process(target=subprocess_server_tcp, args=args)
         self.process.start()
         time.sleep(1)
 

Reply via email to