Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-eventlet for openSUSE:Factory 
checked in at 2021-04-01 14:15:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-eventlet (Old)
 and      /work/SRC/openSUSE:Factory/.python-eventlet.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-eventlet"

Thu Apr  1 14:15:52 2021 rev:37 rq:881214 version:0.30.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-eventlet/python-eventlet.changes  
2020-12-12 20:32:16.005845931 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-eventlet.new.2401/python-eventlet.changes    
    2021-04-01 14:15:58.947865603 +0200
@@ -1,0 +2,15 @@
+Sun Mar 21 21:19:52 UTC 2021 - Ben Greiner <[email protected]>
+
+- Update to 0.30.2
+  * greendns: patch ssl to fix RecursionError on
+    SSLContext.options.__set__ #677
+- Release 0.30.1
+  * patcher: built-in open() did not accept kwargs #683
+- Release 0.30.0
+  * pyopenssl tsafe module was deprecated and removed in v20.0.0
+  * deprecate pyevent hub
+  * Deprecate CPython 2.7 and 3.4 support
+  * py39: Add _at_fork_reinit method to Semaphores
+- Drop pr_672-remove-OpenSSL-tsafe.patch merged upstream
+
+-------------------------------------------------------------------

Old:
----
  eventlet-0.29.1.tar.gz
  pr_672-remove-OpenSSL-tsafe.patch

New:
----
  eventlet-0.30.2.tar.gz

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

Other differences:
------------------
++++++ python-eventlet.spec ++++++
--- /var/tmp/diff_new_pack.60Psm0/_old  2021-04-01 14:15:59.591866721 +0200
+++ /var/tmp/diff_new_pack.60Psm0/_new  2021-04-01 14:15:59.591866721 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-eventlet
 #
-# 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
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-eventlet
-Version:        0.29.1
+Version:        0.30.2
 Release:        0
 Summary:        Concurrent networking library for Python
 License:        MIT
@@ -28,32 +28,30 @@
 # PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 
[email protected]
 # Removes dependency on nose
 Patch0:         remove_nose.patch
-# PATCH-FIX-UPSTREAM newdnspython.patch gh#eventlet/eventlet#638 [email protected]
-# patch is from gh#rthalley/dnspython#519
+# PATCH-FIX-UPSTREAM newdnspython.patch [email protected] -- patch is from 
gh#rthalley/dnspython#519, discussion in gh#eventlet/eventlet#638
 Patch1:         newdnspython.patch
 # PATCH-FEATURE-UPSTREAM pr_639.patch gh#eventlet/eventlet#639 [email protected]
 Patch2:         pr_639.patch
 # Really remove the dependency on nose
 Patch3:         remove_nose_part_2.patch
-# PATCH-FIX-UPSTREAM -- gh#eventlet/eventlet#672 remove OpenSSL.tsafe
-Patch4:         pr_672-remove-OpenSSL-tsafe.patch
-BuildRequires:  %{python_module dnspython >= 1.15.0}
-BuildRequires:  %{python_module greenlet >= 0.3}
-BuildRequires:  %{python_module pyOpenSSL}
-BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module pyzmq}
 BuildRequires:  %{python_module setuptools}
-BuildRequires:  %{python_module six >= 1.10.0}
-BuildRequires:  %{python_module testsuite}
 %if 0%{?suse_version} < 1550
 BuildRequires:  python2-monotonic >= 1.4
 %endif
 BuildRequires:  fdupes
 BuildRequires:  netcfg
 BuildRequires:  python-rpm-macros
+# SECTION TEST requirements
 # eventlet parses /etc/protocols which is not available in normal build envs
-# Tests
 BuildRequires:  sysconfig-netconfig
