Skip to content

Commit

Permalink
Update flake.lock
Browse files Browse the repository at this point in the history
...and remove `python38` from devShells, since it's no longer available
in nixos-unstable. (I.e. undo 61bcdbe -- not worth staying stuck on an
old version of unstable for the next 6 months since we can still test on
3.8 in CI.)
  • Loading branch information
jab committed Apr 1, 2024
1 parent 973718b commit 9266b41
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 19 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/update_flake_lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ name: update flake.lock
workflow_dispatch:
schedule:
# Third day of every third month at noon
#- cron: "0 12 3 */3 *"
# Wait till Dec 3 (by which point py38 will be EOL and Nix 24.11 will be out)
- cron: "0 12 3 12 *"
- cron: "0 12 3 */3 *"

jobs:
main:
Expand Down
2 changes: 1 addition & 1 deletion dev-deps/update_dev_dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ main() {
fi

local -r pip_compile_pfx="uv pip compile --upgrade"
for py in python3.12 python3.11 python3.10 python3.9 python3.8 pypy3.10 pypy3.9; do
for py in python3.12 python3.11 python3.10 python3.9 pypy3.10 pypy3.9; do
if ! $py -m sysconfig >/dev/null; then
log "Detected broken $py installation -> skipping"
continue
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@
python311
python310
python39
python38
pypy310
pypy39
uv
];
shellHook = ''
export HYPOTHESIS_EXPERIMENTAL_OBSERVABILITY=1
Expand Down
16 changes: 10 additions & 6 deletions init_dev_env
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare -r hint="Hint: Use 'nix develop' to bootstrap a development environment"

source ./dev-deps/dev.env

for cmd in "$DEFAULT_PY" uv pre-commit; do
for cmd in "$DEFAULT_PY" pre-commit; do
if ! type "$cmd"; then
>&2 echo "Error: No '$cmd' on PATH. $hint"
exit 1
Expand All @@ -23,7 +23,13 @@ done
pre-commit install -f

if ! test -d "$VENV_DIR"; then
uv venv --python="$DEFAULT_PY" "$VENV_DIR"
if type uv; then
uv venv --python="$DEFAULT_PY" "$VENV_DIR"
else
"$DEFAULT_PY" -m venv "$VENV_DIR"
source "$VENV_DIR"/bin/activate
pip install uv
fi
fi

declare -r req_sets="dev docs test"
Expand All @@ -34,13 +40,11 @@ for i in $req_sets; do
reqs_out="$out_dir/$i.txt"
# The following options should match those passed in dev-deps/update_dev_dependencies so that the
# resulting "autogenerated...via the following command:" comments match.
uv pip compile --upgrade --python-version="$DEFAULT_PY_VER" "$reqs_in" -o "$reqs_out"
uv pip compile --python-version="$DEFAULT_PY_VER" "$reqs_in" -o "$reqs_out"
done
uv pip sync "$out_dir"/*.txt

# TODO Use the following instead of the line after once we pick up a new enough uv (0.1.16+):
# if ! uv pip show -q bidict; then
if ! uv pip freeze | grep -q ^bidict; then
if ! uv pip show -q bidict; then
uv pip install -e .
fi

Expand Down
5 changes: 1 addition & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
# Use "python3.X" rather than "py3X" so env names match python executable names
python3.{12,11,10,9,8}
python3.{12,11,10,9}
pypy3.{10,9}
benchmark
lint
Expand Down Expand Up @@ -43,9 +43,6 @@ base_python = py310
[testenv:python3.9]
base_python = py39

[testenv:python3.8]
base_python = py38

[testenv:benchmark]
base_python = py3{[tox]_default_py_minor_ver}
deps = -r {[tox]_default_req_dir}/test.txt
Expand Down

0 comments on commit 9266b41

Please sign in to comment.