diff --git a/haystack/version.py b/haystack/version.py index 5d9e899fa..68b18404f 100644 --- a/haystack/version.py +++ b/haystack/version.py @@ -1,13 +1,6 @@ from importlib import metadata -# haystack is distributed as a separate package called `haystack-ai`. -# We want to keep all preview dependencies separate from the current Haystack version, -# so imports in haystack must only import from haystack. -# Since we need to access __version__ in haystack without importing from -# haystack we must set it here too. -# When installing `haystack-ai` we want to use that package version though -# as `farm-haystack` might not be installed and cause this to fail. try: __version__ = str(metadata.version("haystack-ai")) except metadata.PackageNotFoundError: - __version__ = str(metadata.version("farm-haystack")) + __version__ = "main" diff --git a/releasenotes/notes/fix-version-47afaec913788a01.yaml b/releasenotes/notes/fix-version-47afaec913788a01.yaml new file mode 100644 index 000000000..9e657c7a5 --- /dev/null +++ b/releasenotes/notes/fix-version-47afaec913788a01.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fix Haystack imports failing when using local development environment that doesn't have `haystack-ai` installed.