From 75eb27a4b27b3f2b679202a56ce69497ded83c12 Mon Sep 17 00:00:00 2001 From: Victor Lin Date: Mon, 9 Feb 2026 16:07:04 -0800 Subject: [PATCH 1/3] Use fsspec[s3] extra, declare boto3 dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fsspec was initially added without the [s3] extra due to its recent addition.¹ It's been around for nearly 5 years now, so it should be safe. In addition, the boto3 dependency can be resolved without issues by newer versions of pip. Our minimum pip version target is whatever is bundled with Python 3.8, checked via CI. ¹ "Declare dependency on s3fs since we use fsspec's S3 support" (d1e54c3) --- CHANGES.md | 6 ++++++ doc/changes.md | 7 +++++++ setup.py | 29 +++++++---------------------- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 52055703..7f080446 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -29,6 +29,12 @@ development source code and as such may not be routinely kept up to date. recent versions of managed runtimes. ([#467](https://github.com/nextstrain/cli/issues/467)) +## Bug fixes + +* 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 6772a9b4..a428c85c 100644 --- a/doc/changes.md +++ b/doc/changes.md @@ -33,6 +33,13 @@ development source code and as such may not be routinely kept up to date. recent versions of managed runtimes. ([#467](https://github.com/nextstrain/cli/issues/467)) +(v-next-bug-fixes)= +### Bug fixes + +* 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/setup.py b/setup.py index 3eb51aa1..512d01db 100644 --- a/setup.py +++ b/setup.py @@ -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 From 7486c19b00ed0ede03ec403fd2eb34e66380d7b8 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Tue, 30 Dec 2025 15:10:27 -0800 Subject: [PATCH 2/3] Pin wrapt to version 1 Version 1 was implicitly resolved with the s3fs[boto3] pin removed in the previous commit. It must be explicitly pinned since version 2 affects usage in two ways: 1. It renames ObjectProxy to BaseObjectProxy. 2. It adds type stubs, but only for Python >=3.10. Since Pyright is configured to target 3.8, it would error with v2 upon finding a stubs file without a type definition for the import. https://wrapt.readthedocs.io/en/latest/changes.html#version-2-0-0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 512d01db..c6adaf66 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 From 6fe753c4b10aed04eaf10658145676d7f83c6a1b Mon Sep 17 00:00:00 2001 From: Victor Lin Date: Mon, 9 Feb 2026 16:10:04 -0800 Subject: [PATCH 3/3] 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 --- CHANGES.md | 3 +++ doc/changes.md | 3 +++ nextstrain/cli/console.py | 4 ++-- setup.py | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7f080446..53fb51e4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -31,6 +31,9 @@ development source code and as such may not be routinely kept up to date. ## 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)) diff --git a/doc/changes.md b/doc/changes.md index a428c85c..a3394a52 100644 --- a/doc/changes.md +++ b/doc/changes.md @@ -36,6 +36,9 @@ development source code and as such may not be routinely kept up to date. (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)) 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 c6adaf66..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 <2.0.0", + "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