From 8429ce2a62c460b16d224bcae9c92bdd9923a450 Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Sun, 22 Mar 2026 10:20:06 -0400 Subject: [PATCH] [python-dateutil] Add missing `gettz` cache control methods Also use literal `None` default argument for `__call__`. source: https://github.com/dateutil/dateutil/blame/2.9.0.post0/src/dateutil/tz/tz.py#L1475 docs: https://dateutil.readthedocs.io/en/stable/tz.html#dateutil.tz.gettz --- stubs/python-dateutil/dateutil/tz/tz.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stubs/python-dateutil/dateutil/tz/tz.pyi b/stubs/python-dateutil/dateutil/tz/tz.pyi index 19ce1c9dd51e..fe2eaf50ee22 100644 --- a/stubs/python-dateutil/dateutil/tz/tz.pyi +++ b/stubs/python-dateutil/dateutil/tz/tz.pyi @@ -131,7 +131,9 @@ def resolve_imaginary(dt: _DateTimeT) -> _DateTimeT: ... # Singleton type defined locally in a function. Calls itself "GettzFunc". @type_check_only class _GetTZ: - def __call__(self, name: str | None = ...) -> tzinfo | None: ... + def __call__(self, name: str | None = None) -> tzinfo | None: ... + def set_cache_size(self, size: int) -> None: ... + def cache_clear(self) -> None: ... def nocache(self, name: str | None) -> tzinfo | None: ... gettz: _GetTZ