From 9476d5b96540c31b1593e321d718415551446760 Mon Sep 17 00:00:00 2001 From: Brendon Smith Date: Mon, 1 Nov 2021 20:06:50 -0400 Subject: [PATCH] Disable Poetry experimental new installer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit python-poetry/poetry#3811 python-poetry/poetry#4210 Poetry installs are erroring with `JSONDecodeError`s in GitHub Actions: ```text poetry install --no-interaction -E fastapi [debug]/usr/bin/bash -e /home/runner/work/_temp/a14b9406-8aff-4354-80a9-ac90fef13c11.sh Creating virtualenv inboard in /home/runner/work/inboard/inboard/.venv Installing dependencies from lock file Package operations: 53 installs, 0 updates, 0 removals • Installing six (1.16.0) JSONDecodeError Expecting value: line 1 column 1 (char 0) at /opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/json/decoder.py:355 in raw_decode 351│ """ 352│ try: 353│ obj, end = self.scan_once(s, idx) 354│ except StopIteration as err: → 355│ raise JSONDecodeError("Expecting value", s, err.value) from None 356│ return obj, end 357│ ``` `poetry cache clear --all pypi --no-interaction` does not fix the issue. Removing the actions/cache step for Poetry fixes the issue. Disabling the experimental new installer also fixes the issue. Disable installer with `poetry config experimental.new-installer false`, which updates poetry.toml. Additionally, the setting is not correctly implemented as a Boolean, so `export POETRY_EXPERIMENTAL_NEW_INSTALLER=false` does not disable the installer (python-poetry/poetry#3811). It can be set to an empty string, or disabled using `poetry config experimental.new-installer false` and updating poetry.toml. This commit will disable the experimental new installer in poetry.toml. --- poetry.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/poetry.toml b/poetry.toml index ab1033b..9255596 100644 --- a/poetry.toml +++ b/poetry.toml @@ -1,2 +1,5 @@ +[experimental] +new-installer = false + [virtualenvs] in-project = true