Skip to content

Commit 1e8cd0b

Browse files
Support numpy 2.x (#6899)
This did not require any code changes, and we still support numpy v1 for now. * Allow numpy 2.x in pyproject.toml, update uv.lock * Add ruff rule to not use numpy API deprecated for numpy v1 As mentioned in https://numpy.org/devdocs/numpy_2_0_migration_guide.html#ruff-plugin --------- Co-authored-by: Alexander Goscinski <[email protected]>
1 parent 1229ddd commit 1e8cd0b

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

docs/source/nitpick-exceptions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ py:class disk_objectstore.backup_utils.BackupManager
157157

158158
py:class frozenset
159159

160+
py:class numpy.bool
160161
py:class numpy.bool_
161162
py:class numpy.ndarray
162163
py:class np.ndarray

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- jinja2~=3.0
2323
- kiwipy[rmq]~=0.8.4
2424
- importlib-metadata~=6.0
25-
- numpy~=1.21
25+
- numpy<3,>=1.21
2626
- paramiko~=3.0
2727
- pgsu~=0.3.0
2828
- psutil~=5.6

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies = [
3535
'jinja2~=3.0',
3636
'kiwipy[rmq]~=0.8.4',
3737
'importlib-metadata~=6.0',
38-
'numpy~=1.21',
38+
'numpy>=1.21,<3',
3939
'paramiko~=3.0',
4040
'pgsu~=0.3.0',
4141
'psutil~=5.6',
@@ -446,7 +446,8 @@ select = [
446446
'PLE', # pylint-error
447447
'PLR', # pylint-refactor
448448
'PLW', # pylint-warning
449-
'RUF' # ruff
449+
'RUF', # ruff
450+
'NPY201' # numpy compatibility
450451
]
451452

452453
[tool.tox]

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)