cpython icon indicating copy to clipboard operation
cpython copied to clipboard

Implement unix read_pipe.is_reading() method

Open asvetlov opened this issue 6 years ago • 7 comments

BPO 38314
Nosy @asvetlov, @1st1, @progmatic-99, @callumquick, @benedwards14
PRs
  • python/cpython#17042
  • python/cpython#17755
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2019-09-29.11:22:13.562>
    labels = ['easy', 'type-feature', '3.9', 'expert-asyncio']
    title = 'Implement unix read_pipe.is_reading() method'
    updated_at = <Date 2019-12-30.13:53:39.286>
    user = 'https://github.com/asvetlov'
    

    bugs.python.org fields:

    activity = <Date 2019-12-30.13:53:39.286>
    actor = 'callumquick'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['asyncio']
    creation = <Date 2019-09-29.11:22:13.562>
    creator = 'asvetlov'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38314
    keywords = ['patch', 'newcomer friendly']
    message_count = 7.0
    messages = ['353494', '353495', '353499', '353500', '355465', '355484', '355939']
    nosy_count = 5.0
    nosy_names = ['asvetlov', 'yselivanov', 'shubh07', 'callumquick', 'benedwards14']
    pr_nums = ['17042', '17755']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue38314'
    versions = ['Python 3.9']
    

    asvetlov avatar Sep 29 '19 11:09 asvetlov

    Sockets support it, there is no reason for missing the method in unix pipe.

    asvetlov avatar Sep 29 '19 11:09 asvetlov

    The issue is easy, basically we need the following code plus a test

        def is_reading(self):
            return not self._paused and not self._closing
    

    asvetlov avatar Sep 29 '19 11:09 asvetlov

    I would like to take this up. I am a beginner and any more instructions you want to give me.

    Nothing special. There is UnixReadPipeTransportTests test cases inside Lib/test/test_asyncio/test_unix_events.py

    This class has a bunch of tests for pause_reading() / resume_reading().

    Test(s) for is_reading() can be built in the same way.

    asvetlov avatar Sep 29 '19 13:09 asvetlov

    Shubham are you still interested in this, or are you ok with me taking it on?

    Please do.

    asvetlov avatar Oct 27 '19 17:10 asvetlov

    I've agreed with Ben that I'll look at making the necessary changes today.

    Hello, is this issue still needs to be done ? I would like to do it as my first contribution.

    The issue is easy, basically we need the following code plus a test

        def is_reading(self):
            return not self._paused and not self._closing
    

    Could anybody guide me on how to do it ?

    ggold7046 avatar Nov 16 '23 18:11 ggold7046

    is_reading has already been implemented in this pr: #17425. We can close this issue

    zhengfeihe avatar Apr 15 '24 02:04 zhengfeihe