+BuildRequires:  %{python_module dnspython >= 1.15.0}
+BuildRequires:  %{python_module greenlet >= 0.3}
+BuildRequires:  %{python_module pyOpenSSL}
+BuildRequires:  %{python_module pytest}
+BuildRequires:  %{python_module pyzmq}
+BuildRequires:  %{python_module six >= 1.10.0}
+BuildRequires:  %{python_module testsuite}
+# /SECTION
 Requires:       netcfg
 Requires:       python-dnspython >= 1.15.0
 Requires:       python-greenlet >= 0.3
@@ -78,9 +76,8 @@
 %setup -q -n eventlet-%{version}
 %autopatch -p1
 
-sed -i "s|^#!.*||" eventlet/support/greendns.py # Fix non-executable script
-# https://github.com/eventlet/eventlet/issues/638
-sed -i "/assert num_readers/ i \    return" tests/__init__.py
+# Fix non-executable script
+sed -i '1{/^#!/ d}' eventlet/support/greendns.py
 
 %build
 %python_build

++++++ eventlet-0.29.1.tar.gz -> eventlet-0.30.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/NEWS new/eventlet-0.30.2/NEWS
--- old/eventlet-0.29.1/NEWS    2020-10-22 09:16:46.000000000 +0200
+++ new/eventlet-0.30.2/NEWS    2021-03-03 12:41:35.000000000 +0100
@@ -1,3 +1,18 @@
+0.30.2
+======
+* greendns: patch ssl to fix RecursionError on SSLContext.options.__set__ 
https://github.com/eventlet/eventlet/issues/677
+
+0.30.1
+======
+* patcher: built-in open() did not accept kwargs 
https://github.com/eventlet/eventlet/issues/683
+
+0.30.0
+======
+* pyopenssl tsafe module was deprecated and removed in v20.0.0
+* deprecate pyevent hub
+* Deprecate CPython 2.7 and 3.4 support
+* py39: Add _at_fork_reinit method to Semaphores
+
 0.29.1
 ======
 patcher: [py27] recursion error in pytest/python2.7 installing 
register_at_fork https://github.com/eventlet/eventlet/issues/660
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/PKG-INFO new/eventlet-0.30.2/PKG-INFO
--- old/eventlet-0.29.1/PKG-INFO        2020-10-22 09:17:28.000000000 +0200
+++ new/eventlet-0.30.2/PKG-INFO        2021-03-03 12:42:28.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: eventlet
-Version: 0.29.1
+Version: 0.30.2
 Summary: Highly concurrent networking library
 Home-page: http://eventlet.net
 Author: Linden Lab
@@ -24,11 +24,11 @@
         
         Here's something you can try right on the command line::
         
-            % python
+            % python3
             >>> import eventlet
-            >>> from eventlet.green import urllib2
-            >>> gt = eventlet.spawn(urllib2.urlopen, 'http://eventlet.net')
-            >>> gt2 = eventlet.spawn(urllib2.urlopen, 'http://secondlife.com')
+            >>> from eventlet.green.urllib.request import urlopen
+            >>> gt = eventlet.spawn(urlopen, 'http://eventlet.net')
+            >>> gt2 = eventlet.spawn(urlopen, 'http://secondlife.com')
             >>> gt2.wait()
             >>> gt.wait()
         
@@ -70,10 +70,17 @@
         
         Apologies for any inconvenience.
         
+        Supported Python versions
+        =========================
+        
+        Currently CPython 2.7 and 3.4+ are supported, but **2.7 and 3.4 
support is deprecated and will be removed in the future**, only CPython 3.5+ 
support will remain.
         
         Flair
         =====
         
+        .. image:: https://img.shields.io/pypi/v/eventlet
+            :target: https://pypi.org/project/eventlet/
+        
         .. image:: https://travis-ci.org/eventlet/eventlet.svg?branch=master
             :target: https://travis-ci.org/eventlet/eventlet
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/README.rst 
new/eventlet-0.30.2/README.rst
--- old/eventlet-0.29.1/README.rst      2020-10-22 04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/README.rst      2021-02-02 10:04:54.000000000 +0100
@@ -16,11 +16,11 @@
 
 Here's something you can try right on the command line::
 
