diff --git a/obstore/pyproject.toml b/obstore/pyproject.toml index 7df79fdf..5977adc6 100644 --- a/obstore/pyproject.toml +++ b/obstore/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "maturin" [project] name = "obstore" requires-python = ">=3.9" -dependencies = ["typing-extensions; python_version < '3.12'"] +dependencies = ["typing-extensions; python_version < '3.13'"] classifiers = [ "Development Status :: 4 - Beta", "Framework :: AsyncIO", diff --git a/obstore/python/obstore/exceptions/__init__.pyi b/obstore/python/obstore/exceptions/__init__.pyi index 391e8f31..f19f78ec 100644 --- a/obstore/python/obstore/exceptions/__init__.pyi +++ b/obstore/python/obstore/exceptions/__init__.pyi @@ -2,12 +2,24 @@ # pylance isn't able to find that. So this is an exceptions module with only # `__init__.pyi` to work around pylance's bug. +import sys + +if sys.version_info >= (3, 13): + from warnings import deprecated +else: + from typing_extensions import deprecated + class BaseError(Exception): - """The base exception class.""" + """The base exception class. + + !!! note + Some operations also raise a built-in `ValueError` or `FileNotFoundError`. + """ class GenericError(BaseError): """A fallback error type when no variant matches.""" +@deprecated("builtins.FileNotFoundError is emitted instead.") class NotFoundError(BaseError): """Error when the object is not found at given location."""