Skip to content

Commit fb0cb71

Browse files
committed
chore(deps): remove pip hash requirement from scripts and dependencies
1 parent b85fba5 commit fb0cb71

3 files changed

Lines changed: 7 additions & 31 deletions

File tree

scripts/README.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Various scripts for CI/CD, release automation, and development tasks.
99
Install direct dependencies (hashed, no transitive deps):
1010

1111
```bash
12-
python3 -m pip install --require-hashes --no-deps -r scripts/requirements.txt
12+
python3 -m pip install -r scripts/requirements.txt
1313
```
1414

1515
### Available Scripts
@@ -29,7 +29,7 @@ It's recommended to use a virtual environment:
2929
```bash
3030
python3 -m venv venv
3131
source venv/bin/activate # On macOS/Linux
32-
python3 -m pip install --require-hashes --no-deps -r scripts/requirements.txt
32+
python3 -m pip install -r scripts/requirements.txt
3333
```
3434

3535
To deactivate: `deactivate`
@@ -52,27 +52,3 @@ The `requirements.txt` includes **4 direct dependencies** (all pinned to specifi
5252
- **PyYAML** - YAML parsing for release notes
5353
- **Jinja2** - Template rendering for changelog files
5454
- **requests** - HTTP client for GitHub API interactions
55-
56-
## Updating requirements.txt hashes
57-
58-
If `./scripts/test_python_scripts.sh` fails with a `--require-hashes` error, regenerate hashes using a temporary no-hash file:
59-
60-
```bash
61-
cp scripts/requirements.txt /tmp/requirements-no-hash.txt
62-
python3 - <<'PY'
63-
import re, pathlib
64-
path = pathlib.Path('/tmp/requirements-no-hash.txt')
65-
text = path.read_text()
66-
text = re.sub(r"\s+--hash=sha256:[a-f0-9]+", "", text)
67-
path.write_text(text)
68-
print("Wrote", path)
69-
PY
70-
71-
mkdir -p /tmp/pip-hashes
72-
python3 -m pip download --no-deps -r /tmp/requirements-no-hash.txt -d /tmp/pip-hashes --quiet
73-
python3 -m pip hash /tmp/pip-hashes/* | sed 's/^.*--hash=/--hash=/'
74-
rm -rf /tmp/pip-hashes
75-
rm /tmp/requirements-no-hash.txt
76-
```
77-
78-
Add the pinned versions and hashes from the output to `scripts/requirements.txt` (direct dependencies only).

scripts/requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55

66
# Required by: scripts/ci/setup_release_automation
77
# Cryptography library for GitHub secret encryption
8-
PyNaCl==1.6.2 --hash=sha256:c949ea47e4206af7c8f604b8278093b674f7c79ed0d4719cc836902bf4517465
8+
PyNaCl==1.6.2
99

1010
# Required by: scripts/ci/render-notes.py
1111
# YAML parser for release notes
12-
PyYAML==6.0.1 --hash=sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43
12+
PyYAML==6.0.1
1313

1414
# Required by: scripts/ci/render-notes.py
1515
# Template engine for rendering changelog files
16-
Jinja2==3.1.6 --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67
16+
Jinja2==3.1.6
1717

1818
# Required by: scripts/ci/setup_release_automation, scripts/ci/render-notes.py
1919
# HTTP library for GitHub API interactions
20-
requests==2.32.4 --hash=sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c
20+
requests==2.32.4

scripts/test_python_scripts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ source "$VENV_DIR/bin/activate"
4444

4545
# Install dependencies
4646
echo "Installing dependencies..."
47-
pip install --quiet --require-hashes --no-deps -r "$SCRIPT_DIR/requirements.txt"
47+
pip install --quiet -r "$SCRIPT_DIR/requirements.txt"
4848
echo "✓ Dependencies installed"
4949
echo ""
5050

0 commit comments

Comments
 (0)