Skip to content

Commit 9f8392c

Browse files
authored
Merge pull request #2522 from h-vetinari/numpy
Add announcement for closing numpy 2.0 migration
2 parents 6a344b9 + ac8b88b commit 9f8392c

File tree

2 files changed

+27
-20
lines changed

2 files changed

+27
-20
lines changed

docs/maintainer/knowledge_base.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,10 @@ requirements:
533533
- numpy
534534
run:
535535
- python
536-
- {{ pin_compatible("numpy") }}
537536
```
538537

538+
For more details about numpy see the dedicated [section](#building-against-numpy).
539+
539540
With MPI, openmpi is required for the build platform as the compiler wrappers are binaries, but mpich is not required as the compiler wrappers are scripts (see [example](https://github.com/conda-forge/mpi4py-feedstock/blob/743d379c4a04/recipe/meta.yaml#L37)):
540541

541542
```yaml
@@ -770,36 +771,23 @@ host:
770771
- numpy
771772
```
772773

773-
At the time of writing (January, 2025), above is equivalent to the following,
774-
775-
```yaml
776-
host:
777-
- numpy 1.22 # [py==39]
778-
- numpy 1.22 # [py==310]
779-
- numpy 1.23 # [py==311]
780-
- numpy 1.26 # [py==312]
781-
```
782-
783-
though the ongoing migration for numpy 2.0 has already been applied to many
784-
feedstocks, in which case the pinning looks like
774+
At the time of writing (June 2025), above is equivalent to the following,
785775

786-
```yaml
776+
```yaml title="recipe/conda_build_config.yaml"
787777
host:
788-
- numpy 2.0 # [py==39]
789-
- numpy 2.0 # [py==310]
790-
- numpy 2.0 # [py==311]
791-
- numpy 2.0 # [py==312]
778+
- numpy 2.*
792779
```
793780

794-
See the pinning repository for what the pinning corresponds to at time of writing
795-
[https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml#L742](https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml#L742)
781+
See the pinning repository for
782+
[what the pinning corresponds to](https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml#L742) at any given time.
796783

797784
In either case, the actual runtime requirements are determined through numpy's
798785
run-export, which is:
799786

800787
- `>=1.2x,<2` if you're building against numpy 1.2x
801788
- `>=1.19,<3` if you're building against numpy 2.0
802789
- `>=1.21,<3` if you're building against numpy 2.1 or 2.2
790+
- `>=1.23,<3` if you're building against numpy 2.3
803791

804792
If the package you are building has a higher minimum requirement for numpy, please add this under `run`:
805793

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Upcoming closure of NumPy 2.0 migration
2+
3+
NumPy 2.0 was a big change (the first major version in 15 years). For more than a year, we
4+
have been migrating feedstocks from NumPy 1.x to NumPy 2.x, and while not every affected
5+
feedstock has been done, we are planning to conclude the migration in one week.
6+
Note that NumPy 2 support is required for feedstocks that intend to support Python 3.13
7+
and above.
8+
9+
For feedstocks that are not compatible with v2.x yet, this means you will have to add
10+
11+
```yaml
12+
numpy:
13+
- 1.26 # or 1.25
14+
```
15+
16+
to your `recipe/conda_build_config.yaml`, and then rerender. Pins below 1.25 are not possible
17+
if your feedstock supports Python 3.12, as NumPy 1.25 was the first version with support for
18+
that Python version (and it will not be possible going forward to pin different NumPy versions
19+
for different Python versions).

0 commit comments

Comments
 (0)