-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Restart support in binary upload for ftplib #51094
Comments
FPT class doesn't support the rest parameter in storbinary method. |
I attached a patch. |
I'm changing the title to something clearer (I hope). |
I like this. I'd love to see a test of this, though. Pablo, do you think you could came up with a test? Thanks! |
I attached some tests. |
According to the RFC, the argument to REST can be any string of |
I think that a non-digit REST argument is an error. But I've tested some |
The patch looks good to me. 1: I'd create two new separate tests rather than appending them to 2: > self.client.retrbinary('retr', received.append, rest=str(rest)) str() should be useless here.
It shouldn't happen but in any case I woulnd't want ftplib to check for
IMHO a bad design choice. |
What I mean is that integer arguments should be accepted as well, since |
Here is a new patch. It works with both ints and strings. I'm working on a patch for py3k. |
Now that FTP_TLS has been integrated into the trunk, the patch should be ====================================================================== Traceback (most recent call last):
File "/home/antoine/cpython/__svn__/Lib/test/test_ftplib.py", line
485, in test_storbinary_rest
self.client.storbinary('stor', f, rest=r)
TypeError: storbinary() got an unexpected keyword argument 'rest' Apart from that, the patch looks ok. |
Thanks Antoine, I'm attaching both patches. Now the test isn't failing. |
The patch has been committed in r76546 and r76547. Thank you for your |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: