Repository: deepset-ai/haystack (language: python)

Issue:
`numpy 2` compatible
**Is your feature request related to a problem? Please describe.**
I'd like if the library could install in a `numpy 2` environment. Did you guys have a plan for doing that? I can make PRs if you do. I can't install `haystack-ai` with the latest version of `spacy` now because that only support `numpy 2`. 

**Describe the solution you'd like**
Library can install with `numpy 2`.

**Describe alternatives you've considered**
...

**Additional context**
From commits it says that this `numpy` pin was because of problem with [haystack-core-integrations](https://github.com/deepset-ai/haystack-core-integrations). I can make an issue there if you want. If `haystack-ai` is compatible with `numpy 2`, maybe you could remove pin here and add pin in `haystack-core-integrations` packages?

https://github.com/deepset-ai/haystack/commit/2413bb3f425db254d0e3a4ece99df3d57fcf6388





Discussion / hints:
I generally agree with the idea:
- try to see if Haystack works properly if we unpin `numpy`
- selectively pin `numpy<2` in the core-integrations that require it to work correctly

I'll try to do this...

Fix patch:
diff --git a/.github/workflows/minor_version_release.yml b/.github/workflows/minor_version_release.yml
index f569c46de3..20979ea91d 100644
--- a/.github/workflows/minor_version_release.yml
+++ b/.github/workflows/minor_version_release.yml
@@ -4,7 +4,7 @@ on:
   workflow_dispatch:
 
 env:
-  PYTHON_VERSION: "3.8"
+  PYTHON_VERSION: "3.9"
 
 jobs:
   sync:
diff --git a/.github/workflows/promote_unstable_docs.yml b/.github/workflows/promote_unstable_docs.yml
index 838dcd145d..a898ad5c28 100644
--- a/.github/workflows/promote_unstable_docs.yml
+++ b/.github/workflows/promote_unstable_docs.yml
@@ -8,7 +8,7 @@ on:
       # Exclude 1.x tags
       - "!v1.[0-9]+.[0-9]+"
 env:
-  PYTHON_VERSION: "3.8"
+  PYTHON_VERSION: "3.9"
 
 jobs:
   promote:
diff --git a/pyproject.toml b/pyproject.toml
index c53b77939a..0367b672ed 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -54,7 +54,7 @@ dependencies = [
   "networkx",               # Pipeline graphs
   "typing_extensions>=4.7", # typing support for Python 3.8
   "requests",
-  "numpy<2",
+  "numpy",
   "python-dateutil",
   "haystack-experimental",
 ]
@@ -81,6 +81,8 @@ format-check = "ruff format --check {args}"
 
 [tool.hatch.envs.test]
 extra-dependencies = [
+  "numpy>=2",                                  # Haystack is compatible both with numpy 1.x and 2.x, but we test with 2.x
+
   "transformers[torch,sentencepiece]==4.44.2", # ExtractiveReader, TransformersSimilarityRanker, LocalWhisperTranscriber, HFGenerators...
   "huggingface_hub>=0.23.0",                   # Hugging Face API Generators and Embedders
   "sentence-transformers>=3.0.0",              # SentenceTransformersTextEmbedder and SentenceTransformersDocumentEmbedder
@@ -89,9 +91,9 @@ extra-dependencies = [
   "arrow>=1.3.0",                              # Jinja2TimeExtension
 
   # NamedEntityExtractor
-  "spacy>=3.7,<3.8",
+  "spacy>=3.8,<3.9",
   "spacy-curated-transformers>=0.2,<=0.3",
-  "en-core-web-trf @ https://github.com/explosion/spacy-models/releases/download/en_core_web_trf-3.7.3/en_core_web_trf-3.7.3-py3-none-any.whl",
+  "en-core-web-trf @ https://github.com/explosion/spacy-models/releases/download/en_core_web_trf-3.8.0/en_core_web_trf-3.8.0-py3-none-any.whl",
 
   # Converters
   "pypdf",                            # PyPDFToDocument
diff --git a/releasenotes/notes/unpin-numpy-84575284e844628b.yaml b/releasenotes/notes/unpin-numpy-84575284e844628b.yaml
new file mode 100644
index 0000000000..9c7240cdd0
--- /dev/null
+++ b/releasenotes/notes/unpin-numpy-84575284e844628b.yaml
@@ -0,0 +1,6 @@
+---
+enhancements:
+  - |
+    Previously, numpy was pinned to <2.0 to avoid compatibility issues in several core integrations.
+    This pin has been removed, and haystack can work with both numpy 1.x and 2.x.
+    If necessary, we will pin numpy version in specific core integrations that require it.


Test patch:
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index b0911ea3bc..7e817f2039 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -16,7 +16,7 @@ on:
       - ".github/workflows/e2e.yml"
 
 env:
-  PYTHON_VERSION: "3.8"
+  PYTHON_VERSION: "3.9"
   OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
   HATCH_VERSION: "1.13.0"
 
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 4f9df1a3fe..5e2af839ac 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -29,7 +29,7 @@ env:
   AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
   GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
   HF_API_TOKEN: ${{ secrets.HUGGINGFACE_API_KEY }}
-  PYTHON_VERSION: "3.8"
+  PYTHON_VERSION: "3.9"
   HATCH_VERSION: "1.13.0"
 
 jobs: