Hello community, here is the log from the commit of package python-curio for openSUSE:Factory checked in at 2020-03-05 23:24:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-curio (Old) and /work/SRC/openSUSE:Factory/.python-curio.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-curio" Thu Mar 5 23:24:26 2020 rev:4 rq:781852 version:1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-curio/python-curio.changes 2020-02-26 15:03:45.073036129 +0100 +++ /work/SRC/openSUSE:Factory/.python-curio.new.26092/python-curio.changes 2020-03-05 23:24:33.201385854 +0100 @@ -1,0 +2,14 @@ +Thu Mar 5 12:44:25 UTC 2020 - Antonio Larrosa <alarr...@suse.com> + +- Add patch to make tests reproducible and not depend on a race condition: + * make-tests-reproducible.patch + +------------------------------------------------------------------- +Thu Mar 5 12:31:05 UTC 2020 - Ondřej Súkup <mimi...@gmail.com> + +- update to 1.1 +- drop gh_313.patch + * Fixed a very subtle edge case involving epoll() and duplicated + file descriptors on Linux + +------------------------------------------------------------------- Old: ---- curio-1.0.tar.gz gh_313.patch New: ---- curio-1.1.tar.gz make-tests-reproducible.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-curio.spec ++++++ --- /var/tmp/diff_new_pack.V1BeIf/_old 2020-03-05 23:24:34.197386401 +0100 +++ /var/tmp/diff_new_pack.V1BeIf/_new 2020-03-05 23:24:34.201386403 +0100 @@ -19,13 +19,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-curio -Version: 1.0 +Version: 1.1 Release: 0 Summary: Concurrent I/O library for Python 3 License: BSD-Source-Code URL: https://github.com/dabeaz/curio Source: https://github.com/dabeaz/curio/archive/%{version}.tar.gz#/curio-%{version}.tar.gz -Patch0: gh_313.patch +Patch0: make-tests-reproducible.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} ++++++ curio-1.0.tar.gz -> curio-1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/CHANGES new/curio-1.1/CHANGES --- old/curio-1.0/CHANGES 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/CHANGES 2020-03-01 13:27:43.000000000 +0100 @@ -1,5 +1,14 @@ CHANGES ------- +Version 1.1 - March 1, 2020 + +02/24/2020 Fixed a very subtle edge case involving epoll() and duplicated + file descriptors on Linux. The fix required a new trap + _io_release() to explitly unregister a file descriptor + before closing. This must be embedded in any close() + implementation prior to actually calling close() on a real + file object. No changes should be necessary in existing + user-level Curio code. Bug #313 reported by Ondřej Súkup. Version 1.0 - February 20, 2020 ------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/curio/__init__.py new/curio-1.1/curio/__init__.py --- old/curio-1.0/curio/__init__.py 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/curio/__init__.py 2020-03-01 13:27:43.000000000 +0100 @@ -1,6 +1,6 @@ # curio/__init__.py -__version__ = '1.0' +__version__ = '1.1' from .errors import * from .queue import * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/curio/io.py new/curio-1.1/curio/io.py --- old/curio-1.0/curio/io.py 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/curio/io.py 2020-03-01 13:27:43.000000000 +0100 @@ -36,7 +36,7 @@ # -- Curio -from .traps import _read_wait, _write_wait +from .traps import _read_wait, _write_wait, _io_release from . import errors from . import thread @@ -286,6 +286,7 @@ async def close(self): if self._socket: + await _io_release(self._fileno) self._socket.close() self._socket = None self._fileno = -1 @@ -462,6 +463,7 @@ async def close(self): await self.flush() if self._file: + await _io_release(self.fileno) self._file.close() self._file = None self._fileno = -1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/curio/kernel.py new/curio-1.1/curio/kernel.py --- old/curio-1.0/curio/kernel.py 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/curio/kernel.py 2020-03-01 13:27:43.000000000 +0100 @@ -283,6 +283,8 @@ # Reschedule a task, putting it back on the ready queue. def reschedule_task(task): + assert task not in ready + ready_append(task) task.state = 'READY' task.cancel_func = None @@ -404,6 +406,14 @@ suspend_task(state, lambda: unregister_event(fileobj, event)) # ---------------------------------------- + # Release any kernel resources associated with fileobj. + def trap_io_release(fileobj): + if current._last_io: + unregister_event(*current._last_io) + current._last_io = None + current._trap_result = None + + # ---------------------------------------- # Return tasks currently waiting on a file obj. def trap_io_waiting(fileobj): try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/curio/task.py new/curio-1.1/curio/task.py --- old/curio-1.0/curio/task.py 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/curio/task.py 2020-03-01 13:27:43.000000000 +0100 @@ -160,6 +160,7 @@ if not self.joined and not self.cancelled and not self.daemon: if not self.daemon and not self.exception: log.warning('%r never joined', self) + assert not self._last_io def send(self, value): ''' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/curio/traps.py new/curio-1.1/curio/traps.py --- old/curio-1.0/curio/traps.py 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/curio/traps.py 2020-03-01 13:27:43.000000000 +0100 @@ -13,7 +13,7 @@ '_read_wait', '_write_wait', '_future_wait', '_sleep', '_spawn', '_cancel_task', '_scheduler_wait', '_scheduler_wake', '_get_kernel', '_get_current', '_set_timeout', '_unset_timeout', - '_clock', '_io_waiting', + '_clock', '_io_waiting', '_io_release', ] # -- Standard library @@ -50,6 +50,12 @@ ''' return await _kernel_trap('trap_io', fileobj, EVENT_WRITE, 'WRITE_WAIT') +async def _io_release(fileobj): + ''' + Release kernel resources associated with a file + ''' + return await _kernel_trap('trap_io_release', fileobj) + async def _io_waiting(fileobj): ''' Return a tuple (rtask, wtask) of tasks currently blocked waiting diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/docs/conf.py new/curio-1.1/docs/conf.py --- old/curio-1.0/docs/conf.py 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/docs/conf.py 2020-03-01 13:27:43.000000000 +0100 @@ -60,9 +60,9 @@ # built documents. # # The short X.Y version. -version = '1.0' +version = '1.1' # The full version, including alpha/beta/rc tags. -release = '1.0' +release = '1.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/docs/index.rst new/curio-1.1/docs/index.rst --- old/curio-1.0/docs/index.rst 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/docs/index.rst 2020-03-01 13:27:43.000000000 +0100 @@ -49,6 +49,13 @@ async concurrency library from scratch using both callbacks and coroutines. +* `Die Threads <https://www.youtube.com/watch?v=U66KuyD3T0M>`_ + Keynote talk at EuroPython, 2018. + Asynchronous programming is most commonly described as an alternative to + thread programming. But what if you reinvented thread programming run on top + of asynchronous programming? This talk explores this concept. It + might be the most "experimental" talk related to Curio. + * `The Other Async (Threads + Asyncio = Love) <https://www.youtube.com/watch?v=x1ndXuw7S0s>`_ Keynote talk at PyGotham, 2017. This talk steps through the thinking and design of building a so-called diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/docs/reference.rst new/curio-1.1/docs/reference.rst --- old/curio-1.0/docs/reference.rst 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/docs/reference.rst 2020-03-01 13:27:43.000000000 +0100 @@ -1652,6 +1652,9 @@ * - ``await _write_wait(fileobj)`` - Sleep until data can be written on *fileobj*. *fileobj* is any file-like object with a `fileno()` method. + * - ``await _io_release(fileobj)`` + - Release any kernel resources associated with *fileobj*. Should + be called prior to closing any file. * - ``await _io_waiting(fileobj)`` - Returns a tuple `(rtask, wtask)` of tasks currently sleeping on *fileobj* (if any). Returns immediately. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/setup.py new/curio-1.1/setup.py --- old/curio-1.0/setup.py 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/setup.py 2020-03-01 13:27:43.000000000 +0100 @@ -14,7 +14,7 @@ description="Curio", long_description=long_description, license="BSD", - version="1.0", + version="1.1", author="David Beazley", author_email="d...@dabeaz.com", maintainer="David Beazley", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curio-1.0/tests/test_socket.py new/curio-1.1/tests/test_socket.py --- old/curio-1.0/tests/test_socket.py 2020-02-21 00:16:25.000000000 +0100 +++ new/curio-1.1/tests/test_socket.py 2020-03-01 13:27:43.000000000 +0100 @@ -172,7 +172,7 @@ ] @pytest.mark.skipif(sys.platform.startswith("win"), - reason='not supported on Windows') + reason='currently broken') def test_fromfd_tcp_echo(kernel, portno): results = [] @@ -601,6 +601,8 @@ kernel.run(main) # Smoke test on various socket functions +@pytest.mark.skipif(True, + reason='unreliable') def test_socket_funcs(kernel): async def main(): r = await getaddrinfo('', 80) @@ -611,3 +613,4 @@ r = await gethostbyaddr('127.0.0.1') r = await getnameinfo(('127.0.0.1', 80), NI_NUMERICHOST) kernel.run(main) + ++++++ make-tests-reproducible.patch ++++++ Index: curio-1.1/tests/test_sync.py =================================================================== --- curio-1.1.orig/tests/test_sync.py +++ curio-1.1/tests/test_sync.py @@ -17,7 +17,6 @@ class TestEvent: def test_event_get_wait(self, kernel): results = [] async def event_setter(evt, seconds): - results.append('sleep') await sleep(seconds) results.append('event_set') await evt.set() @@ -42,7 +41,6 @@ class TestEvent: assert results == [ 'wait_start', False, - 'sleep', 'event_set', 'wait_done', True, @@ -699,7 +697,6 @@ class TestUniversalEvent: def test_uevent_get_wait(self, kernel): results = [] async def event_setter(evt, seconds): - results.append('sleep') await sleep(seconds) results.append('event_set') await evt.set() @@ -724,7 +721,6 @@ class TestUniversalEvent: assert results == [ 'wait_start', False, - 'sleep', 'event_set', 'wait_done', True, @@ -771,7 +767,6 @@ class TestUniversalEvent: def test_uevent_get_asyncio_set(self, kernel): results = [] async def event_setter(evt, seconds): - results.append('sleep') await asyncio.sleep(seconds) results.append('event_set') await evt.set() @@ -797,7 +792,6 @@ class TestUniversalEvent: assert results == [ 'wait_start', False, - 'sleep', 'event_set', 'wait_done', True,