diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 74d692efb94..e51fd074f72 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,7 +48,7 @@ jobs: python -m venv venv . venv/bin/activate pip install -U pip setuptools - pip install -r requirements.txt -r requirements_test.txt -c homeassistant/package_constraints.txt + pip install -r requirements.txt -r requirements_test.txt # Uninstalling typing as a workaround. Eventually we should make sure # all our dependencies drop typing. # Find offending deps with `pipdeptree -r -p typing` @@ -583,8 +583,7 @@ jobs: steps: - name: Check out code from GitHub uses: actions/checkout@v2 - - name: - Restore full Python ${{ matrix.python-version }} virtual environment + - name: Restore full Python ${{ matrix.python-version }} virtual environment id: cache-venv uses: actions/cache@v2 with: @@ -598,15 +597,14 @@ jobs: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements_test.txt') }}-${{ hashFiles('requirements_all.txt') }} ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements_test.txt') }} ${{ runner.os }}-venv-${{ matrix.python-version }}- - - name: - Create full Python ${{ matrix.python-version }} virtual environment + - name: Create full Python ${{ matrix.python-version }} virtual environment if: steps.cache-venv.outputs.cache-hit != 'true' run: | python -m venv venv . venv/bin/activate pip install -U pip setuptools wheel - pip install -r requirements_all.txt -c homeassistant/package_constraints.txt - pip install -r requirements_test.txt -c homeassistant/package_constraints.txt + pip install -r requirements_all.txt + pip install -r requirements_test.txt # Uninstalling typing as a workaround. Eventually we should make sure # all our dependencies drop typing. # Find offending deps with `pipdeptree -r -p typing` @@ -624,8 +622,7 @@ jobs: steps: - name: Check out code from GitHub uses: actions/checkout@v2 - - name: - Restore full Python ${{ matrix.python-version }} virtual environment + - name: Restore full Python ${{ matrix.python-version }} virtual environment id: cache-venv uses: actions/cache@v2 with: @@ -659,8 +656,7 @@ jobs: steps: - name: Check out code from GitHub uses: actions/checkout@v2 - - name: - Restore full Python ${{ matrix.python-version }} virtual environment + - name: Restore full Python ${{ matrix.python-version }} virtual environment id: cache-venv uses: actions/cache@v2 with: @@ -696,8 +692,7 @@ jobs: steps: - name: Check out code from GitHub uses: actions/checkout@v2 - - name: - Restore full Python ${{ matrix.python-version }} virtual environment + - name: Restore full Python ${{ matrix.python-version }} virtual environment id: cache-venv uses: actions/cache@v2 with: @@ -757,8 +752,7 @@ jobs: steps: - name: Check out code from GitHub uses: actions/checkout@v2 - - name: - Restore full Python ${{ matrix.python-version }} virtual environment + - name: Restore full Python ${{ matrix.python-version }} virtual environment id: cache-venv uses: actions/cache@v2 with: diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 975899d3113..6b2975f1b20 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -44,7 +44,7 @@ stages: python -m venv venv . venv/bin/activate - pip install -r requirements_test.txt -c homeassistant/package_constraints.txt + pip install -r requirements_test.txt pre-commit install-hooks - script: | . venv/bin/activate @@ -117,7 +117,7 @@ stages: python -m venv venv . venv/bin/activate - pip install -r requirements_test.txt -c homeassistant/package_constraints.txt + pip install -r requirements_test.txt pre-commit install-hooks - script: | . venv/bin/activate @@ -165,7 +165,7 @@ stages: . venv/bin/activate pip install -U pip setuptools pytest-azurepipelines pytest-xdist -c homeassistant/package_constraints.txt - pip install -r requirements_test_all.txt -c homeassistant/package_constraints.txt + pip install -r requirements_test_all.txt # This is a TEMP. Eventually we should make sure our 4 dependencies drop typing. # Find offending deps with `pipdeptree -r -p typing` pip uninstall -y typing @@ -209,8 +209,8 @@ stages: . venv/bin/activate pip install -U pip setuptools wheel - pip install -r requirements_all.txt -c homeassistant/package_constraints.txt - pip install -r requirements_test.txt -c homeassistant/package_constraints.txt + pip install -r requirements_all.txt + pip install -r requirements_test.txt # This is a TEMP. Eventually we should make sure our 4 dependencies drop typing. # Find offending deps with `pipdeptree -r -p typing` pip uninstall -y typing @@ -234,7 +234,7 @@ stages: python -m venv venv . venv/bin/activate - pip install -e . -r requirements_test.txt -c homeassistant/package_constraints.txt + pip install -e . -r requirements_test.txt pre-commit install-hooks - script: | . venv/bin/activate diff --git a/azure-pipelines-wheels.yml b/azure-pipelines-wheels.yml index 6a96cb1abc8..41755209360 100644 --- a/azure-pipelines-wheels.yml +++ b/azure-pipelines-wheels.yml @@ -17,7 +17,7 @@ schedules: - dev variables: - name: versionWheels - value: '1.12.4-3.8-alpine3.12' + value: '1.13.0-3.8-alpine3.12' resources: repositories: - repository: azure diff --git a/requirements.txt b/requirements.txt index 0c7fb44f3b5..93a95112658 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ +-c homeassistant/package_constraints.txt + # Home Assistant Core aiohttp==3.6.1 astral==1.10.1 diff --git a/requirements_all.txt b/requirements_all.txt index 67270006ded..1854f732e3a 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1,24 +1,6 @@ # Home Assistant Core, full dependency set - -aiohttp==3.6.1 -astral==1.10.1 -async_timeout==3.0.1 -attrs==19.3.0 -bcrypt==3.1.7 -certifi>=2020.4.5.1 -ciso8601==2.1.3 -importlib-metadata==1.6.0;python_version<'3.8' -jinja2>=2.11.1 -PyJWT==1.7.1 -cryptography==2.9.2 -pip>=8.0.3 -python-slugify==4.0.0 -pytz>=2020.1 -pyyaml==5.3.1 -requests==2.24.0 -ruamel.yaml==0.15.100 -voluptuous==0.11.7 -voluptuous-serialize==2.4.0 +-c homeassistant/package_constraints.txt +-r requirements.txt # homeassistant.components.nuimo_controller --only-binary=all nuimo==0.1.0 diff --git a/requirements_test.txt b/requirements_test.txt index 61606f6ef3b..44977fd8904 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -2,6 +2,7 @@ # make new things fail. Manually update these pins when pulling in a # new version +-c homeassistant/package_constraints.txt -r requirements_test_pre_commit.txt asynctest==0.13.0 codecov==2.1.0 @@ -20,4 +21,4 @@ pytest-timeout==1.3.4 pytest-xdist==1.32.0 pytest==5.4.3 requests_mock==1.8.0 -responses==0.10.6 \ No newline at end of file +responses==0.10.6 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 2eeffea0e55..06ef38544d9 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1,6 +1,7 @@ # Home Assistant tests, full dependency set # Automatically generated by gen_requirements_all.py, do not edit +-c homeassistant/package_constraints.txt -r requirements_test.txt # homeassistant.components.homekit diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index e3c9e17bf25..d3e4d5c63fc 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -224,9 +224,11 @@ def generate_requirements_list(reqs): def requirements_output(reqs): """Generate output for requirements.""" - output = [] - output.append("# Home Assistant Core") - output.append("\n") + output = [ + "-c homeassistant/package_constraints.txt\n", + "\n", + "# Home Assistant Core\n", + ] output.append("\n".join(core_requirements())) output.append("\n") @@ -235,11 +237,11 @@ def requirements_output(reqs): def requirements_all_output(reqs): """Generate output for requirements_all.""" - output = [] - output.append("# Home Assistant Core, full dependency set\n") - output.append("\n") - output.append("\n".join(core_requirements())) - output.append("\n") + output = [ + "# Home Assistant Core, full dependency set\n" + "-c homeassistant/package_constraints.txt\n", + "-r requirements.txt\n", + ] output.append(generate_requirements_list(reqs)) return "".join(output) @@ -247,11 +249,12 @@ def requirements_all_output(reqs): def requirements_test_output(reqs): """Generate output for test_requirements.""" - output = [] - output.append("# Home Assistant tests, full dependency set\n") - output.append( - f"# Automatically generated by {Path(__file__).name}, do not edit\n\n" - ) + output = [ + "# Home Assistant tests, full dependency set\n", + f"# Automatically generated by {Path(__file__).name}, do not edit\n", + "\n", + "-c homeassistant/package_constraints.txt\n", + ] output.append("-r requirements_test.txt\n") filtered = {