Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion obstore/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 13 additions & 1 deletion obstore/python/obstore/exceptions/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down
Loading