-    % python
+    % python3
     >>> import eventlet
-    >>> from eventlet.green import urllib2
-    >>> gt = eventlet.spawn(urllib2.urlopen, 'http://eventlet.net')
-    >>> gt2 = eventlet.spawn(urllib2.urlopen, 'http://secondlife.com')
+    >>> from eventlet.green.urllib.request import urlopen
+    >>> gt = eventlet.spawn(urlopen, 'http://eventlet.net')
+    >>> gt2 = eventlet.spawn(urlopen, 'http://secondlife.com')
     >>> gt2.wait()
     >>> gt.wait()
 
@@ -62,10 +62,17 @@
 
 Apologies for any inconvenience.
 
+Supported Python versions
+=========================
+
+Currently CPython 2.7 and 3.4+ are supported, but **2.7 and 3.4 support is 
deprecated and will be removed in the future**, only CPython 3.5+ support will 
remain.
 
 Flair
 =====
 
+.. image:: https://img.shields.io/pypi/v/eventlet
+    :target: https://pypi.org/project/eventlet/
+
 .. image:: https://travis-ci.org/eventlet/eventlet.svg?branch=master
     :target: https://travis-ci.org/eventlet/eventlet
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/doc/design_patterns.rst 
new/eventlet-0.30.2/doc/design_patterns.rst
--- old/eventlet-0.29.1/doc/design_patterns.rst 2020-10-20 02:39:59.000000000 
+0200
+++ new/eventlet-0.30.2/doc/design_patterns.rst 2021-02-02 10:04:54.000000000 
+0100
@@ -11,14 +11,14 @@
 The canonical client-side example is a web crawler.  This use case is given a 
list of urls and wants to retrieve their bodies for later processing.  Here is 
a very simple example::
 
     import eventlet
-    from eventlet.green import urllib2
+    from eventlet.green.urllib.request import urlopen
 
     urls = ["http://www.google.com/intl/en_ALL/images/logo.gif";,
            "https://www.python.org/static/img/python-logo.png";,
            "http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif";]
 
     def fetch(url):
-        return urllib2.urlopen(url).read()
+        return urlopen(url).read()
 
     pool = eventlet.GreenPool()
     for body in pool.imap(fetch, urls):
@@ -26,7 +26,7 @@
 
 There is a slightly more complex version of this in the :ref:`web crawler 
example <web_crawler_example>`.  Here's a tour of the interesting lines in this 
crawler.
 
-``from eventlet.green import urllib2`` is how you import a 
cooperatively-yielding version of urllib2.  It is the same in all respects to 
the standard version, except that it uses green sockets for its communication.  
This is an example of the :ref:`import-green` pattern.
+``from eventlet.green... import urlopen`` is how you import a 
cooperatively-yielding version of urllib.  It is the same in all respects to 
the standard version, except that it uses green sockets for its communication.  
This is an example of the :ref:`import-green` pattern.
 
 ``pool = eventlet.GreenPool()`` constructs a :class:`GreenPool 
<eventlet.greenpool.GreenPool>` of a thousand green threads.  Using a pool is 
good practice because it provides an upper limit on the amount of work that 
this crawler will be doing simultaneously, which comes in handy when the input 
data changes dramatically.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/doc/index.rst 
new/eventlet-0.30.2/doc/index.rst
--- old/eventlet-0.29.1/doc/index.rst   2020-10-20 02:39:59.000000000 +0200
+++ new/eventlet-0.30.2/doc/index.rst   2021-02-02 10:04:54.000000000 +0100
@@ -12,15 +12,21 @@
     ]
 
     import eventlet
-    from eventlet.green import urllib2
+    from eventlet.green.urllib.request import urlopen
 
     def fetch(url):
-        return urllib2.urlopen(url).read()
+        return urlopen(url).read()
 
     pool = eventlet.GreenPool()
     for body in pool.imap(fetch, urls):
         print("got body", len(body))
 
