mirror of
https://github.com/home-assistant/core
synced 2024-10-04 18:52:36 +00:00
Upgrade to newer Python pip>=21.0 (#59769)
This commit is contained in:
parent
78d2fbb402
commit
da3024e162
2
.github/workflows/builder.yml
vendored
2
.github/workflows/builder.yml
vendored
|
@ -112,7 +112,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install packaging
|
python3 -m pip install packaging
|
||||||
python3 -m pip install .
|
python3 -m pip install --use-deprecated=legacy-resolver .
|
||||||
python3 script/version_bump.py nightly
|
python3 script/version_bump.py nightly
|
||||||
version="$(python setup.py -V)"
|
version="$(python setup.py -V)"
|
||||||
|
|
||||||
|
|
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
|
@ -191,8 +191,8 @@ jobs:
|
||||||
python -m venv venv
|
python -m venv venv
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
python --version
|
python --version
|
||||||
pip install --cache-dir=$PIP_CACHE -U "pip<20.3" setuptools wheel
|
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
|
pip install --cache-dir=$PIP_CACHE -r requirements.txt -r requirements_test.txt --use-deprecated=legacy-resolver
|
||||||
- name: Generate partial pre-commit restore key
|
- name: Generate partial pre-commit restore key
|
||||||
id: generate-pre-commit-key
|
id: generate-pre-commit-key
|
||||||
run: >-
|
run: >-
|
||||||
|
@ -583,9 +583,9 @@ jobs:
|
||||||
python -m venv venv
|
python -m venv venv
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
python --version
|
python --version
|
||||||
pip install --cache-dir=$PIP_CACHE -U "pip<20.3" setuptools wheel
|
pip install --cache-dir=$PIP_CACHE -U "pip>=21.0,<22.1" setuptools wheel
|
||||||
pip install --cache-dir=$PIP_CACHE -r requirements_all.txt
|
pip install --cache-dir=$PIP_CACHE -r requirements_all.txt --use-deprecated=legacy-resolver
|
||||||
pip install --cache-dir=$PIP_CACHE -r requirements_test.txt
|
pip install --cache-dir=$PIP_CACHE -r requirements_test.txt --use-deprecated=legacy-resolver
|
||||||
pip install -e .
|
pip install -e .
|
||||||
|
|
||||||
pylint:
|
pylint:
|
||||||
|
|
4
.vscode/tasks.json
vendored
4
.vscode/tasks.json
vendored
|
@ -88,7 +88,7 @@
|
||||||
{
|
{
|
||||||
"label": "Install all Requirements",
|
"label": "Install all Requirements",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "pip3 install -r requirements_all.txt",
|
"command": "pip3 install --use-deprecated=legacy-resolver -r requirements_all.txt",
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
{
|
{
|
||||||
"label": "Install all Test Requirements",
|
"label": "Install all Test Requirements",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "pip3 install -r requirements_test_all.txt",
|
"command": "pip3 install --use-deprecated=legacy-resolver -r requirements_test_all.txt",
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
|
|
|
@ -12,17 +12,17 @@ COPY requirements.txt homeassistant/
|
||||||
COPY homeassistant/package_constraints.txt homeassistant/homeassistant/
|
COPY homeassistant/package_constraints.txt homeassistant/homeassistant/
|
||||||
RUN \
|
RUN \
|
||||||
pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
|
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/
|
COPY requirements_all.txt homeassistant/
|
||||||
RUN \
|
RUN \
|
||||||
pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
|
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
|
## Setup Home Assistant Core
|
||||||
COPY . homeassistant/
|
COPY . homeassistant/
|
||||||
RUN \
|
RUN \
|
||||||
pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
|
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
|
&& python3 -m compileall homeassistant/homeassistant
|
||||||
|
|
||||||
# Fix Bug with Alpine 3.14 and sqlite 3.35
|
# Fix Bug with Alpine 3.14 and sqlite 3.35
|
||||||
|
|
|
@ -33,9 +33,9 @@ WORKDIR /workspaces
|
||||||
# Install Python dependencies from requirements
|
# Install Python dependencies from requirements
|
||||||
COPY requirements.txt ./
|
COPY requirements.txt ./
|
||||||
COPY homeassistant/package_constraints.txt homeassistant/package_constraints.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 ./
|
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/
|
RUN rm -rf requirements.txt requirements_test.txt requirements_test_pre_commit.txt homeassistant/
|
||||||
|
|
||||||
# Set the default shell to bash instead of sh
|
# Set the default shell to bash instead of sh
|
||||||
|
|
|
@ -21,7 +21,7 @@ ifaddr==0.1.7
|
||||||
jinja2==3.0.3
|
jinja2==3.0.3
|
||||||
paho-mqtt==1.6.1
|
paho-mqtt==1.6.1
|
||||||
pillow==9.0.1
|
pillow==9.0.1
|
||||||
pip>=8.0.3,<20.3
|
pip>=21.0,<22.1
|
||||||
pyserial==3.5
|
pyserial==3.5
|
||||||
python-slugify==4.0.1
|
python-slugify==4.0.1
|
||||||
pyudev==0.22.0
|
pyudev==0.22.0
|
||||||
|
|
|
@ -15,7 +15,7 @@ ifaddr==0.1.7
|
||||||
jinja2==3.0.3
|
jinja2==3.0.3
|
||||||
PyJWT==2.1.0
|
PyJWT==2.1.0
|
||||||
cryptography==35.0.0
|
cryptography==35.0.0
|
||||||
pip>=8.0.3,<20.3
|
pip>=21.0,<22.1
|
||||||
python-slugify==4.0.1
|
python-slugify==4.0.1
|
||||||
pyyaml==6.0
|
pyyaml==6.0
|
||||||
requests==2.27.1
|
requests==2.27.1
|
||||||
|
|
|
@ -8,4 +8,4 @@ cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
echo "Installing development dependencies..."
|
echo "Installing development dependencies..."
|
||||||
python3 -m pip install wheel --constraint homeassistant/package_constraints.txt
|
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
|
||||||
|
|
|
@ -24,7 +24,7 @@ fi
|
||||||
script/bootstrap
|
script/bootstrap
|
||||||
|
|
||||||
pre-commit install
|
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
|
hass --script ensure_config -c config
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ install_requires =
|
||||||
PyJWT==2.1.0
|
PyJWT==2.1.0
|
||||||
# PyJWT has loose dependency. We want the latest one.
|
# PyJWT has loose dependency. We want the latest one.
|
||||||
cryptography==35.0.0
|
cryptography==35.0.0
|
||||||
pip>=8.0.3,<20.3
|
pip>=21.0,<22.1
|
||||||
python-slugify==4.0.1
|
python-slugify==4.0.1
|
||||||
pyyaml==6.0
|
pyyaml==6.0
|
||||||
requests==2.27.1
|
requests==2.27.1
|
||||||
|
|
3
tox.ini
3
tox.ini
|
@ -6,7 +6,8 @@ ignore_basepython_conflict = True
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = {env:PYTHON3_PATH:python3}
|
basepython = {env:PYTHON3_PATH:python3}
|
||||||
# pip version duplicated in homeassistant/package_constraints.txt
|
# 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 =
|
commands =
|
||||||
{envpython} -X dev -m pytest --timeout=9 --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar {posargs}
|
{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
|
{toxinidir}/script/check_dirty
|
||||||
|
|
Loading…
Reference in a new issue