Skip to content

Commit 5ee1952

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 9e1a6bd commit 5ee1952

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
@@ -26,6 +26,9 @@ development source code and as such may not be routinely kept up to date.
2626

2727
## Bug fixes
2828

29+
* Updated code to support the latest version of `wrapt`, used to show
30+
`--dry-run` outputs.
31+
([#499](https://github.com/nextstrain/cli/pull/499))
2932
* Updated the dependency list to explicitly include `boto3`, used for various
3033
commands.
3134
([#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
@@ -31,6 +31,9 @@ development source code and as such may not be routinely kept up to date.
3131
(v-next-bug-fixes)=
3232
### Bug fixes
3333

34+
* Updated code to support the latest version of `wrapt`, used to show
35+
`--dry-run` outputs.
36+
([#499](https://github.com/nextstrain/cli/pull/499))
3437
* Updated the dependency list to explicitly include `boto3`, used for various
3538
commands.
3639
([#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)