bpo-22865: Expand on documentation for the pty.spawn function by RadicalZephyr · Pull Request #11980 · python/cpython

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

@RadicalZephyr

@the-knights-who-say-ni

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

csabella

vadmium

JulienPalard

LGTM, as the _read function is:

def _read(fd):
    """Default read function."""
    return os.read(fd, 1024)

and the os.read documentation states If the end of the file referred to by fd has been reached, an empty bytes object is returned., it's consistent.

vstinner

@RadicalZephyr

I rewrote some things and included the suggestions made by @vadmium.

I also added a bunch of documentation about what happens when an EOF condition is signalled.

csabella

csabella

@vstinner

I don't know well the pty module and so is unable to review this long description. So I asked for a review at:
https://bugs.python.org/issue26228#msg336689

By the way, I'm fine with documenting bugs, but for the longer term we should maybe try to fix it ;-)

@RadicalZephyr

@vstinner oh, I'm on it 😀 #12049 I just figured it should be a separate PR. Depending on which gets merged first I'll update or delete the comments about the known bug.

vstinner

Copy link

Member

@vstinner vstinner left a comment

@RadicalZephyr

@miss-islington

Thanks @RadicalZephyr for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@miss-islington

Sorry, @RadicalZephyr and @vstinner, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 522ccef8690970fc4f78f51a3adb995f2547871a 3.7

@vstinner

RadicalZephyr added a commit to RadicalZephyr/cpython that referenced this issue

May 20, 2019
…ythonGH-11980).

(cherry picked from commit 522ccef)

Co-authored-by: Geoff Shannon <earthlingzephyr@gmail.com>

@bedevere-bot

@RadicalZephyr

vstinner added a commit that referenced this issue

May 21, 2019

@vstinner

thanks @vstinner!

Honestly, thanks to you. Your doc enhancement is really helpful, and we need more experts on some special functions like pty.spawn(). There are so many corner cases which are painful to discover by trail-and-error.