-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
gh-97590: Update docs and tests for ftplib.FTP.voidcmd
#96825
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
gh-97590: Update docs and tests for ftplib.FTP.voidcmd
#96825
Conversation
I just noticed there are no tests asserting on the value returned from
Should there be? EDIT: updated the tests and squashed into the commit. |
069b067
to
516686c
Compare
ftplib.FTP.voidcmd
ftplib.FTP.voidcmd
ftplib.FTP.voidcmd
ftplib.FTP.voidcmd
516686c
to
5afd959
Compare
Since 2f3941d this function returns the response string, rather than nothing. Update the docs to reflect this. Also update tests to assert on the return value from this function. Quick demonstration: >>> ftp = FTP('ftp.us.debian.org') >>> ftp.login() '230 Login successful.' >>> ftp.voidcmd("MDTM welcome.msg") '213 20150513002340' See also typeshed[1]. This fixes pythongh-97590 [1] https://github.com/python/typeshed/blob/3ec7b1f2bb5fb87314623c6237b1ea508d98c0a6/stdlib/ftplib.pyi#L83
5afd959
to
232b88d
Compare
ftplib.FTP.voidcmd
ftplib.FTP.voidcmd
Thanks @matthewhughes934 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…nGH-96825) Since 2f3941d this function returns the response string, rather than nothing. (cherry picked from commit e88ebc1) Co-authored-by: Matthew Hughes <34972397+matthewhughes934@users.noreply.github.com>
GH-115601 is a backport of this pull request to the 3.12 branch. |
…nGH-96825) Since 2f3941d this function returns the response string, rather than nothing. (cherry picked from commit e88ebc1) Co-authored-by: Matthew Hughes <34972397+matthewhughes934@users.noreply.github.com>
GH-115602 is a backport of this pull request to the 3.11 branch. |
Thanks @serhiy-storchaka, I completely forgot about this! |
…nGH-96825) Since 2f3941d this function returns the response string, rather than nothing.
…nGH-96825) Since 2f3941d this function returns the response string, rather than nothing.
…nGH-96825) Since 2f3941d this function returns the response string, rather than nothing.
Since 2f3941d this function returns the
response string, rather than nothing. Update the docs to reflect this.
Also update tests to assert on the return value from this function.
Quick demonstration:
See also typeshed[1]. This fixes gh-97590
[1] https://github.com/python/typeshed/blob/3ec7b1f2bb5fb87314623c6237b1ea508d98c0a6/stdlib/ftplib.pyi#L83
ftplib.FTP.voidcmd
incorrectly document the return value #97590