+Supported Python versions
+=========================
+
+Currently CPython 2.7 and 3.4+ are supported, but **2.7 and 3.4 support is 
deprecated and will be removed in the future**, only CPython 3.5+ support will 
remain.
+
+
 Contents
 =========
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/doc/ssl.rst 
new/eventlet-0.30.2/doc/ssl.rst
--- old/eventlet-0.29.1/doc/ssl.rst     2020-10-22 04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/doc/ssl.rst     2021-02-02 10:04:54.000000000 +0100
@@ -5,9 +5,9 @@
 
 In either case, the ``green`` modules handle SSL sockets transparently, just 
like their standard counterparts.  As an example, :mod:`eventlet.green.urllib2` 
can be used to fetch https urls in as non-blocking a fashion as you please::
 
-    from eventlet.green import urllib2
+    from eventlet.green.urllib.request import urlopen
     from eventlet import spawn
-    bodies = [spawn(urllib2.urlopen, url)
+    bodies = [spawn(urlopen, url)
          for url in ("https://secondlife.com","https://google.com";)]
     for b in bodies:
         print(b.wait().read())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/eventlet/__init__.py 
new/eventlet-0.30.2/eventlet/__init__.py
--- old/eventlet-0.29.1/eventlet/__init__.py    2020-10-22 09:14:16.000000000 
+0200
+++ new/eventlet-0.30.2/eventlet/__init__.py    2021-03-03 12:39:52.000000000 
+0100
@@ -1,7 +1,14 @@
 import os
+import sys
+import warnings
 
+if sys.version_info < (3, 5):
+    warnings.warn(
+        "Support for your Python version is deprecated and will be removed in 
the future",
+        DeprecationWarning,
+    )
 
-version_info = (0, 29, 1)
+version_info = (0, 30, 2)
 __version__ = '.'.join(map(str, version_info))
 # This is to make Debian packaging easier, it ignores import
 # errors of greenlet so that the packager can still at least
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/eventlet/green/OpenSSL/__init__.py 
new/eventlet-0.30.2/eventlet/green/OpenSSL/__init__.py
--- old/eventlet-0.29.1/eventlet/green/OpenSSL/__init__.py      2020-10-22 
04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/green/OpenSSL/__init__.py      2021-02-02 
10:04:54.000000000 +0100
@@ -1,4 +1,9 @@
 from . import crypto
 from . import SSL
-from . import tsafe
+try:
+    # pyopenssl tsafe module was deprecated and removed in v20.0.0
+    # https://github.com/pyca/pyopenssl/pull/913
+    from . import tsafe
+except ImportError:
+    pass
 from .version import __version__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/eventlet/green/builtin.py 
new/eventlet-0.30.2/eventlet/green/builtin.py
--- old/eventlet-0.29.1/eventlet/green/builtin.py       2020-10-22 
08:30:23.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/green/builtin.py       2021-02-02 
10:04:54.000000000 +0100
@@ -38,9 +38,9 @@
 __opening = False
 
 
-def open(*args):
+def open(*args, **kwargs):
     global __opening
-    result = __original_open(*args)
+    result = __original_open(*args, **kwargs)
     if not __opening:
         # This is incredibly ugly. 'open' is used under the hood by
         # the import process. So, ensure we don't wind up in an
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/eventlet/greenio/base.py 
new/eventlet-0.30.2/eventlet/greenio/base.py
--- old/eventlet-0.29.1/eventlet/greenio/base.py        2020-10-22 
04:46:21.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/greenio/base.py        2021-02-02 
10:04:54.000000000 +0100
@@ -454,7 +454,7 @@
 greenpipe_doc = """
     GreenPipe is a cooperative replacement for file class.
     It will cooperate on pipes. It will block on regular file.
-    Differneces from file class:
+    Differences from file class:
     - mode is r/w property. Should re r/o
     - encoding property not implemented
     - write/writelines will not raise TypeError exception when non-string data 
is written
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/eventlet/hubs/pyevent.py 
new/eventlet-0.30.2/eventlet/hubs/pyevent.py
--- old/eventlet-0.29.1/eventlet/hubs/pyevent.py        2020-10-22 
04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/hubs/pyevent.py        2021-02-02 
10:04:54.000000000 +0100
@@ -1,6 +1,7 @@
 import sys
 import traceback
 import types
+import warnings
 
 from eventlet.support import greenlets as greenlet
 import six
@@ -58,6 +59,11 @@
             lambda signalnum, frame: 
self.greenlet.parent.throw(KeyboardInterrupt))
         self.events_to_add = []
 
+        warnings.warn(
+            "ACTION REQUIRED eventlet pyevent hub is deprecated and will be 
removed soon",
+            DeprecationWarning,
+        )
+
     def dispatch(self):
         loop = event.loop
         while True:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/eventlet/semaphore.py 
new/eventlet-0.30.2/eventlet/semaphore.py
--- old/eventlet-0.29.1/eventlet/semaphore.py   2020-10-20 02:39:59.000000000 
+0200
+++ new/eventlet-0.30.2/eventlet/semaphore.py   2021-02-02 10:04:54.000000000 
+0100
@@ -39,6 +39,7 @@
         if value < 0:
             msg = 'Semaphore() expect value >= 0, actual: 
{0}'.format(repr(value))
             raise ValueError(msg)
+        self._original_value = value
         self.counter = value
         self._waiters = collections.deque()
 
@@ -51,6 +52,10 @@
         params = (self.__class__.__name__, self.counter, len(self._waiters))
         return '<%s c=%s _w[%s]>' % params
 
+    def _at_fork_reinit(self):
+        self.counter = self._original_value
+        self._waiters.clear()
+
     def locked(self):
         """Returns true if a call to acquire would block.
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/eventlet/support/greendns.py 
new/eventlet-0.30.2/eventlet/support/greendns.py
--- old/eventlet-0.29.1/eventlet/support/greendns.py    2020-10-22 
04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/support/greendns.py    2021-03-03 
12:39:36.000000000 +0100
@@ -42,6 +42,7 @@
 from eventlet.green import os
 from eventlet.green import time
 from eventlet.green import select
+from eventlet.green import ssl
 import six
 
 
@@ -55,6 +56,7 @@
         'time': time,
         'os': os,
         'socket': _socket_nodns,
+        'ssl': ssl,
     }
     return patcher.import_patched(module_name, **modules)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/eventlet.egg-info/PKG-INFO 
new/eventlet-0.30.2/eventlet.egg-info/PKG-INFO
--- old/eventlet-0.29.1/eventlet.egg-info/PKG-INFO      2020-10-22 
09:17:28.000000000 +0200
+++ new/eventlet-0.30.2/eventlet.egg-info/PKG-INFO      2021-03-03 
12:42:27.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: eventlet
-Version: 0.29.1
+Version: 0.30.2
 Summary: Highly concurrent networking library
 Home-page: http://eventlet.net
 Author: Linden Lab
@@ -24,11 +24,11 @@
         
         Here's something you can try right on the command line::
         
-            % python
+            % python3
             >>> import eventlet
-            >>> from eventlet.green import urllib2
-            >>> gt = eventlet.spawn(urllib2.urlopen, 'http://eventlet.net')
-            >>> gt2 = eventlet.spawn(urllib2.urlopen, 'http://secondlife.com')
+            >>> from eventlet.green.urllib.request import urlopen
+            >>> gt = eventlet.spawn(urlopen, 'http://eventlet.net')
+            >>> gt2 = eventlet.spawn(urlopen, 'http://secondlife.com')
             >>> gt2.wait()
             >>> gt.wait()
         
@@ -70,10 +70,17 @@
         
         Apologies for any inconvenience.
         
+        Supported Python versions
+        =========================
+        
+        Currently CPython 2.7 and 3.4+ are supported, but **2.7 and 3.4 
support is deprecated and will be removed in the future**, only CPython 3.5+ 
support will remain.
         
         Flair
         =====
         
+        .. image:: https://img.shields.io/pypi/v/eventlet
+            :target: https://pypi.org/project/eventlet/
+        
         .. image:: https://travis-ci.org/eventlet/eventlet.svg?branch=master
             :target: https://travis-ci.org/eventlet/eventlet
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/eventlet.egg-info/SOURCES.txt 
new/eventlet-0.30.2/eventlet.egg-info/SOURCES.txt
--- old/eventlet-0.29.1/eventlet.egg-info/SOURCES.txt   2020-10-22 
09:17:28.000000000 +0200
+++ new/eventlet-0.30.2/eventlet.egg-info/SOURCES.txt   2021-03-03 
12:42:27.000000000 +0100
@@ -225,6 +225,7 @@
 tests/isolated/patcher_fork_after_monkey_patch.py
 tests/isolated/patcher_import_patched_defaults.py
 tests/isolated/patcher_importlib_lock.py
+tests/isolated/patcher_open_kwargs.py
 tests/isolated/patcher_socketserver_selectors.py
 tests/isolated/patcher_threading_condition.py
 tests/isolated/patcher_threading_current.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/examples/feedscraper-testclient.py 
new/eventlet-0.30.2/examples/feedscraper-testclient.py
--- old/eventlet-0.29.1/examples/feedscraper-testclient.py      2020-10-20 
02:39:59.000000000 +0200
+++ new/eventlet-0.30.2/examples/feedscraper-testclient.py      2021-02-02 
10:04:54.000000000 +0100
@@ -1,4 +1,4 @@
-from eventlet.green import urllib2
+from eventlet.green.urllib.request import urlopen
 
 big_list_of_feeds = """
 http://blog.eventlet.net/feed/
@@ -21,5 +21,5 @@
 """
 
 url = 'http://localhost:9010/'
-result = urllib2.urlopen(url, big_list_of_feeds)
+result = urlopen(url, big_list_of_feeds)
 print(result.read())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/examples/producer_consumer.py 
new/eventlet-0.30.2/examples/producer_consumer.py
--- old/eventlet-0.29.1/examples/producer_consumer.py   2020-10-22 
04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/examples/producer_consumer.py   2021-02-02 
10:04:54.000000000 +0100
@@ -9,7 +9,7 @@
 number of "workers", so you don't have to write that tedious management code
 yourself.
 """
-from eventlet.green import urllib2
+from eventlet.green.urllib.request import urlopen
 import eventlet
 import re
 
@@ -22,7 +22,7 @@
     print("fetching", url)
     data = ''
     with eventlet.Timeout(5, False):
-        data = urllib2.urlopen(url).read()
+        data = urllib2.urlopen(url).read().decode()
     for url_match in url_regex.finditer(data):
         new_url = url_match.group(0)
         outq.put(new_url)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/examples/recursive_crawler.py 
new/eventlet-0.30.2/examples/recursive_crawler.py
--- old/eventlet-0.29.1/examples/recursive_crawler.py   2020-10-22 
04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/examples/recursive_crawler.py   2021-02-02 
10:04:54.000000000 +0100
@@ -9,7 +9,7 @@
 acts as sort of a job coordinator (and concurrency controller of
 course).
 """
-from eventlet.green import urllib2
+from eventlet.green.urllib.request import urlopen
 import eventlet
 import re
 
@@ -23,7 +23,7 @@
     print("fetching", url)
     data = ''
     with eventlet.Timeout(5, False):
