diff --git a/poetry.lock b/poetry.lock index 2ba17809..e19869b0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -435,25 +435,6 @@ files = [ {file = "datrie-0.8.2.tar.gz", hash = "sha256:525b08f638d5cf6115df6ccd818e5a01298cd230b2dac91c8ff2e6499d18765d"}, ] -[[package]] -name = "deprecation" -version = "2.1.0" -description = "A library to handle automated deprecations" -category = "main" -optional = false -python-versions = "*" -files = [] -develop = false - -[package.dependencies] -packaging = "*" - -[package.source] -type = "git" -url = "https://github.com/pvandyken/deprecation.git" -reference = "8309c44" -resolved_reference = "8309c44112f349df9c38cbbfea6aed73f99ff66c" - [[package]] name = "dill" version = "0.3.6" @@ -1821,6 +1802,22 @@ files = [ {file = "puremagic-1.15.tar.gz", hash = "sha256:6e46aa78113a466abc9f69e6e8a4ce90eb57d908dafb809597012621061462bd"}, ] +[[package]] +name = "pvandyken-deprecated" +version = "0.0.3" +description = "Wrapper to manage deprecations" +category = "main" +optional = false +python-versions = ">=3.7,<3.12" +files = [ + {file = "pvandyken_deprecated-0.0.3-py3-none-any.whl", hash = "sha256:83e192d2a33bb681cbbc4be86ba00d3622c024eeacd8f96dfe635595d4d67540"}, + {file = "pvandyken_deprecated-0.0.3.tar.gz", hash = "sha256:1ee350747ece4a6a55a8a2ad4cb7a7ae9f3f77a144b5cd80b94ce58545658737"}, +] + +[package.dependencies] +packaging = ">=22.0,<24.0" +typing-extensions = ">=3.10.0" + [[package]] name = "py-cpuinfo" version = "9.0.0" @@ -3023,4 +3020,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = ">=3.7,<3.12" -content-hash = "1114c70a4661912d74dace98c3af143a5ef441c0d178c74f09dca3cf064cdd96" +content-hash = "254fb6e039c8c1b191a430a00781cbe4ebf28a707c95139bb038be593c646cd8" diff --git a/pyproject.toml b/pyproject.toml index 48629264..bb634e0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ attrs = ">=21.2.0,<23" boutiques = "^0.5.25" more-itertools = ">=8,<10" cached-property = "^1.5.2" -deprecation = { git = "https://github.com/pvandyken/deprecation.git", rev="8309c44" } +pvandyken-deprecated = "0.0.3" # Below are non-direct dependencies (i.e. dependencies of other depenencies) # specified to ensure a version with a pre-built wheel is installed depending diff --git a/snakebids/core/datasets.py b/snakebids/core/datasets.py index dd7a2915..114a47b1 100644 --- a/snakebids/core/datasets.py +++ b/snakebids/core/datasets.py @@ -13,7 +13,7 @@ import more_itertools as itx from bids import BIDSLayout from cached_property import cached_property -from deprecation import deprecated +from pvandyken.deprecated import deprecated from typing_extensions import TypedDict import snakebids.utils.sb_itertools as sb_it diff --git a/typings/deprecation.pyi b/typings/deprecation.pyi deleted file mode 100644 index e7fefe47..00000000 --- a/typings/deprecation.pyi +++ /dev/null @@ -1,27 +0,0 @@ -from datetime import date -from typing import Callable, Generic, ParamSpec, TypeVar - -P = ParamSpec("P") -T = TypeVar("T", bound=Callable) - -class DeprecatedWarning(DeprecationWarning, Generic[T]): - def __init__( - self, - function: T, - deprecated_in: str, - removed_in: str | date | None, - details: str = ..., - ): ... - def __str__(self) -> str: ... - -class UnsupportedWarning(DeprecatedWarning): - def __str__(self) -> str: ... - -def deprecated( - deprecated_in: str | None = ..., - removed_in: str | date | None = ..., - current_version: str | None = ..., - details: str | None = ..., - admonition: str | None = ..., -) -> Callable[[T], T]: ... -def fail_if_not_removed(method: T) -> T: ...