diff --git a/src/timeout_executor/__init__.py b/src/timeout_executor/__init__.py index 8440456..9927c7c 100644 --- a/src/timeout_executor/__init__.py +++ b/src/timeout_executor/__init__.py @@ -15,7 +15,9 @@ def __getattr__(name: str) -> Any: # pragma: no cover from importlib.metadata import version if name == "__version__": - return version("timeout-executor") + _version = version("timeout-executor") + globals()["__version__"] = _version + return _version error_msg = f"The attribute named {name!r} is undefined." raise AttributeError(error_msg)