From 6d59a25c2c48245dcb7882813740236914f067ba Mon Sep 17 00:00:00 2001 From: stubsabot <> Date: Tue, 8 Sep 2026 00:23:49 +0000 Subject: [PATCH 1/3] [stubsabot] Bump boltons to 26.2.* Release: https://pypi.org/pypi/boltons/26.2.0 Homepage: https://github.com/mahmoud/boltons Repository: https://github.com/mahmoud/boltons Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/boltons Diff: https://github.com/mahmoud/boltons/compare/26.1.0...26.2.0 Stubsabot analysis of the diff between the two releases: - 0 public Python files have been added. - 0 files included in typeshed's stubs have been deleted. - 17 files included in typeshed's stubs have been modified or renamed. - Total lines of Python code added: 1322. - Total lines of Python code deleted: 248. If stubtest fails for this PR: - Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR) - Fix stubtest failures in another PR, then close this PR Note that you will need to close and re-open the PR in order to trigger CI --- stubs/boltons/METADATA.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/boltons/METADATA.toml b/stubs/boltons/METADATA.toml index 9c5868f7d067..7a5f5eb62b1f 100644 --- a/stubs/boltons/METADATA.toml +++ b/stubs/boltons/METADATA.toml @@ -1,2 +1,2 @@ -version = "26.1.*" +version = "26.2.*" upstream-repository = "https://github.com/mahmoud/boltons" From 00d6eb968779a0063b8912445cbe7b258c27a8c5 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 22 Sep 2026 18:56:33 -0700 Subject: [PATCH 2/3] Fix boltons stubs for upstream update --- stubs/boltons/boltons/cacheutils.pyi | 2 +- stubs/boltons/boltons/funcutils.pyi | 2 +- stubs/boltons/boltons/statsutils.pyi | 2 ++ stubs/boltons/boltons/strutils.pyi | 2 ++ stubs/boltons/boltons/timeutils.pyi | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/stubs/boltons/boltons/cacheutils.pyi b/stubs/boltons/boltons/cacheutils.pyi index 978da569d563..8067421667ff 100644 --- a/stubs/boltons/boltons/cacheutils.pyi +++ b/stubs/boltons/boltons/cacheutils.pyi @@ -47,7 +47,7 @@ class LRI(dict[_KT, _VT]): @overload def setdefault(self, key: _KT, default: _VT) -> _VT: ... - def update(self, E: SupportsKeysAndGetItem[_KT, _VT] | Iterable[tuple[_KT, _VT]], **F: _VT) -> None: ... # type: ignore[override] + def update(self, E: SupportsKeysAndGetItem[_KT, _VT] | Iterable[tuple[_KT, _VT]] = (), **F: _VT) -> None: ... # type: ignore[override] class LRU(LRI[_KT, _VT]): def __getitem__(self, key: _KT) -> _VT: ... diff --git a/stubs/boltons/boltons/funcutils.pyi b/stubs/boltons/boltons/funcutils.pyi index 1a964c7d8abc..96ec5b410cec 100644 --- a/stubs/boltons/boltons/funcutils.pyi +++ b/stubs/boltons/boltons/funcutils.pyi @@ -51,7 +51,7 @@ class FunctionBuilder: name: Incomplete def __init__(self, name, **kw) -> None: ... def get_sig_str(self, with_annotations: bool = True): ... - def get_invocation_str(self): ... + def get_invocation_str(self, target: Callable[..., object] | None = None) -> str: ... @classmethod def from_func(cls, func): ... def get_func(self, execdict=None, add_source: bool = True, with_dict: bool = True): ... diff --git a/stubs/boltons/boltons/statsutils.pyi b/stubs/boltons/boltons/statsutils.pyi index 4165b8a16373..525569e1fbce 100644 --- a/stubs/boltons/boltons/statsutils.pyi +++ b/stubs/boltons/boltons/statsutils.pyi @@ -35,6 +35,7 @@ class Stats: mean: _StatsProperty max: _StatsProperty min: _StatsProperty + mode: _StatsProperty median: _StatsProperty iqr: _StatsProperty trimean: _StatsProperty @@ -61,6 +62,7 @@ def describe( mean: Incomplete median: Incomplete +mode: Incomplete iqr: Incomplete trimean: Incomplete variance: Incomplete diff --git a/stubs/boltons/boltons/strutils.pyi b/stubs/boltons/boltons/strutils.pyi index 2eae46714980..71b94cbcd22a 100644 --- a/stubs/boltons/boltons/strutils.pyi +++ b/stubs/boltons/boltons/strutils.pyi @@ -65,8 +65,10 @@ def multi_replace(text: str, sub_map: dict[str, str], **kwargs) -> str: ... def unwrap_text(text: str, ending: str | None = "\n\n") -> str: ... def removeprefix(text: str, prefix: str) -> str: ... def human_readable_list(items: Sequence[str], delimiter: str = ",", conjunction: str = "and", *, oxford: bool = True) -> str: ... +def ellipsize(text: str, max_len: int = 160, *, ellipsis: str = "…") -> str: ... __all__ = [ + "ellipsize", "camel2under", "under2camel", "slugify", diff --git a/stubs/boltons/boltons/timeutils.pyi b/stubs/boltons/boltons/timeutils.pyi index 7416be362361..35971a434041 100644 --- a/stubs/boltons/boltons/timeutils.pyi +++ b/stubs/boltons/boltons/timeutils.pyi @@ -55,6 +55,7 @@ class USTimeZone(tzinfo): def tzname(self, dt: datetime | None) -> str: ... def utcoffset(self, dt: datetime | None) -> timedelta: ... def dst(self, dt: datetime | None) -> timedelta: ... + def fromutc(self, dt: datetime) -> datetime: ... Eastern: USTimeZone Central: USTimeZone From 2156c0952ada3087850fa8fec4f85c7e46c636c6 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 22 Sep 2026 19:45:23 -0700 Subject: [PATCH 3/3] Complete boltons stubs for upstream update --- stubs/boltons/boltons/jsonutils.pyi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stubs/boltons/boltons/jsonutils.pyi b/stubs/boltons/boltons/jsonutils.pyi index 276db26ef881..7352d3ad4030 100644 --- a/stubs/boltons/boltons/jsonutils.pyi +++ b/stubs/boltons/boltons/jsonutils.pyi @@ -7,9 +7,13 @@ def reverse_iter_lines( file_obj: IO[bytes], blocksize: int = 4096, preseek: bool = True, encoding: None = None ) -> Generator[bytes]: ... @overload -def reverse_iter_lines(file_obj: IO[str], blocksize: int = 4096, preseek: bool = True, *, encoding: str) -> Generator[str]: ... +def reverse_iter_lines( + file_obj: IO[str], blocksize: int = 4096, preseek: bool = True, encoding: str | None = None +) -> Generator[str]: ... +@overload +def reverse_iter_lines(file_obj: IO[bytes], blocksize: int = 4096, preseek: bool = True, *, encoding: str) -> Generator[str]: ... @overload -def reverse_iter_lines(file_obj: IO[str], blocksize: int, preseek: bool, encoding: str) -> Generator[str]: ... +def reverse_iter_lines(file_obj: IO[bytes], blocksize: int, preseek: bool, encoding: str) -> Generator[str]: ... class JSONLIterator: ignore_errors: bool