Skip to content
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

bpo-22865: Expand on documentation for the pty.spawn function #11980

Merged
merged 7 commits into from May 20, 2019

Conversation

@RadicalZephyr
Copy link
Contributor

@RadicalZephyr RadicalZephyr commented Feb 21, 2019

Documentation enhancements for the pyt.spawn function as discussed in issue 22865.

https://bugs.python.org/issue22865

@the-knights-who-say-ni
Copy link

@the-knights-who-say-ni the-knights-who-say-ni commented Feb 21, 2019

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!

Doc/library/pty.rst Outdated Show resolved Hide resolved
Doc/library/pty.rst Outdated Show resolved Hide resolved
Doc/library/pty.rst Outdated Show resolved Hide resolved
@RadicalZephyr RadicalZephyr force-pushed the 22865-pty.spawn-docs branch 2 times, most recently from 3db24cc to ae9ad20 Feb 22, 2019
Copy link
Member

@JulienPalard JulienPalard left a comment

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.

Doc/library/pty.rst Outdated Show resolved Hide resolved
@RadicalZephyr
Copy link
Contributor Author

@RadicalZephyr RadicalZephyr commented Feb 26, 2019

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.

Doc/library/pty.rst Outdated Show resolved Hide resolved
Doc/library/pty.rst Outdated Show resolved Hide resolved
@vstinner
Copy link
Member

@vstinner vstinner commented Feb 26, 2019

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
Copy link
Contributor Author

@RadicalZephyr RadicalZephyr commented Feb 26, 2019

@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.

Copy link
Member

@vstinner vstinner left a comment

LGTM.

@RadicalZephyr RadicalZephyr force-pushed the 22865-pty.spawn-docs branch from c6ba002 to 3f67273 May 19, 2019
@RadicalZephyr
Copy link
Contributor Author

@RadicalZephyr RadicalZephyr commented May 19, 2019

Is there anything I can do to help move this forward again? @vstinner @csabella @JulienPalard

@vstinner vstinner merged commit 522ccef into python:master May 20, 2019
5 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 20, 2019

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

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 20, 2019

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
Copy link
Member

@vstinner vstinner commented May 20, 2019

Is there anything I can do to help move this forward again? @vstinner @csabella @JulienPalard

Honestly, I'm far from an expert of PTY. I trust you, so I just merged your PR :-D

Sorry, @RadicalZephyr and @vstinner, I could not cleanly backport this to 3.7 due to a conflict.

Can you please try to backport the change to 3.7? If not, I just close https://bugs.python.org/issue22865

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
Copy link

@bedevere-bot bedevere-bot commented May 20, 2019

GH-13455 is a backport of this pull request to the 3.7 branch.

@RadicalZephyr RadicalZephyr deleted the 22865-pty.spawn-docs branch May 20, 2019
@RadicalZephyr
Copy link
Contributor Author

@RadicalZephyr RadicalZephyr commented May 21, 2019

thanks @vstinner!

vstinner added a commit that referenced this issue May 21, 2019
…H-11980) (GH-13455)

(cherry picked from commit 522ccef)

Co-authored-by: Geoff Shannon <earthlingzephyr@gmail.com>
@vstinner
Copy link
Member

@vstinner vstinner commented May 21, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment