use immutable dependencies#5
Conversation
There was a problem hiding this comment.
Ich glaube man will --allow-unsafe nutzen:
pip-compile -v --generate-hashes --allow-unsafe --output-file=requirements.txt requirements.in
--allow-unsafe / --no-allow-unsafe
Pin packages considered unsafe: distribute,
pip, setuptools.
WARNING: Future versions of pip-tools will
enable this behavior by default. Use --no-
allow-unsafe to keep the old behavior. It is
recommended to pass the --allow-unsafe now
to adapt to the upcoming change.
There was a problem hiding this comment.
So in etwa könnte eine .envrc aussehen:
ls .venv &> /dev/null || python3 -mvenv .venv || exit 1
source .venv/bin/activate || exit 1
pip install pip-tools pip-audit|| exit 1
if [ ! -f "requirements.txt" ]; then
echo "requirements.txt not found. Compiling from requirements.in..."
pip-compile -v --generate-hashes --allow-unsafe --output-file=requirements.txt requirements.in || exit 1
fi
echo "Auditing locked dependencies..."
pip-audit --strict --require-hashes -r requirements.txt || exit 1
echo "Installing with strict hash verification..."
pip install --require-hashes --only-binary :all: -r requirements.txt || exit 1
pre-commit installThere was a problem hiding this comment.
Nach guten Rückfragen durch die anderen und daraus hervorgehender Recherche glaube ich, dass wir nur im http_request_recorder eine pyproject.toml brauchen. Meines Wissens nach ist das die einzige lib die bei Pypi liegt. Alles andere ließe sich durch eine requirements.in abbilden
There was a problem hiding this comment.
Diskussion hier
TLDR: Wir sind wieder bei *.toml ohne *.in file wegen den formattern
NOTE: sollte gesquash-merged werden