diff --git a/CHANGES.md b/CHANGES.md index d96eaead..83ba5266 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,6 +24,15 @@ development source code and as such may not be routinely kept up to date. ([#501](https://github.com/nextstrain/cli/pull/501)) +## Bug fixes + +* Updated code to support the latest version of `wrapt`, used to show + `--dry-run` outputs. + ([#499](https://github.com/nextstrain/cli/pull/499)) +* Updated the dependency list to explicitly include `boto3`, used for various + commands. + ([#499](https://github.com/nextstrain/cli/pull/499)) + # 10.4.2 (7 January 2026) ## Improvements diff --git a/doc/changes.md b/doc/changes.md index 0480819d..cb3f6ec7 100644 --- a/doc/changes.md +++ b/doc/changes.md @@ -28,6 +28,16 @@ development source code and as such may not be routinely kept up to date. ([#501](https://github.com/nextstrain/cli/pull/501)) +(v-next-bug-fixes)= +### Bug fixes + +* Updated code to support the latest version of `wrapt`, used to show + `--dry-run` outputs. + ([#499](https://github.com/nextstrain/cli/pull/499)) +* Updated the dependency list to explicitly include `boto3`, used for various + commands. + ([#499](https://github.com/nextstrain/cli/pull/499)) + (v10-4-2)= ## 10.4.2 (7 January 2026) diff --git a/nextstrain/cli/console.py b/nextstrain/cli/console.py index 3252c076..e59ecdf2 100644 --- a/nextstrain/cli/console.py +++ b/nextstrain/cli/console.py @@ -6,7 +6,7 @@ from contextlib import contextmanager, ExitStack, redirect_stdout, redirect_stderr from functools import wraps from typing import Callable, TextIO -from wrapt import ObjectProxy +from wrapt import BaseObjectProxy # pyright: ignore[reportAttributeAccessIssue] 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): yield dry_run -class LinePrefixer(ObjectProxy): # pyright: ignore[reportUntypedBaseClass] +class LinePrefixer(BaseObjectProxy): # pyright: ignore[reportUntypedBaseClass] """ Add *prefix* to every line written to *file*. diff --git a/setup.py b/setup.py index 3eb51aa1..eba72292 100644 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ def find_namespaced_packages(namespace): "requests", "typing_extensions >=3.7.4", "wcmatch >=6.0", - "wrapt", + "wrapt >=2.0.0", # We use fsspec's S3 support, which has a runtime dep on s3fs. s3fs # itself requires aiobotocore, which in turn requires very specific @@ -112,33 +112,18 @@ def find_namespaced_packages(namespace): # versions closely matching the boto3 version (they're released in near # lock step). # - # If we declare a dep on boto3 directly, this leads to conflicts during - # dependency resolution when a newer boto3 (from our declaration here) - # requires a newer botocore than is supported by s3fs → aiobotocore's - # declarations. - # - # Resolve the issue by using a specially-provided package extra from - # s3fs (first introduced with 2021.4.0, removed in 2025.12.0) which - # causes them to declare an explicit dependency on aiobotocore's - # specially-provided package extra on boto3 so that dependency resolver - # can figure it out properly. - # - # Note that the upper limit is not future-proof and will likely cause - # issues down the road. There may be a better combination to use here, - # but that needs extra digging. + # boto3 must be unconstrained. Adding any constraint causes pip to lock + # the boto3/botocore version early in resolution, often resulting in a + # version newer than what aiobotocore supports. # # More background: - # - # - # - # - # What a mess. - # + # + "boto3", + # Avoiding 2023.9.1 due to change in `auto_mkdir` parameter in # https://github.com/fsspec/filesystem_spec/pull/1358 that causes the # error described in https://github.com/fsspec/s3fs/issues/790 - "fsspec !=2023.9.1", - "s3fs[boto3] >=2021.04.0, !=2023.9.1, <2025.12.0", + "fsspec[s3] !=2023.9.1", # From 2.0.0 onwards, urllib3 is better typed, but not usable (given # our dep tree) on 3.8 and 3.9 so we use types-urllib3 there (see