Skip to content

Commit 2aec2a9

Browse files
authored
Merge pull request #752 from numpy/nuimpy-2.4.0rc1
2 parents 4aab6c2 + 0b4071a commit 2aec2a9

4 files changed

Lines changed: 267 additions & 277 deletions

File tree

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["uv_build>=0.9.14,<0.10.0"]
2+
requires = ["uv_build>=0.9.17,<0.10.0"]
33
build-backend = "uv_build"
44

55
[tool.uv.build-backend]
@@ -9,7 +9,7 @@ source-exclude = ['\@test', ".ruff_cache", ".ruff.toml"]
99

1010
[project]
1111
name = "numtype"
12-
version = "2.3.5.0.dev0"
12+
version = "2.4.0.0.dev0"
1313
description = "Experimental Typing Stubs for NumPy"
1414
readme = "README.md"
1515
authors = [{ name = "Joren Hammudoglu", email = "jhammudoglu@gmail.com" }]
@@ -34,7 +34,7 @@ requires-python = ">=3.11"
3434
dependencies = []
3535

3636
[project.optional-dependencies]
37-
numpy = ["numpy>=2.3.5"]
37+
numpy = ["numpy>=2.4.0rc1"]
3838

3939
[project.urls]
4040
Homepage = "https://numpy.org/"
@@ -46,11 +46,11 @@ Changelog = "https://github.com/numpy/numtype/releases"
4646
numpy = ["numtype[numpy]"]
4747
lint = [
4848
"dprint-py>=0.50.2.0",
49-
"ruff>=0.14.7",
49+
"ruff>=0.14.9",
5050
]
5151
pytest = [
5252
{ include-group = "numpy" },
53-
"pytest>=9.0.1",
53+
"pytest>=9.0.2",
5454
"typing_extensions>=4.15.0",
5555
]
5656
list_and_test = [
@@ -65,7 +65,7 @@ types = [
6565
basedpyright = [
6666
{ include-group = "numpy" },
6767
{ include-group = "types" },
68-
"basedpyright==1.35.0",
68+
"basedpyright==1.36.1",
6969
]
7070
mypy = [
7171
{ include-group = "types" },
@@ -77,7 +77,7 @@ typecheck = [
7777
]
7878
docs = [
7979
"mkdocs-material>=9.7.0",
80-
"mkdocs-awesome-nav>=3.2.0",
80+
"mkdocs-awesome-nav>=3.3.0",
8181
"markdown-callouts>=0.4.0",
8282
"mkdocs-include-markdown-plugin>=7.2.0",
8383
"mkdocs-minify-plugin>=0.8.0",

src/numpy-stubs/@test/runtime/legacy/ufunclike.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
1-
from __future__ import annotations
2-
3-
from typing import Any
1+
from typing import Any, Self
42

53
import numpy as np
6-
import numpy.typing as npt
74

85

96
class Object:
10-
def __ceil__(self) -> Object:
11-
return self
12-
13-
def __floor__(self) -> Object:
7+
def __trunc__(self, /) -> Self:
148
return self
159

16-
def __ge__(self, value: object) -> bool:
10+
def __ge__(self, other: object, /) -> bool:
1711
return True
1812

19-
def __array__(
20-
self, dtype: npt.DTypeLike | None = None, *, copy: bool | None = None
21-
) -> np.ndarray[Any, np.dtype[np.object_]]:
13+
def __array__(self, /) -> np.ndarray[Any, np.dtype[np.object_]]:
2214
ret = np.empty((), dtype=object)
2315
ret[()] = self
2416
return ret
@@ -29,7 +21,7 @@ def __array__(
2921
AR_LIKE_i = [1, 2, 3]
3022
AR_LIKE_f = [1.0, 2.0, 3.0]
3123
AR_LIKE_O = [Object(), Object(), Object()]
32-
AR_U: np.ndarray[Any, np.dtype[np.str_]] = np.zeros(3, dtype="U5")
24+
AR_U: np.ndarray[tuple[int], np.dtype[np.str_]] = np.zeros(3, dtype="U5")
3325

3426
np.fix(AR_LIKE_b)
3527
np.fix(AR_LIKE_u)

src/numtype/@test/test_numtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ def test_reexport(name: str) -> None:
1717

1818

1919
def test_version() -> None:
20-
assert nt.__version__.startswith(np.__version__)
20+
assert nt.__version__.startswith(np.__version__.split("rc")[0])

0 commit comments

Comments
 (0)