Skip to content

Commit

Permalink
Prep for v0.15.0 (#339)
Browse files Browse the repository at this point in the history
* release 0150

* python 3.11.4 compatibility
  • Loading branch information
pjbull committed Jun 16, 2023
1 parent cb719e4 commit 2a3d712
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# cloudpathlib Changelog

## v0.15.0 (2023-06-16)

- Changed return type for `CloudPathMeta.__call__` to fix problems with pyright/pylance ([PR #330](https://github.com/drivendataorg/cloudpathlib/pull/330))
- Make `CloudPath.is_valid_cloudpath` a TypeGuard so that type checkers can know the subclass if `is_valid_cloudpath` is called ([PR #337](https://github.com/drivendataorg/cloudpathlib/pull/337))
- Added `follow_symlinks` to `stat` for 3.11.4 compatibility (see [bpo 39906](https://github.com/python/cpython/issues/84087))
- Add `follow_symlinks` to `is_dir` implementation for CPython `glob` compatibility (see [CPython PR #104512](https://github.com/python/cpython/pull/104512))

## v0.14.0 (2023-05-13)

- Changed to pyproject.toml-based build.
Expand Down
6 changes: 3 additions & 3 deletions cloudpathlib/cloudpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def _dispatch_to_local_cache_path(self, func: str, *args, **kwargs) -> Any:
else:
return path_version

def stat(self) -> os.stat_result:
def stat(self, follow_symlinks: bool = True) -> os.stat_result:
"""Note: for many clients, we may want to override so we don't incur
network costs since many of these properties are available as
API calls.
Expand All @@ -795,7 +795,7 @@ def stat(self) -> os.stat_result:
f"stat not implemented as API call for {self.__class__} so file must be downloaded to "
f"calculate stats; this may take a long time depending on filesize"
)
return self._dispatch_to_local_cache_path("stat")
return self._dispatch_to_local_cache_path("stat", follow_symlinks=follow_symlinks)

# =========== public cloud methods, not in pathlib ===============
def download_to(self, destination: Union[str, os.PathLike]) -> Path:
Expand Down Expand Up @@ -1182,7 +1182,7 @@ def __init__(
def __repr__(self) -> str:
return "/".join(self._parents + [self.name])

def is_dir(self) -> bool:
def is_dir(self, follow_symlinks: bool = False) -> bool:
return self._all_children is not None

def exists(self) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "cloudpathlib"
version = "0.14.0"
version = "0.15.0"
description = "pathlib-style classes for cloud storage services."
readme = "README.md"
authors = [{ name = "DrivenData", email = "[email protected]" }]
Expand Down

0 comments on commit 2a3d712

Please sign in to comment.