diff --git a/pyproject.toml b/pyproject.toml index 1189c5c..82c8249 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,8 @@ authors = [ description = "Project-oriented workflow in Python" readme = "README.md" dependencies = [ - "typing-extensions" + "Deprecated", + "typing-extensions", ] requires-python = ">=3.7" classifiers = [ @@ -37,4 +38,4 @@ test = [ [project.urls] "Homepage" = "https://github.com/chendaniely/pyprojroot" -"Bug Tracker" = "https://github.com/chendaniely/pyprojroot/issues" \ No newline at end of file +"Bug Tracker" = "https://github.com/chendaniely/pyprojroot/issues" diff --git a/src/pyprojroot/__init__.py b/src/pyprojroot/__init__.py index 0ba0e9c..4b2c5da 100644 --- a/src/pyprojroot/__init__.py +++ b/src/pyprojroot/__init__.py @@ -1,8 +1,16 @@ +from deprecated import deprecated as _deprecated + from .criterion import as_root_criterion, has_dir, has_file -from .here import here from .root import find_root, find_root_with_reason +@_deprecated(version="0.4.0", reason="Use `from pyprojroot.here import here` instead.") +def here(*args, **kwargs): + from .here import here as h + + h(*args, **kwargs) + + __all__ = [ "as_root_criterion", "find_root_with_reason",