Pyfilesystem2 Versions Save

Python's Filesystem abstraction layer

2.4.16

2 years ago

Changed

  • Make fs.zipfs._ZipExtFile use the seeking mechanism implemented in the Python standard library in Python version 3.7 and later (#527).
  • Mark fs.zipfs.ReadZipFS as a case-sensitive filesystem (#527).
  • Optimized moving files between filesystems with syspaths. (#523).
  • Fixed fs.move.move_file to clean up the copy on the destination in case of errors.
  • fs.opener.manage_fs with writeable=True will now raise a ResourceReadOnly exception if the managed filesystem is not writeable.
  • Marked filesystems wrapped with fs.wrap.WrapReadOnly as read-only.

2.4.15

2 years ago

Changed

  • Support more lenient usernames and group names in FTP servers (#507). Closes #506.

Fixed

  • Fixed MemoryFS.move and MemoryFS.movedir not updating the name of moved resources, causing MemoryFS.scandir to use the old name. (#510). Closes #509.
  • Make WrapFS.move and WrapFS.movedir use the delegate FS methods instead of fs.move functions, which was causing optimized implementation of movedir to be always skipped. (#511).

v2.4.14

2 years ago

Added

  • Added fs.copy.copy_file_if, fs.copy.copy_dir_if, and fs.copy.copy_fs_if. Closes #458.
  • Added fs.base.FS.getmodified.

Changed

  • FTP servers that do not support the MLST command now try to use the MDTM command to retrieve the last modification timestamp of a resource. Closes #456.

Fixed

  • Fixed performance bugs in fs.copy.copy_dir_if_newer. Test cases were adapted to catch those bugs in the future.
  • Fixed precision bug for timestamps in fs.OSFS.setinfo.

v2.4.13

3 years ago

Added

  • Added FTP over TLS (FTPS) support to FTPFS. Closes #437, #449.
  • PathError now supports wrapping an exception using the exc argument. Closes #453.
  • Better documentation of the writable parameter of fs.open_fs, and hint about using fs.wrap.read_only when a read-only filesystem is required. Closes #441.

Changed

  • Make FS.upload explicit about the expected error when the parent directory of the destination does not exist. Closes #445.
  • Migrate continuous integration from Travis-CI to GitHub Actions and introduce several linters again in the build steps (#448). Closes #446.
  • Stop requiring pytest to run tests, allowing any test runner supporting unittest-style test suites.
  • FSTestCases now builds the large data required for upload and download tests only once in order to reduce the total testing time.
  • MemoryFS.move and MemoryFS.movedir will now avoid copying data. Closes #452.
  • FS.removetree("/") behaviour has been standardized in all filesystems, and is expected to clear the contents of the root folder without deleting it. Closes #471.
  • FS.getbasic is now deprecated, as it is redundant with FS.getinfo, and FS.getinfo is now explicitly expected to return the basic info namespace unconditionally. Closes #469.

Fixed

  • Make FTPFile, MemoryFile and RawWrapper accept array.array arguments for the write and writelines methods, as expected by their base class io.RawIOBase.
  • Various documentation issues, including MemoryFS docstring not rendering properly.
  • Avoid creating a new connection on every call of FTPFS.upload. Closes #455.
  • WrapReadOnly.removetree not raising a ResourceReadOnly when called. Closes #468.
  • WrapCachedDir.isdir and WrapCachedDir.isfile raising a ResourceNotFound error on non-existing path (#470).
  • FTPFS not listing certain entries with sticky/SUID/SGID permissions set by Linux server (#473). Closes #451.
  • scandir iterator not being closed explicitly in OSFS.scandir, occasionally causing a ResourceWarning to be thrown. Closes #311.
  • Incomplete type annotations for the temp_fs parameter of WriteTarFS and WriteZipFS. Closes #410.

v2.4.12

3 years ago

Added

  • Missing mode attribute to _MemoryFile objects returned by MemoryFS.openbin.
  • Missing readinto method for MemoryFS and FTPFS file objects. Closes #380.
  • Added compatibility if a Windows FTP server returns file information to the LIST command with 24-hour times. Closes #438.

Changed

  • Start testing on PyPy. Due to #342 we have to treat PyPy builds specially and allow them to fail, but at least we'll be able to see if we break something aside from known issues with FTP tests.
  • Include docs in source distributions as well as the whole tests folder, ensuring conftest.py is present, fixes #364.
  • Stop patching copy with Python 3.8+ because it already uses sendfile.

Fixed

  • Fixed crash when CPython's -OO flag is used
  • Fixed error when parsing timestamps from a FTP directory served from a WindowsNT FTP Server, fixes #395.
  • Fixed documentation of Mode.to_platform_bin. Closes #382.
  • Fixed the code example in the "Testing Filesystems" section of the "Implementing Filesystems" guide. Closes #407.
  • Fixed FTPFS.openbin not implicitly opening files in binary mode like expected from openbin. Closes #406.

v2.4.11

4 years ago

[2.4.11] - 2019-09-07

Added

  • Added geturl for TarFS and ZipFS for 'fs' purpose. NoURL for 'download' purpose.
  • Added helpful root path in CreateFailed exception #340
  • Added Python 3.8 support

Fixed

  • Fixed tests leaving tmp files
  • Fixed typing issues
  • Fixed link namespace returning bytes
  • Fixed broken FSURL in windows #329
  • Fixed hidden exception at fs.close() when opening an absent zip/tar file URL #333
  • Fixed abstract class import from collections which would break on Python 3.8
  • Fixed incorrect imports of mock on Python 3
  • Removed some unused imports and unused requirements.txt file
  • Added mypy checks to Travis. Closes #332.
  • Fixed missing errno.ENOTSUP on PyPy. Closes #338.
  • Fixed bug in a decorator that would trigger an AttributeError when a class was created that implemented a deprecated method and had no docstring of its own.

Changed

  • Entire test suite has been migrated to pytest. Closes #327.
  • Style checking is now enforced using flake8; this involved some code cleanup such as removing unused imports.

v2.4.10

4 years ago

[2.4.10] - 2019-07-29

Fixed

  • Fixed broken WrapFS.movedir #322

v2.4.9

4 years ago

[2.4.9] - 2019-07-28

Fixed

  • Restored fs.path import
  • Fixed potential race condition in makedirs. Fixes #310
  • Added missing methods to WrapFS. Fixed #294

Changed

  • MemFS now immediately releases all memory it holds when close() is called, rather than when it gets garbage collected. Closes issue #308.
  • FTPFS now translates EOFError into RemoteConnectionError. Closes #292
  • Added automatic close for filesystems that go out of scope. Fixes #298

v2.4.8

4 years ago

[2.4.8] - 2019-06-12

Changed

  • geturl will return URL with user/password if needed @zmej-serow

v2.4.7

4 years ago

[2.4.7] - 2019-06-08

Added

  • Flag to OSFS to disable env var expansion