[ftputil] [ANN] ftputil 2.1 beta

Stefan Schwarzer sschwarzer at sschwarzer.net
Tue Feb 7 00:56:49 CET 2006


Hi all :-)

I'm glad to announce ftputil 2.1b, which is the first beta of the
ftputil 2.1.x series. You can download it from
http://ftputil.sschwarzer.net/trac/wiki/Download . The
documentation is included in the archive and also available at
http://ftputil.sschwarzer.net/trac/wiki/DocumentationPreview .
Note that this is not a production release but a beta version.
Please test it thouroughly and report your findings. I'm also
thankful for input on the (in)compatibility changes; given good
arguments, I may revert or defer some of the changes. :-)

What's new?

- The directory format (Unix or DOS/Windows) is now auto-detected
  more reliably (suggestion and first test by Andrew Ittner). The
  former algorithm was based on rather simple heuristics and was
  not very dependable. Should the auto-detection in a specific
  case not work, please add a ticket[1].

  Calls of `set_directory_format` are now deprecated and should
  be removed from ftputil client code! I'll remove
  `set_directory_format` in a future version, probably 2.2.

- FTPHost objects got a method `makedirs` which constructs
  directories recursively (suggested by Justin Ezequiel).

- FTPHost objects now have a method `rmtree` (based on
  `shutil.rmtree`) for deleting a whole tree of directories and
  files on a remote server.

  In some cases, this was already possible with `remove` but
  that depended on the used FTP server.

- Because of the addition of `rmtree`, `remove` was changed to
  only delete files and links. This may break old (depending on
  your view: current) code.

- Added `FTPHost.walk`, based on `os.walk` in Python 2.3. This is
  easier to use than `FTPHost.path.walk` but internally uses
  generators and thus requires at least Python 2.2.

- The `__del__` method of file-like objects generated from
  `FTPHost` objects was removed to prevent reference cycles which
  could possibly prevent garbage collection (hint by Vojtech
  Jasny).

- The exception hierarchy was slightly changed. `TimeShiftError`
  now inherits from `InternalError`, not directly from
  `FTPError`. `ParserError` no longer inherits from `FTPOSError`
  but from `InternalError`. Though these changes have a cleaner
  semantics, they _could_ break old code. See [2] for details.

- `FTPHost.listdir` now emits a more helpful error message if the
  auto-detection of the directory parser should fail (suggestion
  by Andrew Ittner).

- `FTPHost` objects and the associated file-like objects got a
  `keep_alive` method to help preventing server timeouts. See
  the documentation for details (suggested by several people).

- Some bug fixes.

- The documentation was updated and in parts restructured (no pun
  intended regarding the used reStructuredText format ;-) ).

  In particular, I advise to use the exceptions via the
  `ftp_error` module, not via the `ftputil` package namespace.
  The latter approach is deprecated now. I intended that long ago
  but saw just recently that I hadn't updated the documentation
  accordingly.

- Anton Stepanov contributed a Russian translation of the ftputil
  2.0.3 documentation. However, the documentation has meanwhile
  changed significantly, so I haven't included the Russian
  documentation in the tar.gz archive though it's in the ftputil
  Subversion repository[3]. I have contacted Anton a week ago and
  hope he can update the documentation. In any case, you can find
  the last version I have on the Wiki[4].

You may miss things you have suggested in the past. Sorry! I
never ignore suggestions deliberately. If I haven't replied to
your problem and it's still unresolved, please add it to the issue
tracker[1].

I guess in the future there will be more frequent ftputil releases
again. :-)

Stefan

[1] http://ftputil.sschwarzer.net/trac/wiki/IssueTracker
[2] http://ftputil.sschwarzer.net/trac/changeset/489
[3] http://ftputil.sschwarzer.net/trac/browser/trunk/ftputil_ru_utf8.txt
[4] http://ftputil.sschwarzer.net/trac/wiki/RussianDocumentation



More information about the ftputil mailing list