Skip to content

Commit 0665e94

Browse files
authored
build: move numpy pin to packaging (#3296)
Moved numpy pin to `base.in` where it will be picked up by packaging. Side note: `constraints.txt` (formerly `constraints.in`) is a really useful pattern: you put a constraint there, add that file as a `-c` requirement in other files, and the constraint will be applied when pip-compiling *only when needed* because the library is required by something else. Neat! However, unfortunately, in my searches I've never found a similar pattern for packaging, so any pins we want to propagate to user installs need to be explicitly placed in the `.in` files. So what is `constraints.txt` really doing for us? Well in the past I think there have been instances where something is temporarily broken in an upstream dependency but we expect it to be patched soon, but in the meantime we want things to work in our CI builds and development installs, so it's not worth pinning everywhere it's used. Having said that, I'm coming to the conclusion that `constraints.txt` causes more harm than good in the confusion it causes WRT packaging -- maybe we should remove that pattern at some point.
1 parent c32aeaa commit 0665e94

20 files changed

+7
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.14.9-dev2
1+
## 0.14.9-dev4
22

33
### Enhancements
44

requirements/base.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ emoji
1111
dataclasses-json
1212
python-iso639
1313
langdetect
14-
numpy
14+
# NOTE(robinson) - pinned due to a feature being deprecated in the latest version. plan to
15+
# investigate and remove pin
16+
numpy<2
1517
rapidfuzz
1618
backoff
1719
typing-extensions

requirements/base.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ mypy-extensions==1.0.0
5353
nltk==3.8.1
5454
# via -r ./base.in
5555
numpy==1.26.4
56-
# via
57-
# -c ././deps/constraints.txt
58-
# -r ./base.in
56+
# via -r ./base.in
5957
packaging==23.2
6058
# via
6159
# -c ././deps/constraints.txt

requirements/deps/constraints.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ unstructured-client<=0.18.0
5454
fsspec==2024.5.0
5555

5656
# python 3.12 support
57-
# NOTE(robinson) - pinned due to a feature being deprecated in the latest version. plan to
58-
# investigate and remove pin
59-
numpy==1.26.4
6057
wrapt>=1.14.0
6158

6259

requirements/extra-csv.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#
77
numpy==1.26.4
88
# via
9-
# -c ././deps/constraints.txt
109
# -c ./base.txt
1110
# pandas
1211
pandas==2.2.2

requirements/extra-paddleocr.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ networkx==3.2.1
9999
# via scikit-image
100100
numpy==1.26.4
101101
# via
102-
# -c ././deps/constraints.txt
103102
# -c ./base.txt
104103
# contourpy
105104
# imageio

requirements/extra-pdf-image.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ networkx==3.2.1
103103
# via torch
104104
numpy==1.26.4
105105
# via
106-
# -c ././deps/constraints.txt
107106
# -c ./base.txt
108107
# contourpy
109108
# layoutparser

requirements/extra-xlsx.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ networkx==3.2.1
1010
# via -r ./extra-xlsx.in
1111
numpy==1.26.4
1212
# via
13-
# -c ././deps/constraints.txt
1413
# -c ./base.txt
1514
# pandas
1615
openpyxl==3.1.4

requirements/huggingface.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ networkx==3.2.1
5353
# via torch
5454
numpy==1.26.4
5555
# via
56-
# -c ././deps/constraints.txt
5756
# -c ./base.txt
5857
# transformers
5958
packaging==23.2

requirements/ingest/astra.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ idna==3.7
5858
numpy==1.26.4
5959
# via
6060
# -c ./ingest/../base.txt
61-
# -c ./ingest/../deps/constraints.txt
6261
# cassio
6362
packaging==23.2
6463
# via

0 commit comments

Comments
 (0)