~sschwarzer/ftputil#68: 
Add Python 3 support

Hello! My name is Andrey, i use your module ftputil. Thanks you for this module, it great. But this module supports only Python 2.x, and i would like support Python 3.x. It will be nice, because now i don't find anyone good module for ftp work, except standart ftplib and charge module chilkat(​http://www.chilkatsoft.com/python.asp).

I saw source code ftputil, it uses only standart python modules for work, if i don't wrong. So, if you will be port ftputil on Python 3.x I would be grateful to you. Thanks.

P.S. Sorry for my bad English.

Status
RESOLVED FIXED
Submitter
ftputiluser (unverified)
Assigned to
No-one
Submitted
11 years ago
Updated
11 years ago
Labels
library

schwa (unverified) 11 years ago · edit

Hi Andrey, thanks for your report!

Actually I've been thinking about a Python 3 version of ftputil and have started to write some compatiblity code to be able to support both Python 2 and 3. I think a Python 3 adaption is doable, but will require some work (maybe even more in the unit tests than in the actual library code). I don't know yet when I'll find the time to work on the Python 3 support.

schwa (unverified) 10 years ago · edit

Update: I've been working on Python 3 support in ftputil for some time now. It's going fine, but it's a lot of work because there are so many conversions between bytes and unicode strings necessary. There will be a single ftputil distribution supporting both Python 2 and 3. I'm quite sure I'll release ftputil 3.0 this year, maybe even in the first half.

Caveats:

  • To make supporting Python 3 easier, the minimum Python version is going to be 2.6. So ftputil 2.8 will be the last version with support for Python 2.4 and 2.5.
  • Some APIs may change, also when running under Python 2. In particular, when opening a remote file in text mode for reading, read(), readlines() etc. ​will return unicode strings.

schwa (unverified) 10 years ago · edit

Update: All library and test code now works under Python 2.6+ including Python 3.x. :-) All the Python versions are supported by the same source code. I'm currently updating the documentation and hope to release an alpha version of ftputil 3.0 next month (September).

If you want to try the Python 3 support before the release, you can use the version from the Mercurial repository. See the "What's new" document for the API changes.

schwa (unverified) 10 years ago · edit

ftputil 3.0 with Python 3 support was released on 2013-11-17.

Register here or Log in to comment, or comment via email.