Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654382 - sys-apps/portage: migrate to asyncio.AbstractEventLoop add_reader and add_writer methods
Summary: sys-apps/portage: migrate to asyncio.AbstractEventLoop add_reader and add_wri...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 591760 651804
  Show dependency tree
 
Reported: 2018-04-29 22:44 UTC by Zac Medico
Modified: 2018-07-02 18:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2018-04-29 22:44:01 UTC
Consumers of the EventLoop.io_add_watch method need to be migrated to use the asyncio.AbstractEventLoop add_reader and add_writer methods.
Comment 1 Larry the Git Cow gentoo-dev 2018-04-30 02:17:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=c77afbc31fa687cc612a6f946b324bf4d74d8175

commit c77afbc31fa687cc612a6f946b324bf4d74d8175
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-30 01:49:18 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-30 02:14:41 +0000

    EventLoop: call add_reader/writer callbacks after pipe is closed (bug 654382)
    
    Callbacks registered via add_reader/writer methods need to be called
    when the other end of a pipe is closed, which does not result in a
    normal read or write event. Therefore, respond to other event types
    as well, for compatibility with the asyncio event loop implementation.
    
    The included unit tests demonstrate asyncio compatible behavior for
    both reader and writer callbacks.
    
    Bug: https://bugs.gentoo.org/654382

 .../tests/util/futures/asyncio/test_pipe_closed.py | 133 +++++++++++++++++++++
 pym/portage/util/_eventloop/EventLoop.py           |   7 +-
 2 files changed, 138 insertions(+), 2 deletions(-)}
Comment 2 Larry the Git Cow gentoo-dev 2018-04-30 06:29:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=c11a6ec05f02601a7c2cb5455d1289b9dfed5f10

commit c11a6ec05f02601a7c2cb5455d1289b9dfed5f10
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-30 06:06:56 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-30 06:24:15 +0000

    AbstractPollTask: add_reader asyncio compat (bug 654382)
    
    Migration to add_reader is now complete, so remove unused code related
    to io_add_watch (and source_remove).
    
    Bug: https://bugs.gentoo.org/654382

 pym/_emerge/AbstractEbuildProcess.py          |  5 -----
 pym/_emerge/AbstractPollTask.py               | 29 +++++----------------------
 pym/_emerge/PipeReader.py                     |  2 +-
 pym/_emerge/SubProcess.py                     | 22 +-------------------
 pym/portage/util/_async/SchedulerInterface.py |  6 +-----
 5 files changed, 8 insertions(+), 56 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=2495fe6ff060e2ed8ee54e08a4dec132de1f4984

commit 2495fe6ff060e2ed8ee54e08a4dec132de1f4984
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-30 05:52:07 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-30 06:20:01 +0000

    PipeLogger: add_reader asyncio compat (bug 654382)
    
    Use add_reader for asyncio compatibility.
    
    Bug: https://bugs.gentoo.org/654382

 pym/portage/util/_async/PipeLogger.py | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=41af82685d688cb03da743cdd03295271a3ef09c

commit 41af82685d688cb03da743cdd03295271a3ef09c
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-30 05:45:13 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-30 06:20:01 +0000

    _MergeProcess: add_reader asyncio compat (bug 654382)
    
    Use add_reader for asyncio compatibility.
    
    Bug: https://bugs.gentoo.org/654382

 pym/portage/dbapi/_MergeProcess.py | 27 +++++++--------------------
 1 file changed, 7 insertions(+), 20 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=31094342b2c55ecdf249e0b4a1df22d391f7fc1e

commit 31094342b2c55ecdf249e0b4a1df22d391f7fc1e
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-30 05:34:07 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-30 06:20:01 +0000

    PipeReader: add_reader asyncio compat (bug 654382)
    
    Use add_reader for asyncio compatibility.
    
    Bug: https://bugs.gentoo.org/654382

 pym/_emerge/PipeReader.py | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=c06c7e50244292e263e5512f7baefc16bbe85456

commit c06c7e50244292e263e5512f7baefc16bbe85456
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-30 04:05:22 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-30 06:20:01 +0000

    EbuildIpcDaemon: add_reader asyncio compat (bug 654382)
    
    Use add_reader for asyncio compatibility.
    
    Bug: https://bugs.gentoo.org/654382

 pym/_emerge/EbuildIpcDaemon.py | 28 +++++++---------------------
 pym/_emerge/FifoIpcDaemon.py   | 20 ++++++++------------
 2 files changed, 15 insertions(+), 33 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=e1145930e94db753e29330a54e24b0814bd6c80c

commit e1145930e94db753e29330a54e24b0814bd6c80c
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-30 03:22:46 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-30 06:20:01 +0000

    EbuildMetadataPhase: add_reader asyncio compat (bug 654382)
    
    Use add_reader for asyncio compatibility.
    
    Bug: https://bugs.gentoo.org/654382

 pym/_emerge/EbuildMetadataPhase.py | 31 ++++++++++++-------------------
 1 file changed, 12 insertions(+), 19 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=dfbb97f20ad7cc537f73c204eb740f8e376e27bb

commit dfbb97f20ad7cc537f73c204eb740f8e376e27bb
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-30 02:55:14 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-30 06:13:25 +0000

    _LockProcess: add_reader asyncio compat (bug 654382)
    
    Use add_reader for asyncio compatibility.
    
    Bug: https://bugs.gentoo.org/654382

 pym/_emerge/AsynchronousLock.py | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=452018c1fbf76cf097dbee1a9bb22a8b97958014

commit 452018c1fbf76cf097dbee1a9bb22a8b97958014
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-30 02:30:29 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-30 06:11:32 +0000

    FifoWriter: add_writer asyncio compat (bug 654382)
    
    Use add_writer for asyncio compatibility.
    
    Bug: https://bugs.gentoo.org/654382

 bin/ebuild-ipc.py | 44 +++++++++++++++++++-------------------------
 1 file changed, 19 insertions(+), 25 deletions(-)}
Comment 3 Zac Medico gentoo-dev 2018-07-02 18:53:31 UTC
Fixed in portage-2.3.40-r1.