diff --git a/.github/workflows/update_flake_lock.yml b/.github/workflows/update_flake_lock.yml index 539cd7f6..2bb45f82 100644 --- a/.github/workflows/update_flake_lock.yml +++ b/.github/workflows/update_flake_lock.yml @@ -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: diff --git a/dev-deps/update_dev_dependencies b/dev-deps/update_dev_dependencies index d089e225..5a391bdd 100755 --- a/dev-deps/update_dev_dependencies +++ b/dev-deps/update_dev_dependencies @@ -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 diff --git a/flake.lock b/flake.lock index 97432bd4..c91eee3c 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1708475490, - "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", + "lastModified": 1711999357, + "narHash": "sha256-liWxQmi9pCYJZewdFZPv59CAcnGycBb+JVsrB5qYvP8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0e74ca98a74bc7270d28838369593635a5db3260", + "rev": "d7ebd1563730285df0ce50ecdd61975569ead37f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 30f55b65..741faae3 100644 --- a/flake.nix +++ b/flake.nix @@ -34,10 +34,8 @@ python311 python310 python39 - python38 pypy310 pypy39 - uv ]; shellHook = '' export HYPOTHESIS_EXPERIMENTAL_OBSERVABILITY=1 diff --git a/init_dev_env b/init_dev_env index 83fe1f33..f60fbd90 100755 --- a/init_dev_env +++ b/init_dev_env @@ -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 @@ -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" @@ -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 diff --git a/tox.ini b/tox.ini index b16c91a8..8ee48160 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -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