Return-Path: X-Original-To: ftputil@lists.sschwarzer.net Delivered-To: ftputil@lists.sschwarzer.net Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by vserver.sschwarzer.com (Postfix) with ESMTP id EB6FD166BE7 for ; Wed, 17 Feb 2021 20:34:47 +0100 (CET) Received: from [192.168.19.128] ([85.212.43.128]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mv3M8-1m3KCN26Vs-00qxLM; Wed, 17 Feb 2021 20:34:47 +0100 To: ftputil@lists.sschwarzer.net From: Stefan Schwarzer Message-ID: Date: Wed, 17 Feb 2021 20:34:47 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.24) Gecko/20100411 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:s3FWUExKp0gGzMm/UJbKsoS9r30yBBF2nQpgbGyeIoxZ+w968nc ipTBpV50ZbKsizxeLIZafjCPxufrgoz5E+uHTVwCOWk4TiER1qqFFN4PcBgiX1tCBu2ohBg lD2HIlD07KUfq6Zdj7EoesRcRyIcNfzyepjQS+csTdQHRybcHgqDnVZTfgySvODww1d0B4j 4ftuC/ykxXmTbF2m2KRWw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:frkbdIwAJmw=:KJErxavTQaRW6Ne+/FYn+d O1WCM/c3e1tr8QLUd3pGgpTTrW+TgHuQ25GcpJWv3TWYkPTaODZ7pKOGrVsqibjmXXyvTsanB LylOG+ZbMrDANhEr4ilCgGzIKrhK8sBXaYXi2yGXqzqJRtVwrsJFGI72dh5DVqOEY4t4Uhey/ O0912oBLF5C0QiOEMzE0JkgzvGe3slEYXyVZlwf35VSiwNiktR4lXLtXRI8zltsKf7uJoySOE QWPalP+HUXmsJ0DDYOh1xTQY2tHZQ4mvBVZpGL6w1bZYYqmsYjLMK7y+dT4lQScRDN0+AuF6y fqrXX10DgTL2m3yiDG9uot42+oa+5f/tnOMH+OcxHm+nkAn6WSsKNv+8XPft3r3f8jX4uVteQ o291GwySFVxwJQvjx3d0Jb4Cl378nlRYrENxMk2P2a4K+IK5aJvieRrN5TaRJ0hUUtE9TDKgd mK1vJVZrRQ== Subject: [ftputil] ftputil 5.0.0 released X-BeenThere: ftputil@lists.sschwarzer.net X-Mailman-Version: 2.1.23 Precedence: list List-Id: High-level FTP client library for Python List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 19:34:48 -0000 ftputil 5.0.0 is now available from https://ftputil.sschwarzer.net/download . Changes since the last stable release 4.0.0 ------------------------------------------- Backward-incompatible changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This ftputil version isn't fully backward-compatible with the previous version due to changes in the `ftplib` module in the standard library of Python 3.9 [1]. That said, if you only deal with directory and file paths which solely consist of ASCII characters, this change doesn't affect you. Here are some details. You can find more in the ftputil documentation [2] and in ticket #143 [3]. Internally, ftputil uses `ftplib.FTP` or compatible classes to perform most low-level FTP operations. In Python 3.8 and before, the default encoding for FTP paths was latin-1, but there was no official documentation on using a different encoding. In Python 3.9, the default encoding changed to UTF-8 and the encoding is configurable with an `ftplib.FTP` constructor argument. The documentation of ftputil 4.0.0 and earlier stated: - ftputil uses latin-1 encoding for paths - ftputil uses `ftplib.FTP` as the default session factory With the change of the default encoding in Python 3.9 these two statements are contradictory. To resolve the conflict, the new behavior of ftputil is: - ftputil uses `ftplib.FTP` as default session factory, but explicitly sets the path encoding to latin-1 (regardless of the Python version). This is the same behavior as in ftputil 4.0.0 or earlier if running under Python 3.8 or earlier. - If client code uses a custom session factory (i. e. the `session_factory` argument of the `FTPHost` constructor), ftputil will take the path encoding to use for `bytes` paths from the `encoding` attribute of an FTP session from this factory. If there's no such attribute, an exception is raised. Other changes ~~~~~~~~~~~~~ `ftputil.session.session_factory` got a new keyword argument `encoding` to set the path encoding of the sessions created by the factory. If the argument isn't specified, the path encoding will be taken from the `base_class` argument. (This means that the encoding will be different for `ftplib.FTP` in Python 3.8 or earlier vs. Python 3.9 or later.) What is ftputil? ---------------- ftputil is a high-level FTP client library for the Python programming language. ftputil implements a virtual file system for accessing FTP servers, that is, it can generate file-like objects for remote files. The library supports many functions similar to those in the `os`, `os.path` and `shutil` modules. ftputil has convenience functions for conditional uploads and downloads, and handles FTP clients and servers in different timezones. See the documentation for details: https://ftputil.sschwarzer.net/trac/wiki/Documentation License ------- ftputil is open source software, released under the 3-clause BSD license (see https://opensource.org/licenses/BSD-3-Clause ). [1] https://docs.python.org/3/whatsnew/3.9.html#changes-in-the-python-api "The encoding parameter has been added to the classes ftplib.FTP and ftplib.FTP_TLS as a keyword-only parameter, and the default encoding is changed from Latin-1 to UTF-8 to follow RFC 2640." [2] https://ftputil.sschwarzer.net/trac/wiki/Documentation [3] https://ftputil.sschwarzer.net/trac/ticket/143 Stefan