Skip to content

Commit a4fea46

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 d0aa9f7 commit a4fea46

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
@@ -18,6 +18,9 @@ development source code and as such may not be routinely kept up to date.
1818
* Updated the dependency list to explicitly include `boto3`, used for various
1919
commands.
2020
([#499](https://github.com/nextstrain/cli/pull/499))
21+
* Updated code to support the latest version of `wrapt`, used to show
22+
`--dry-run` outputs.
23+
([#499](https://github.com/nextstrain/cli/pull/499))
2124

2225
# 10.4.1 (14 October 2025)
2326

doc/changes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ development source code and as such may not be routinely kept up to date.
2222
* Updated the dependency list to explicitly include `boto3`, used for various
2323
commands.
2424
([#499](https://github.com/nextstrain/cli/pull/499))
25+
* Updated code to support the latest version of `wrapt`, used to show
26+
`--dry-run` outputs.
27+
([#499](https://github.com/nextstrain/cli/pull/499))
2528

2629
(v10-4-1)=
2730
## 10.4.1 (14 October 2025)

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
@@ -103,7 +103,7 @@ def find_namespaced_packages(namespace):
103103
"requests",
104104
"typing_extensions >=3.7.4",
105105
"wcmatch >=6.0",
106-
"wrapt <2.0.0",
106+
"wrapt >=2.0.0",
107107

108108
# Avoiding 2023.9.1 due to change in `auto_mkdir` parameter in
109109
# https://github.com/fsspec/filesystem_spec/pull/1358 that causes the

0 commit comments

Comments
 (0)