diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index 37e220521677a2dc400052aa525d37ad27ffbfa2..1ede9c62e165431e2aa4d93f87e0c17adbf9bb0e 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -112,7 +112,7 @@ jobs: shell: bash run: | python3 -m pip install packaging - python3 -m pip install . + python3 -m pip install --use-deprecated=legacy-resolver . python3 script/version_bump.py nightly version="$(python setup.py -V)" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f4563b18bbff67bc7c85caa185f3625edc23097f..321cb7f622b2d85ef27b2993a181b6bd6bea4ad9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -191,8 +191,8 @@ jobs: python -m venv venv . venv/bin/activate python --version - pip install --cache-dir=$PIP_CACHE -U "pip<20.3" setuptools wheel - pip install --cache-dir=$PIP_CACHE -r requirements.txt -r requirements_test.txt + pip install --cache-dir=$PIP_CACHE -U "pip>=21.0,<22.1" setuptools wheel + pip install --cache-dir=$PIP_CACHE -r requirements.txt -r requirements_test.txt --use-deprecated=legacy-resolver - name: Generate partial pre-commit restore key id: generate-pre-commit-key run: >- @@ -583,9 +583,9 @@ jobs: python -m venv venv . venv/bin/activate python --version - pip install --cache-dir=$PIP_CACHE -U "pip<20.3" setuptools wheel - pip install --cache-dir=$PIP_CACHE -r requirements_all.txt - pip install --cache-dir=$PIP_CACHE -r requirements_test.txt + pip install --cache-dir=$PIP_CACHE -U "pip>=21.0,<22.1" setuptools wheel + pip install --cache-dir=$PIP_CACHE -r requirements_all.txt --use-deprecated=legacy-resolver + pip install --cache-dir=$PIP_CACHE -r requirements_test.txt --use-deprecated=legacy-resolver pip install -e . pylint: diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 3fecfd8ba4801d43dd7e0b3b58c588fd47d42ce0..d71571d2594db55aff37574cfff29c95953ea8e3 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -88,7 +88,7 @@ { "label": "Install all Requirements", "type": "shell", - "command": "pip3 install -r requirements_all.txt", + "command": "pip3 install --use-deprecated=legacy-resolver -r requirements_all.txt", "group": { "kind": "build", "isDefault": true @@ -102,7 +102,7 @@ { "label": "Install all Test Requirements", "type": "shell", - "command": "pip3 install -r requirements_test_all.txt", + "command": "pip3 install --use-deprecated=legacy-resolver -r requirements_test_all.txt", "group": { "kind": "build", "isDefault": true diff --git a/Dockerfile b/Dockerfile index a4d5ce3045dc13960c5c11a73a20c5bf50359931..1d6ce675e74da5b76b203a62266da1a4aee93149 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,17 +12,17 @@ COPY requirements.txt homeassistant/ COPY homeassistant/package_constraints.txt homeassistant/homeassistant/ RUN \ pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \ - -r homeassistant/requirements.txt + -r homeassistant/requirements.txt --use-deprecated=legacy-resolver COPY requirements_all.txt homeassistant/ RUN \ pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \ - -r homeassistant/requirements_all.txt + -r homeassistant/requirements_all.txt --use-deprecated=legacy-resolver ## Setup Home Assistant Core COPY . homeassistant/ RUN \ pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \ - -e ./homeassistant \ + -e ./homeassistant --use-deprecated=legacy-resolver \ && python3 -m compileall homeassistant/homeassistant # Fix Bug with Alpine 3.14 and sqlite 3.35 diff --git a/Dockerfile.dev b/Dockerfile.dev index b908bf01a32ce9a0aaad7ec2dec76965f49a21b0..39ce36074ad4b188da059016e6ea8d56bef954ba 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -33,9 +33,9 @@ WORKDIR /workspaces # Install Python dependencies from requirements COPY requirements.txt ./ COPY homeassistant/package_constraints.txt homeassistant/package_constraints.txt -RUN pip3 install -r requirements.txt +RUN pip3 install -r requirements.txt --use-deprecated=legacy-resolver COPY requirements_test.txt requirements_test_pre_commit.txt ./ -RUN pip3 install -r requirements_test.txt +RUN pip3 install -r requirements_test.txt --use-deprecated=legacy-resolver RUN rm -rf requirements.txt requirements_test.txt requirements_test_pre_commit.txt homeassistant/ # Set the default shell to bash instead of sh diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 5cded6a179d9e1e9c9dbca93eccc5da71cc19dfd..18ed69348b02b54bc07b08e743494fca6b0a9c67 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -21,7 +21,7 @@ ifaddr==0.1.7 jinja2==3.0.3 paho-mqtt==1.6.1 pillow==9.0.1 -pip>=8.0.3,<20.3 +pip>=21.0,<22.1 pyserial==3.5 python-slugify==4.0.1 pyudev==0.22.0 diff --git a/requirements.txt b/requirements.txt index c8ee1d91368ac7ca6c9a7d4cc3d421c1cc2f9252..b907cc50cbb33d0da6deec68717c16260014ba8a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ ifaddr==0.1.7 jinja2==3.0.3 PyJWT==2.1.0 cryptography==35.0.0 -pip>=8.0.3,<20.3 +pip>=21.0,<22.1 python-slugify==4.0.1 pyyaml==6.0 requests==2.27.1 diff --git a/script/bootstrap b/script/bootstrap index b641ec7e8c0384834fa6ad3e16233bd6c6be0812..5040a322b620561b32599a4cda2de78f3294d275 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -8,4 +8,4 @@ cd "$(dirname "$0")/.." echo "Installing development dependencies..." python3 -m pip install wheel --constraint homeassistant/package_constraints.txt -python3 -m pip install tox tox-pip-version colorlog pre-commit $(grep mypy requirements_test.txt) $(grep stdlib-list requirements_test.txt) $(grep tqdm requirements_test.txt) $(grep pipdeptree requirements_test.txt) $(grep awesomeversion requirements.txt) --constraint homeassistant/package_constraints.txt +python3 -m pip install tox tox-pip-version colorlog pre-commit $(grep mypy requirements_test.txt) $(grep stdlib-list requirements_test.txt) $(grep tqdm requirements_test.txt) $(grep pipdeptree requirements_test.txt) $(grep awesomeversion requirements.txt) --constraint homeassistant/package_constraints.txt --use-deprecated=legacy-resolver diff --git a/script/setup b/script/setup index f827c3a373f5a3646d6812a7a913f96b01a7876c..210779eec4580ac800036dda57dd025f4b0bb8ca 100755 --- a/script/setup +++ b/script/setup @@ -24,7 +24,7 @@ fi script/bootstrap pre-commit install -python3 -m pip install -e . --constraint homeassistant/package_constraints.txt +python3 -m pip install -e . --constraint homeassistant/package_constraints.txt --use-deprecated=legacy-resolver hass --script ensure_config -c config diff --git a/setup.cfg b/setup.cfg index 061e0bbc0cbe64f8fb605dcebe1582b5fbdcee0e..75d7905ff0eebb2d930a6148dc102037247f5dbc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,7 +48,7 @@ install_requires = PyJWT==2.1.0 # PyJWT has loose dependency. We want the latest one. cryptography==35.0.0 - pip>=8.0.3,<20.3 + pip>=21.0,<22.1 python-slugify==4.0.1 pyyaml==6.0 requests==2.27.1 diff --git a/tox.ini b/tox.ini index af2f99619561580265c7af32e214314e3ac0c5ee..b47a6c94ac87f9a1bbf10415ea00761be44ad7b9 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,8 @@ ignore_basepython_conflict = True [testenv] basepython = {env:PYTHON3_PATH:python3} # pip version duplicated in homeassistant/package_constraints.txt -pip_version = pip>=8.0.3,<20.3 +pip_version = pip>=21.0,<22.1 +install_command = python -m pip install --use-deprecated legacy-resolver {opts} {packages} commands = {envpython} -X dev -m pytest --timeout=9 --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar {posargs} {toxinidir}/script/check_dirty