[issue6822] Error calling .storlines from ftplib

2013-04-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset c78dfc6ce37a by Victor Stinner in branch '3.3': Close #6822: ftplib.FTP.storlines() expects a binary file, not a text file http://hg.python.org/cpython/rev/c78dfc6ce37a New changeset 9328e2b8a397 by Victor Stinner in branch 'default': (Merge 3.3) Cl

[issue6822] Error calling .storlines from ftplib

2013-04-02 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Apparently the doc has already been changed and mentions that a binary file is necessary. The unit test is legitimate and can be committed though (Victor, you want to do it?). -- ___ Python tracker

[issue6822] Error calling .storlines from ftplib

2013-04-01 Thread Mark Lawrence
Mark Lawrence added the comment: ftplib_doc.patch is so simple I'm assuming this has slipped under the radar, so would someone like to do the honours and commit the patch please. -- nosy: +BreamoreBoy ___ Python tracker

[issue6822] Error calling .storlines from ftplib

2010-08-27 Thread STINNER Victor
STINNER Victor added the comment: pitrou> The FTP class is not supposed to guess in which charset pitrou> your data should be encoded. pitrou> (the "encoding" argument on the FTP class is meant pitrou> for protocol commands (such as file names), not for file pitrou> contents) I agree, my patc

[issue6822] Error calling .storlines from ftplib

2010-08-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > But I can tell you that I've never had another FTP program fail like > Python 3 is failing for me trying to what seems like a simple transfer > of a text file (expecting the line endings to be adjusted). Python 3 is not failing, you are just using it the wr

[issue6822] Error calling .storlines from ftplib

2010-08-24 Thread Ayman
Ayman added the comment: My other 2 cents worth. Actually that is my main issue. Things used to work in 2.x, and "suddenly" refused to work after my 3.x upgrade. I'm not saying it worked means it is correct, but the Exception being thrown does not look right. I think we should always have co

[issue6822] Error calling .storlines from ftplib

2010-08-24 Thread danonymous
danonymous added the comment: One other observation on this issue. I just 'backleveled' the python on my PC from 3.x to 2.7. My test script works fine on 2.7. - Dan -- versions: +Python 3.1, Python 3.2, Python 3.3 ___ Python tracker

[issue6822] Error calling .storlines from ftplib

2010-08-24 Thread d nazario
d nazario added the comment: There seems to be a lot of confusion on this thread. So I'll add mine and hopefully clear things up a bit.In short I think aymanhs has it right. This is what I get when trying to send a simple text file on a Windows Xp PC using python 3.x

[issue6822] Error calling .storlines from ftplib

2010-08-24 Thread d nazario
Changes by d nazario : -- versions: -Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue6822] Error calling .storlines from ftplib

2010-08-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Just my 2 cents to add that FTP ASCII mode should consists in nothing but replacing os.sep in "\r\n" before sending file data. The opposite operation must be done by the receiving peer which has to read the data from the socket and replace "\r\n" with os.se

[issue6822] Error calling .storlines from ftplib

2010-08-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I do not agree with Antoine. For binary transfer, another method is > called, and it does work fine. However, storelines would be called > for ASCII mode, in which encoding and decoding should be done by the > FTP program. ASCII mode would translate files,

[issue6822] Error calling .storlines from ftplib

2010-08-18 Thread Ayman
Ayman added the comment: I do not agree with Antoine. For binary transfer, another method is called, and it does work fine. However, storelines would be called for ASCII mode, in which encoding and decoding should be done by the FTP program. ASCII mode would translate files, so a file load

[issue6822] Error calling .storlines from ftplib

2010-08-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I agree with Antoine. Maybe it would make sense to check the file object passed to storlines() and raise an exception if mode != binary. -- ___ Python tracker _

[issue6822] Error calling .storlines from ftplib

2010-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: To me this isn't a bug, and the patch introduces incorrect behaviour. If you want to store data on an FTP server, you have to provide binary data, not text data. The FTP class is not supposed to guess in which charset your data should be encoded. (the "encod

[issue6822] Error calling .storlines from ftplib

2010-05-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Attached is a patch which fixes FTP_TLS class as well and changes the test server a little bit. Shouldn't retrlines() suffer the same issue? -- assignee: -> giampaolo.rodola nosy: +giampaolo.rodola versions: +Python 3.1, Python 3.2 -Python 3.0 Adde

[issue6822] Error calling .storlines from ftplib

2009-09-08 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file14866/ftplib.patch ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue6822] Error calling .storlines from ftplib

2009-09-08 Thread STINNER Victor
STINNER Victor added the comment: @amaury.forgeotdarc: Oops, no, it doesn't. The new patch includes a new test (for the unicode file). -- Added file: http://bugs.python.org/file14867/ftplib-2.patch ___ Python tracker

[issue6822] Error calling .storlines from ftplib

2009-09-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Does this still pass the test suite? in test_ftplib, storlines() is given a BytesIO object. -- nosy: +amaury.forgeotdarc ___ Python tracker _

[issue6822] Error calling .storlines from ftplib

2009-09-08 Thread STINNER Victor
STINNER Victor added the comment: Oh yes, FTP.storlines() fails if the file is a text file. Here is a patch. My patch encodes each line with self.encoding, which is latin1 by default. -- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file14866/ftplib.patch ___

[issue6822] Error calling .storlines from ftplib

2009-09-02 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- type: compile error -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6822] Error calling .storlines from ftplib

2009-09-02 Thread Robert DeVaughn
New submission from Robert DeVaughn : When attempting to store a file via FTP, the following error occurs. See attached code. Traceback (most recent call last): File "C:\Documents and Settings\rdevaughn\Desktop\HTTP\src\FTP_directory.py", line 14, in ftp.storlines("STOR source.txt",f)