Skip to content

Releases: drivendataorg/cloudpathlib

v0.19.0

29 Aug 17:39
40e205d
Compare
Choose a tag to compare
  • Fixed an error that occurred when loading and dumping CloudPath objects using pickle multiple times. (Issue #450, PR #454, thanks to @kujenga)
  • Fixed typo in FileCacheMode where values were being filled by environment variable CLOUPATHLIB_FILE_CACHE_MODE instead of CLOUDPATHLIB_FILE_CACHE_MODE. (PR #424, thanks to @mynameisfiber)
  • Fixed CloudPath cleanup via CloudPath.__del__ when Client encounters an exception during initialization and does not create a file_cache_mode attribute. (Issue #372, thanks to @bryanwweber)
  • Removed support for Python 3.7 and pinned minimal boto3 version to Python 3.8+ versions. (PR #407)
  • Changed GSClient to use the native exists() method from the Google Cloud Storage SDK. (PR #420, thanks to @bachya)
  • Changed default clients to be lazily instantiated (Issue #428, PR #432)
  • Fixed download_to to check for the existence of the cloud file (Issue #430, PR #433)
  • Added env vars CLOUDPATHLIB_FORCE_OVERWRITE_FROM_CLOUD and CLOUDPATHLIB_FORCE_OVERWRITE_TO_CLOUD. (Issue #393, PR #437)
  • Fixed glob for cloudpathlib.local.LocalPath and subclass implementations to match behavior of cloud versions for parity in testing. (Issue #415, PR #436)
  • Changed how cloudpathlib.local.LocalClient and subclass implementations track the default local storage directory (used to simulate the cloud) used when no local storage directory is explicitly provided. (PR #436, PR #462)
    • Changed LocalClient so that client instances using the default storage access the default local storage directory through the get_default_storage_dir rather than having an explicit reference to the path set at instantiation. This means that calling get_default_storage_dir will reset the local storage for all clients using the default local storage, whether the client has already been instantiated or is instantiated after resetting. This fixes unintuitive behavior where reset_local_storage did not reset local storage when using the default client. (Issue #414)
    • Added a new local_storage_dir property to LocalClient. This will return the current local storage directory used by that client instance.
      by reference through the `get_default_ rather than with an explicit.
  • Refined the return type annotations for CloudPath.open() to match the behavior of pathlib.Path.open(). The method now returns specific types (TextIOWrapper, FileIO, BufferedRandom, BufferedWriter, BufferedReader, BinaryIO, IO[Any]) based on the provided mode, buffering, and encoding arguments. (Issue #465, PR #464)
  • Added Azure Data Lake Storage Gen2 support (Issue #161, PR #450), thanks to @M0dEx for PR #447 and PR #449

v0.18.1

26 Feb 22:57
29a147a
Compare
Choose a tag to compare
  • Fixed import error due to incompatible google-cloud-storage by not using transfer_manager if it is not available. (Issue #408, PR #410)

Includes all changes from v0.18.0.

Note: This is the last planned Python 3.7 compatible release version.

v0.18.0 (yanked)

26 Feb 02:35
6d13512
Compare
Choose a tag to compare
  • Implement sliced downloads in GSClient. (Issue #387, PR #389)
  • Implement as_url with presigned parameter for all backends. (Issue #235, PR #236)
  • Stream to and from Azure Blob Storage. (PR #403)
  • Implement file: URI scheme support for AnyPath. (Issue #401, PR #404)

Note: This version was yanked due to incompatibility with google-cloud-storage <2.7.0 that causes an import error.

v0.17.0

21 Dec 22:58
17039b9
Compare
Choose a tag to compare
  • Fix S3Client cleanup via Client.__del__ when S3Client encounters an exception during initialization. (Issue #372, PR #373, thanks to @bryanwweber)
  • Skip mtime checks during upload when force_overwrite_to_cloud is set to improve upload performance. (Issue #379, PR #380, thanks to @Gilthans)

v0.16.0

10 Oct 00:34
Compare
Choose a tag to compare
  • Add "CloudPath" as return type on __init__ for mypy issues. (Issue #179, PR #342)
  • Add with_stem to all path types when python version supports it (>=3.9). (Issue #287, PR #290, thanks to @Gilthans)
  • Add newline parameter to the write_text method to align to pathlib functionality as of Python 3.10. PR #362, thanks to @pricemg.
  • Add support for Python 3.12 (PR #364)
  • Add CLOUDPATHLIB_LOCAL_CACHE_DIR env var for setting local_cache_dir default for clients (Issue #352, PR #357)
  • Add CONTRIBUTING.md instructions for contributors (Issue #213, PR #367)

v0.15.1

12 Jul 17:46
6b4afe9
Compare
Choose a tag to compare
  • Compatibility with pydantic >= 2.0.0. (PR #349)

v0.15.0

16 Jun 19:16
2a3d712
Compare
Choose a tag to compare
  • Changed return type for CloudPathMeta.__call__ to fix problems with pyright/pylance (PR #330)
  • Make CloudPath.is_valid_cloudpath a TypeGuard so that type checkers can know the subclass if is_valid_cloudpath is called (PR #337)
  • Added follow_symlinks to stat for 3.11.4 compatibility (see bpo 39906)
  • Add follow_symlinks to is_dir implementation for CPython glob compatibility (see CPython PR #104512)

v0.14.0

14 May 03:27
Compare
Choose a tag to compare
  • Changed to pyproject.toml-based build.
  • Changed type hints from custom type variable DerivedCloudPath to typing.Self (PEP 673). This adds a dependency on the typing-extensions backport package from Python versions lower than 3.11.
  • Fixed a runtime key error when an S3 object does not have the Content-Type metadata set. (Issue #331, PR #332)

v0.13.0

16 Feb 02:23
Compare
Choose a tag to compare
  • Implement file_cache_modes to give users finer-grained control over when and how the cache is cleared. (Issue #10, PR #314)
  • Speed up listing directories for Google Cloud Storage. (PR #318)
  • Add compatibility for Python 3.11 (PR #317)

v0.12.1

05 Jan 05:44
caeeb50
Compare
Choose a tag to compare
  • Fix glob logic for buckets; add regression test; add error on globbing all buckets (Issue #311, PR #312)