Skip to content

Commit 87ad32f

Browse files
committed
Bump wrapt to version 2
Version 2 renames ObjectProxy to BaseObjectProxy. It also adds a type stubs file, but only defines types for Python >=3.10. Since Pyright is configured to target 3.8, a comment is added to ignore the error caused by lack of type definitions. https://wrapt.readthedocs.io/en/latest/changes.html#version-2-0-0
1 parent 8ee79fc commit 87ad32f

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ development source code and as such may not be routinely kept up to date.
3535

3636
## Bug fixes
3737

38+
* Updated code to support the latest version of `wrapt`, used to show
39+
`--dry-run` outputs.
40+
([#499](https://github.com/nextstrain/cli/pull/499))
3841
* Updated the dependency list to explicitly include `boto3`, used for various
3942
commands.
4043
([#499](https://github.com/nextstrain/cli/pull/499))

doc/changes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ development source code and as such may not be routinely kept up to date.
4040
(v-next-bug-fixes)=
4141
### Bug fixes
4242

43+
* Updated code to support the latest version of `wrapt`, used to show
44+
`--dry-run` outputs.
45+
([#499](https://github.com/nextstrain/cli/pull/499))
4346
* Updated the dependency list to explicitly include `boto3`, used for various
4447
commands.
4548
([#499](https://github.com/nextstrain/cli/pull/499))

nextstrain/cli/console.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from contextlib import contextmanager, ExitStack, redirect_stdout, redirect_stderr
77
from functools import wraps
88
from typing import Callable, TextIO
9-
from wrapt import ObjectProxy
9+
from wrapt import BaseObjectProxy # pyright: ignore[reportAttributeAccessIssue]
1010

1111

1212
def auto_dry_run_indicator(getter: Callable[..., bool] = lambda opts, *args, **kwargs: opts.dry_run):
@@ -83,7 +83,7 @@ def dry_run_indicator(dry_run: bool = False):
8383
yield dry_run
8484

8585

86-
class LinePrefixer(ObjectProxy): # pyright: ignore[reportUntypedBaseClass]
86+
class LinePrefixer(BaseObjectProxy): # pyright: ignore[reportUntypedBaseClass]
8787
"""
8888
Add *prefix* to every line written to *file*.
8989

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def find_namespaced_packages(namespace):
102102
"requests",
103103
"typing_extensions >=3.7.4",
104104
"wcmatch >=6.0",
105-
"wrapt <2.0.0",
105+
"wrapt >=2.0.0",
106106

107107
# We use fsspec's S3 support, which has a runtime dep on s3fs. s3fs
108108
# itself requires aiobotocore, which in turn requires very specific

0 commit comments

Comments
 (0)