Repository: pandas-dev/pandas-stubs (language: python)

Issue:
Pandas stubs forces numpy <2.0.0 for python < 3.12
**Describe the bug**
Following the merge of #943 it is now not supported to typecheck with pandas stubs and numpy 2 for python <3.12
Reading the description of that pr it seem the intension was just to internal test against both numpy 1 and 2. Not to force users to install v1 for python <3.12

**To Reproduce**
pip install numpy==2.0.1 pandas-stubs==2.2.2.240805

**Please complete the following information:**
 - OS: Any 
 - OS Version Any
 - python version <3.12
 - version of type checker N/A
 - version of installed `pandas-stubs` 2.2.2.240805




Discussion / hints:

Fix patch:
diff --git a/.github/setup/action.yaml b/.github/setup/action.yaml
index 4d27df037..703efdba6 100644
--- a/.github/setup/action.yaml
+++ b/.github/setup/action.yaml
@@ -5,6 +5,8 @@ inputs:
     required: true
   os:
     required: true
+  numpy-version:
+    required: true
 
 runs:
   using: composite
@@ -33,3 +35,7 @@ runs:
     - name: Install project dependencies
       shell: bash
       run: poetry install -vvv --no-root
+      
+    - name: Set numpy version
+      shell: bash
+      run: pip install numpy"${{ inputs. numpy-version }}"
diff --git a/pyproject.toml b/pyproject.toml
index caf8823ce..fa153a654 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -30,10 +30,7 @@ packages = [{ "include" = "pandas-stubs" }]
 [tool.poetry.dependencies]
 python = ">=3.9"
 types-pytz = ">= 2022.1.1"
-numpy = [
-  { version = ">=1.23.5,<2.0.0", python = ">=3.9,<3.12" },
-  { version = ">=2.0.0", python = ">=3.12,<3.13" },
-]
+numpy = ">= 1.23.5"
 
 [tool.poetry.group.dev.dependencies]
 mypy = "1.10.1"


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b0e3f56f2..e09b6df22 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,4 +1,4 @@
-name: 'Test'
+name: "Test"
 
 on:
   push:
@@ -8,7 +8,7 @@ on:
   workflow_dispatch:
 
 env:
-  MPLBACKEND: 'Agg'
+  MPLBACKEND: "Agg"
 
 jobs:
   released:
@@ -19,34 +19,41 @@ jobs:
       matrix:
         # Don't use macos-latest because it is arm64
         os: [ubuntu-latest, windows-latest, macos-13]
-        python-version: ['3.9', '3.10', '3.11', '3.12']
+        python-version: ["3.9", "3.10", "3.11", "3.12"]
+        include:
+          - numpy-version: "<2.0"
+          - numpy-version: ">= 2.0"
+            os: ubuntu-latest
+
+    name: OS ${{ matrix.os }} - Python ${{ matrix.python-version }} - Numpy ${{ matrix.numpy-version }}
 
     steps:
-    - uses: actions/checkout@v3
+      - uses: actions/checkout@v3
 
-    - name: Install project dependencies
-      uses: ./.github/setup
-      with:
-        os: ${{ matrix.os }}
-        python-version: ${{ matrix.python-version }}
+      - name: Install project dependencies
+        uses: ./.github/setup
+        with:
+          os: ${{ matrix.os }}
+          python-version: ${{ matrix.python-version }}
+          numpy-version: ${{ matrix.numpy-version }}
 
-    - name: Run mypy on 'tests' (using the local stubs) and on the local stubs
-      run: poetry run poe mypy
+      - name: Run mypy on 'tests' (using the local stubs) and on the local stubs
+        run: poetry run poe mypy
 
-    - name: Run pyright on 'tests' (using the local stubs) and on the local stubs
-      run: poetry run poe pyright
+      - name: Run pyright on 'tests' (using the local stubs) and on the local stubs
+        run: poetry run poe pyright
 
-    - name: Run pytest
-      run: poetry run poe pytest
+      - name: Run pytest
+        run: poetry run poe pytest
 
-    - name: Install pandas-stubs and run tests on the installed stubs
-      run: poetry run poe test_dist
+      - name: Install pandas-stubs and run tests on the installed stubs
+        run: poetry run poe test_dist
 
   precommit:
     runs-on: ubuntu-latest
     timeout-minutes: 10
 
     steps:
-    - uses: actions/checkout@v3
+      - uses: actions/checkout@v3
 
-    - uses: pre-commit/action@v3.0.0
+      - uses: pre-commit/action@v3.0.0