Releases: drivendataorg/cloudpathlib
Releases · drivendataorg/cloudpathlib
v0.20.0
- Added support for custom schemes in CloudPath and Client subclases. (Issue #466, PR #467)
- Fixed
ResourceNotFoundError
on Azure gen2 storage accounts with HNS enabled and issue that some Azure credentials do not haveaccount_name
. (Issue #470, Issue #476, PR #478) - Added support for Python 3.13 (Issue #472, PR #474):
.full_match
added.from_uri
addedfollow_symlinks
kwarg added tois_file
added as no-opfollow_symlinks
kwarg added tois_dir
added as no-opnewline
kwarg added toread_text
recurse_symlinks
kwarg added toglob
added as no-oppattern
parameter forglob
can be PathLikerecurse_symlinks
kwarg added torglob
added as no-oppattern
parameter forrglob
can be PathLike.parser
property added
v0.19.0
- 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 variableCLOUPATHLIB_FILE_CACHE_MODE
instead ofCLOUDPATHLIB_FILE_CACHE_MODE
. (PR #424, thanks to @mynameisfiber) - Fixed
CloudPath
cleanup viaCloudPath.__del__
whenClient
encounters an exception during initialization and does not create afile_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 nativeexists()
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
andCLOUDPATHLIB_FORCE_OVERWRITE_TO_CLOUD
. (Issue #393, PR #437) - Fixed
glob
forcloudpathlib.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 theget_default_storage_dir
rather than having an explicit reference to the path set at instantiation. This means that callingget_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 wherereset_local_storage
did not reset local storage when using the default client. (Issue #414) - Added a new
local_storage_dir
property toLocalClient
. This will return the current local storage directory used by that client instance.
by reference through the `get_default_ rather than with an explicit.
- Changed
- Refined the return type annotations for
CloudPath.open()
to match the behavior ofpathlib.Path.open()
. The method now returns specific types (TextIOWrapper
,FileIO
,BufferedRandom
,BufferedWriter
,BufferedReader
,BinaryIO
,IO[Any]
) based on the providedmode
,buffering
, andencoding
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
v0.18.0 (yanked)
- 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 forAnyPath
. (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
v0.16.0
- 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 thewrite_text
method to align topathlib
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
v0.15.0
- 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 ifis_valid_cloudpath
is called (PR #337) - Added
follow_symlinks
tostat
for 3.11.4 compatibility (see bpo 39906) - Add
follow_symlinks
tois_dir
implementation for CPythonglob
compatibility (see CPython PR #104512)
v0.14.0
- Changed to pyproject.toml-based build.
- Changed type hints from custom type variable
DerivedCloudPath
totyping.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)