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

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!

@RadicalZephyr RadicalZephyr force-pushed the 22865-pty.spawn-docs branch 2 times, most recently from 3db24cc to ae9ad20 Compare February 22, 2019 10:39
Copy link
Member

@JulienPalard JulienPalard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@RadicalZephyr
Copy link
Contributor Author

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.

@vstinner
Copy link
Member

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

@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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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

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
@miss-islington
Copy link
Contributor

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

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

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 pull request May 20, 2019
…ythonGH-11980).

(cherry picked from commit 522ccef)

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

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 23:42
@RadicalZephyr
Copy link
Contributor Author

thanks @vstinner!

vstinner pushed a commit that referenced this pull request May 21, 2019
…H-11980) (GH-13455)

(cherry picked from commit 522ccef)

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

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
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants