Remove legacy pip resolver (#92124)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
89d8bda4ba
commit
cdbffee781
20 changed files with 22 additions and 98 deletions
|
@ -137,7 +137,6 @@ other: &other
|
|||
requirements: &requirements
|
||||
- .github/workflows/**
|
||||
- homeassistant/package_constraints.txt
|
||||
- script/pip_check
|
||||
- requirements*.txt
|
||||
- pyproject.toml
|
||||
|
||||
|
|
2
.github/workflows/builder.yml
vendored
2
.github/workflows/builder.yml
vendored
|
@ -140,7 +140,7 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
python3 -m pip install packaging tomli
|
||||
python3 -m pip install --use-deprecated=legacy-resolver .
|
||||
python3 -m pip install .
|
||||
version="$(python3 script/version_bump.py nightly)"
|
||||
|
||||
if [[ "$(ls home_assistant_frontend*.whl)" =~ ^home_assistant_frontend-(.*)-py3-none-any.whl$ ]]; then
|
||||
|
|
40
.github/workflows/ci.yaml
vendored
40
.github/workflows/ci.yaml
vendored
|
@ -544,8 +544,8 @@ jobs:
|
|||
. venv/bin/activate
|
||||
python --version
|
||||
pip install --cache-dir=$PIP_CACHE -U "pip>=21.0,<23.2" 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 --cache-dir=$PIP_CACHE -r requirements_all.txt
|
||||
pip install --cache-dir=$PIP_CACHE -r requirements_test.txt
|
||||
pip install -e .
|
||||
|
||||
hassfest:
|
||||
|
@ -719,42 +719,6 @@ jobs:
|
|||
python --version
|
||||
mypy homeassistant/components/${{ needs.info.outputs.integrations_glob }}
|
||||
|
||||
pip-check:
|
||||
runs-on: ubuntu-22.04
|
||||
if: |
|
||||
github.event.inputs.pylint-only != 'true'
|
||||
&& github.event.inputs.mypy-only != 'true'
|
||||
needs:
|
||||
- info
|
||||
- base
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ${{ fromJson(needs.info.outputs.python_versions) }}
|
||||
name: Run pip check ${{ matrix.python-version }}
|
||||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v3.5.2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
id: python
|
||||
uses: actions/setup-python@v4.6.0
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
check-latest: true
|
||||
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
id: cache-venv
|
||||
uses: actions/cache/restore@v3.3.1
|
||||
with:
|
||||
path: venv
|
||||
fail-on-cache-miss: true
|
||||
key: >-
|
||||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
|
||||
needs.info.outputs.python_cache_key }}
|
||||
- name: Run pip check
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
./script/pip_check $PIP_CACHE
|
||||
|
||||
pytest:
|
||||
runs-on: ubuntu-22.04
|
||||
if: |
|
||||
|
|
4
.github/workflows/wheels.yml
vendored
4
.github/workflows/wheels.yml
vendored
|
@ -187,7 +187,6 @@ jobs:
|
|||
env-file: true
|
||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
|
||||
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
|
||||
legacy: true
|
||||
constraints: "homeassistant/package_constraints.txt"
|
||||
requirements-diff: "requirements_diff.txt"
|
||||
requirements: "requirements_all.txtaa"
|
||||
|
@ -202,7 +201,6 @@ jobs:
|
|||
env-file: true
|
||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
|
||||
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
|
||||
legacy: true
|
||||
constraints: "homeassistant/package_constraints.txt"
|
||||
requirements-diff: "requirements_diff.txt"
|
||||
requirements: "requirements_all.txtab"
|
||||
|
@ -334,7 +332,6 @@ jobs:
|
|||
env-file: true
|
||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
|
||||
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
|
||||
legacy: true
|
||||
constraints: "homeassistant/package_constraints.txt"
|
||||
requirements-diff: "requirements_diff.txt"
|
||||
requirements: "requirements_all.txtaa"
|
||||
|
@ -349,7 +346,6 @@ jobs:
|
|||
env-file: true
|
||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
|
||||
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
|
||||
legacy: true
|
||||
constraints: "homeassistant/package_constraints.txt"
|
||||
requirements-diff: "requirements_diff.txt"
|
||||
requirements: "requirements_all.txtab"
|
||||
|
|
4
.vscode/tasks.json
vendored
4
.vscode/tasks.json
vendored
|
@ -103,7 +103,7 @@
|
|||
{
|
||||
"label": "Install all Requirements",
|
||||
"type": "shell",
|
||||
"command": "pip3 install --use-deprecated=legacy-resolver -r requirements_all.txt",
|
||||
"command": "pip3 install -r requirements_all.txt",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
|
@ -117,7 +117,7 @@
|
|||
{
|
||||
"label": "Install all Test Requirements",
|
||||
"type": "shell",
|
||||
"command": "pip3 install --use-deprecated=legacy-resolver -r requirements_test_all.txt",
|
||||
"command": "pip3 install -r requirements_test_all.txt",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
|
|
|
@ -18,7 +18,6 @@ RUN \
|
|||
--no-index \
|
||||
--only-binary=:all: \
|
||||
--find-links "${WHEELS_LINKS}" \
|
||||
--use-deprecated=legacy-resolver \
|
||||
-r homeassistant/requirements.txt
|
||||
|
||||
COPY requirements_all.txt home_assistant_frontend-* home_assistant_intents-* homeassistant/
|
||||
|
@ -43,7 +42,6 @@ RUN \
|
|||
--no-index \
|
||||
--only-binary=:all: \
|
||||
--find-links "${WHEELS_LINKS}" \
|
||||
--use-deprecated=legacy-resolver \
|
||||
-r homeassistant/requirements_all.txt
|
||||
|
||||
## Setup Home Assistant Core
|
||||
|
@ -54,7 +52,6 @@ RUN \
|
|||
--no-index \
|
||||
--only-binary=:all: \
|
||||
--find-links "${WHEELS_LINKS}" \
|
||||
--use-deprecated=legacy-resolver \
|
||||
-e ./homeassistant \
|
||||
&& python3 -m compileall \
|
||||
homeassistant/homeassistant
|
||||
|
|
|
@ -45,9 +45,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 --use-deprecated=legacy-resolver
|
||||
RUN pip3 install -r requirements.txt
|
||||
COPY requirements_test.txt requirements_test_pre_commit.txt ./
|
||||
RUN pip3 install -r requirements_test.txt --use-deprecated=legacy-resolver
|
||||
RUN pip3 install -r requirements_test.txt
|
||||
RUN rm -rf requirements.txt requirements_test.txt requirements_test_pre_commit.txt homeassistant/
|
||||
|
||||
# Set the default shell to bash instead of sh
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"domain": "mycroft",
|
||||
"name": "Mycroft",
|
||||
"codeowners": [],
|
||||
"disabled": "Dependencies not compatible with the new pip resolver",
|
||||
"documentation": "https://www.home-assistant.io/integrations/mycroft",
|
||||
"iot_class": "local_push",
|
||||
"loggers": ["mycroftapi"],
|
||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
|
||||
import logging
|
||||
|
||||
from mycroftapi import MycroftAPI
|
||||
from mycroftapi import MycroftAPI # pylint: disable=import-error
|
||||
|
||||
from homeassistant.components.notify import BaseNotificationService
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
|
|
@ -3,7 +3,7 @@ from datetime import timedelta
|
|||
import ipaddress
|
||||
import logging
|
||||
|
||||
from pysmarty import Smarty
|
||||
from pysmarty import Smarty # pylint: disable=import-error
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import CONF_HOST, CONF_NAME, Platform
|
||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
|
||||
import logging
|
||||
|
||||
from pysmarty import Smarty
|
||||
from pysmarty import Smarty # pylint: disable=import-error
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
BinarySensorDeviceClass,
|
||||
|
|
|
@ -5,7 +5,7 @@ import logging
|
|||
import math
|
||||
from typing import Any
|
||||
|
||||
from pysmarty import Smarty
|
||||
from pysmarty import Smarty # pylint: disable=import-error
|
||||
|
||||
from homeassistant.components.fan import FanEntity, FanEntityFeature
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"domain": "smarty",
|
||||
"name": "Salda Smarty",
|
||||
"codeowners": ["@z0mbieprocess"],
|
||||
"disabled": "Dependencies not compatible with the new pip resolver",
|
||||
"documentation": "https://www.home-assistant.io/integrations/smarty",
|
||||
"iot_class": "local_polling",
|
||||
"loggers": ["pymodbus", "pysmarty"],
|
||||
|
|
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||
import datetime as dt
|
||||
import logging
|
||||
|
||||
from pysmarty import Smarty
|
||||
from pysmarty import Smarty # pylint: disable=import-error
|
||||
|
||||
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
||||
from homeassistant.const import UnitOfTemperature
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"domain": "watson_tts",
|
||||
"name": "IBM Watson TTS",
|
||||
"codeowners": ["@rutkai"],
|
||||
"disabled": "Dependencies not compatible with the new pip resolver",
|
||||
"documentation": "https://www.home-assistant.io/integrations/watson_tts",
|
||||
"iot_class": "cloud_push",
|
||||
"loggers": ["ibm_cloud_sdk_core", "ibm_watson"],
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
"""Support for IBM Watson TTS integration."""
|
||||
import logging
|
||||
|
||||
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
|
||||
from ibm_watson import TextToSpeechV1
|
||||
from ibm_cloud_sdk_core.authenticators import ( # pylint: disable=import-error
|
||||
IAMAuthenticator,
|
||||
)
|
||||
from ibm_watson import TextToSpeechV1 # pylint: disable=import-error
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.tts import PLATFORM_SCHEMA, Provider
|
||||
|
|
|
@ -949,9 +949,6 @@ iaqualink==0.5.0
|
|||
# homeassistant.components.ibeacon
|
||||
ibeacon_ble==1.0.1
|
||||
|
||||
# homeassistant.components.watson_tts
|
||||
ibm-watson==5.2.2
|
||||
|
||||
# homeassistant.components.watson_iot
|
||||
ibmiotf==0.3.4
|
||||
|
||||
|
@ -1162,9 +1159,6 @@ mutagen==1.46.0
|
|||
# homeassistant.components.mutesync
|
||||
mutesync==0.0.1
|
||||
|
||||
# homeassistant.components.mycroft
|
||||
mycroftapi==2.0
|
||||
|
||||
# homeassistant.components.nad
|
||||
nad_receiver==0.3.0
|
||||
|
||||
|
@ -1977,9 +1971,6 @@ pysmartapp==0.3.3
|
|||
# homeassistant.components.smartthings
|
||||
pysmartthings==0.7.6
|
||||
|
||||
# homeassistant.components.smarty
|
||||
pysmarty==0.8
|
||||
|
||||
# homeassistant.components.edl21
|
||||
pysml==0.0.10
|
||||
|
||||
|
|
|
@ -8,5 +8,5 @@ cd "$(dirname "$0")/.."
|
|||
|
||||
echo "Installing development dependencies..."
|
||||
python3 -m pip install wheel --constraint homeassistant/package_constraints.txt --upgrade
|
||||
python3 -m pip install colorlog pre-commit $(grep awesomeversion requirements.txt) --constraint homeassistant/package_constraints.txt --use-deprecated=legacy-resolver --upgrade
|
||||
python3 -m pip install -r requirements_test.txt -c homeassistant/package_constraints.txt --use-deprecated legacy-resolver --upgrade
|
||||
python3 -m pip install colorlog pre-commit $(grep awesomeversion requirements.txt) --constraint homeassistant/package_constraints.txt --upgrade
|
||||
python3 -m pip install -r requirements_test.txt -c homeassistant/package_constraints.txt --upgrade
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/bash
|
||||
PIP_CACHE=$1
|
||||
|
||||
# Number of existing dependency conflicts
|
||||
# Update if a PR resolves one!
|
||||
DEPENDENCY_CONFLICTS=3
|
||||
|
||||
PIP_CHECK=$(pip check --cache-dir=$PIP_CACHE)
|
||||
LINE_COUNT=$(echo "$PIP_CHECK" | wc -l)
|
||||
echo "$PIP_CHECK"
|
||||
|
||||
if [[ $((LINE_COUNT)) -gt $DEPENDENCY_CONFLICTS ]]
|
||||
then
|
||||
echo "------"
|
||||
echo "Requirements change added another dependency conflict."
|
||||
echo "Make sure to check the 'pip check' output above!"
|
||||
echo "Expected $DEPENDENCY_CONFLICTS conflicts, got $LINE_COUNT."
|
||||
exit 1
|
||||
elif [[ $((LINE_COUNT)) -lt $DEPENDENCY_CONFLICTS ]]
|
||||
then
|
||||
echo "------"
|
||||
echo "It seems like this PR resolves $((
|
||||
DEPENDENCY_CONFLICTS - LINE_COUNT)) dependency conflicts."
|
||||
echo "Please update the 'DEPENDENCY_CONFLICTS' constant "
|
||||
echo "in 'script/pip_check' to help prevent regressions."
|
||||
echo "Update it to: $((LINE_COUNT))"
|
||||
exit 1
|
||||
fi
|
|
@ -24,7 +24,7 @@ fi
|
|||
script/bootstrap
|
||||
|
||||
pre-commit install
|
||||
python3 -m pip install -e . --constraint homeassistant/package_constraints.txt --use-deprecated=legacy-resolver
|
||||
python3 -m pip install -e . --constraint homeassistant/package_constraints.txt
|
||||
python3 -m script.translations develop --all
|
||||
|
||||
hass --script ensure_config -c config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue