Releases: drivendataorg/cloudpathlib
Releases · drivendataorg/cloudpathlib
v0.23.0
- Added support for Python 3.14 (Issue #529, PR #530)
- Changed
CloudPath.copyto have the first parameter namedtargetinstead ofdestinationand added newfollow_symlinksandpreserve_metadatakwargs. Breaking change for users that relied on the first parameter being nameddestinationinstead oftarget. - Added
CloudPath.copy_intoto copy a file or directory into another file or directory. - Added
CloudPath.moveto move a file or directory to another location. - Added
CloudPath.move_intoto move a file or directory into another file or directory. - Added
CloudPathInfoandCloudPath.infoto get information about a file or directory. - Added additional no-op kwargs to
mkdir,touch,glob,rglob,statto match pathlib.
- Changed
v0.22.0
- Fixed issue with GS credentials, using default auth enables a wider set of authentication methods in GS (Issue #390, PR #514, thanks @ljyanesm)
- Added support for http(s) urls with
HttpClient,HttpPath,HttpsClient, andHttpsPath. (Issue #455, PR #468) - Added experimental support for patching the builtins
open,os,os.path, andglobto work withCloudPathobjects. It is off by default; see the new "Compatibility" section in the docs for more information. (Issue #128, PR #322) - Added support for
CloudPath(*parts)to create aCloudPathobject from a list of parts (to matchpathlib.Path). This is a potentially breaking change for users that relied on the second arg being theclientinstead of making it an explicit kwarg. (PR #322)
v0.21.1
v0.21.0
- Removed support for deprecated env var that had a typo (
CLOUPATHLIB_FILE_CACHE_MODE; you should useCLOUDPATHLIB_FILE_CACHE_MODE). - Added support for
timeoutandretrykwargs forGSClient. (Issue #484, PR #485, thanks @Mchristos) - Fixed
CloudPath(...) / otherto correctly attempt to fall back onother's__rtruediv__implementation, in order to support classes that explicitly support the/with aCloudPathinstance. Previously, this would always raise aTypeErrorifotherwere not astrorPurePosixPath. (PR #479) - Added
md5property toGSPath, updated LocalGSPath to includemd5property, updated mock_gs.MockBlob to includemd5_hashproperty. (Issue #482, PR #483) - Fixed an uncaught exception on Azure Gen2 storage accounts with HNS enabled when used with
DefaultAzureCredential. (Issue #486, PR #487) - Removed support for Python 3.8, which was EOL in October 2024. (PR #502)
v0.20.0
- Added support for custom schemes in CloudPath and Client subclases. (Issue #466, PR #467)
- Fixed
ResourceNotFoundErroron 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_matchadded.from_uriaddedfollow_symlinkskwarg added tois_fileadded as no-opfollow_symlinkskwarg added tois_diradded as no-opnewlinekwarg added toread_textrecurse_symlinkskwarg added toglobadded as no-oppatternparameter forglobcan be PathLikerecurse_symlinkskwarg added torglobadded as no-oppatternparameter forrglobcan be PathLike.parserproperty added
v0.19.0
- Fixed an error that occurred when loading and dumping
CloudPathobjects using pickle multiple times. (Issue #450, PR #454, thanks to @kujenga) - Fixed typo in
FileCacheModewhere values were being filled by environment variableCLOUPATHLIB_FILE_CACHE_MODEinstead ofCLOUDPATHLIB_FILE_CACHE_MODE. (PR #424, thanks to @mynameisfiber) - Fixed
CloudPathcleanup viaCloudPath.__del__whenClientencounters an exception during initialization and does not create afile_cache_modeattribute. (Issue #372, thanks to @bryanwweber) - Removed support for Python 3.7 and pinned minimal
boto3version to Python 3.8+ versions. (PR #407) - Changed
GSClientto 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_toto check for the existence of the cloud file (Issue #430, PR #433) - Added env vars
CLOUDPATHLIB_FORCE_OVERWRITE_FROM_CLOUDandCLOUDPATHLIB_FORCE_OVERWRITE_TO_CLOUD. (Issue #393, PR #437) - Fixed
globforcloudpathlib.local.LocalPathand subclass implementations to match behavior of cloud versions for parity in testing. (Issue #415, PR #436) - Changed how
cloudpathlib.local.LocalClientand 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
LocalClientso that client instances using the default storage access the default local storage directory through theget_default_storage_dirrather than having an explicit reference to the path set at instantiation. This means that callingget_default_storage_dirwill 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_storagedid not reset local storage when using the default client. (Issue #414) - Added a new
local_storage_dirproperty 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, andencodingarguments. (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_urlwith 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_stemto all path types when python version supports it (>=3.9). (Issue #287, PR #290, thanks to @Gilthans) - Add
newlineparameter to thewrite_textmethod to align topathlibfunctionality as of Python 3.10. PR #362, thanks to @pricemg. - Add support for Python 3.12 (PR #364)
- Add
CLOUDPATHLIB_LOCAL_CACHE_DIRenv var for setting local_cache_dir default for clients (Issue #352, PR #357) - Add
CONTRIBUTING.mdinstructions for contributors (Issue #213, PR #367)