-        data = urllib2.urlopen(url).read()
+        data = urlopen(url).read().decode()
     for url_match in url_regex.finditer(data):
         new_url = url_match.group(0)
         # only send requests to eventlet.net so as not to destroy the internet
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/examples/webcrawler.py 
new/eventlet-0.30.2/examples/webcrawler.py
--- old/eventlet-0.29.1/examples/webcrawler.py  2020-10-20 02:39:59.000000000 
+0200
+++ new/eventlet-0.30.2/examples/webcrawler.py  2021-02-02 10:04:54.000000000 
+0100
@@ -8,7 +8,7 @@
 requests are truly made in parallel.
 """
 import eventlet
-from eventlet.green import urllib2
+from eventlet.green.urllib.request import urlopen
 
 
 urls = [
@@ -20,7 +20,7 @@
 
 def fetch(url):
     print("opening", url)
-    body = urllib2.urlopen(url).read()
+    body = urlopen(url).read()
     print("done with", url)
     return url, body
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/eventlet-0.29.1/tests/isolated/patcher_open_kwargs.py 
new/eventlet-0.30.2/tests/isolated/patcher_open_kwargs.py
--- old/eventlet-0.29.1/tests/isolated/patcher_open_kwargs.py   1970-01-01 
01:00:00.000000000 +0100
+++ new/eventlet-0.30.2/tests/isolated/patcher_open_kwargs.py   2021-02-02 
10:04:54.000000000 +0100
@@ -0,0 +1,10 @@
+__test__ = False
+
+if __name__ == "__main__":
+    import eventlet
+    eventlet.monkey_patch(builtins=True, os=True)
+
+    with open(__file__, mode="rt", buffering=16):
+        pass
+
+    print("pass")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/tests/openssl_test.py 
new/eventlet-0.30.2/tests/openssl_test.py
--- old/eventlet-0.29.1/tests/openssl_test.py   2020-10-22 04:45:36.000000000 
+0200
+++ new/eventlet-0.30.2/tests/openssl_test.py   2021-02-02 10:04:54.000000000 
+0100
@@ -12,5 +12,4 @@
 
     import eventlet.green.OpenSSL.SSL
     import eventlet.green.OpenSSL.crypto
-    import eventlet.green.OpenSSL.tsafe
     import eventlet.green.OpenSSL.version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/tests/patcher_test.py 
new/eventlet-0.30.2/tests/patcher_test.py
--- old/eventlet-0.29.1/tests/patcher_test.py   2020-10-22 08:30:23.000000000 
+0200
+++ new/eventlet-0.30.2/tests/patcher_test.py   2021-02-02 10:04:54.000000000 
+0100
@@ -523,3 +523,7 @@
 
 def test_builtin():
     tests.run_isolated('patcher_builtin.py')
+
+
+def test_open_kwargs():
+    tests.run_isolated("patcher_open_kwargs.py")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/eventlet-0.29.1/tests/semaphore_test.py 
new/eventlet-0.30.2/tests/semaphore_test.py
--- old/eventlet-0.29.1/tests/semaphore_test.py 2020-10-20 02:39:59.000000000 
+0200
+++ new/eventlet-0.30.2/tests/semaphore_test.py 2021-02-02 10:04:54.000000000 
+0100
@@ -42,6 +42,27 @@
         sem = eventlet.Semaphore()
         self.assertRaises(ValueError, sem.acquire, blocking=False, timeout=1)
 
+    def test_reinit(self):
+        # py39+ expects locks to have a _at_fork_reinit() method; since we
+        # patch in Semaphores in eventlet.green.thread, they need it, too
+        sem = eventlet.Semaphore()
+        sem.acquire()
+        sem._at_fork_reinit()
+        self.assertEqual(sem.acquire(blocking=False), True)
+        self.assertEqual(sem.acquire(blocking=False), False)
+
+        sem = eventlet.Semaphore(0)
+        sem.release()
+        sem._at_fork_reinit()
+        self.assertEqual(sem.acquire(blocking=False), False)
+
+        sem = eventlet.Semaphore(2)
+        sem.acquire()
+        sem._at_fork_reinit()
+        self.assertEqual(sem.acquire(blocking=False), True)
+        self.assertEqual(sem.acquire(blocking=False), True)
+        self.assertEqual(sem.acquire(blocking=False), False)
+
 
 def test_semaphore_contention():
     g_mutex = eventlet.Semaphore()

Reply via email to