Block typing from being installed (#37707)

pull/39283/head
Paulus Schoutsen 2020-08-26 14:51:41 +02:00 committed by GitHub
parent df9de8eb5d
commit e96d8a961c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 42 deletions

View File

@ -50,10 +50,6 @@ jobs:
. venv/bin/activate . venv/bin/activate
pip install -U pip setuptools pip install -U pip setuptools
pip install -r requirements.txt -r requirements_test.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`
pip uninstall -y typing
- name: Restore pre-commit environment from cache - name: Restore pre-commit environment from cache
id: cache-precommit id: cache-precommit
uses: actions/cache@v2 uses: actions/cache@v2
@ -595,8 +591,7 @@ jobs:
steps: steps:
- name: Check out code from GitHub - name: Check out code from GitHub
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: - name: Restore full Python ${{ matrix.python-version }} virtual environment
Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv id: cache-venv
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
@ -610,8 +605,7 @@ jobs:
${{ env.CACHE_VERSION}}-${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements_test.txt') }}-${{ hashFiles('requirements_all.txt') }} ${{ env.CACHE_VERSION}}-${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements_test.txt') }}-${{ hashFiles('requirements_all.txt') }}
${{ env.CACHE_VERSION}}-${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements_test.txt') }} ${{ env.CACHE_VERSION}}-${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements_test.txt') }}
${{ env.CACHE_VERSION}}-${{ runner.os }}-venv-${{ matrix.python-version }}- ${{ env.CACHE_VERSION}}-${{ runner.os }}-venv-${{ matrix.python-version }}-
- name: - name: Create full Python ${{ matrix.python-version }} virtual environment
Create full Python ${{ matrix.python-version }} virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true' if: steps.cache-venv.outputs.cache-hit != 'true'
run: | run: |
python -m venv venv python -m venv venv
@ -619,10 +613,6 @@ jobs:
pip install -U pip setuptools wheel pip install -U pip setuptools wheel
pip install -r requirements_all.txt pip install -r requirements_all.txt
pip install -r requirements_test.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`
pip uninstall -y typing
pip install -e . pip install -e .
pylint: pylint:
@ -636,8 +626,7 @@ jobs:
steps: steps:
- name: Check out code from GitHub - name: Check out code from GitHub
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: - name: Restore full Python ${{ matrix.python-version }} virtual environment
Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv id: cache-venv
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
@ -671,8 +660,7 @@ jobs:
steps: steps:
- name: Check out code from GitHub - name: Check out code from GitHub
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: - name: Restore full Python ${{ matrix.python-version }} virtual environment
Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv id: cache-venv
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
@ -708,8 +696,7 @@ jobs:
steps: steps:
- name: Check out code from GitHub - name: Check out code from GitHub
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: - name: Restore full Python ${{ matrix.python-version }} virtual environment
Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv id: cache-venv
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
@ -769,8 +756,7 @@ jobs:
steps: steps:
- name: Check out code from GitHub - name: Check out code from GitHub
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: - name: Restore full Python ${{ matrix.python-version }} virtual environment
Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv id: cache-venv
uses: actions/cache@v2 uses: actions/cache@v2
with: with:

View File

@ -11,7 +11,6 @@ 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}" \
-r homeassistant/requirements_all.txt \ -r homeassistant/requirements_all.txt \
&& pip3 uninstall -y typing \
&& 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 \
&& python3 -m compileall homeassistant/homeassistant && python3 -m compileall homeassistant/homeassistant

View File

@ -166,9 +166,6 @@ stages:
. venv/bin/activate . venv/bin/activate
pip install -U pip setuptools pytest-azurepipelines pytest-xdist -c homeassistant/package_constraints.txt pip install -U pip setuptools pytest-azurepipelines pytest-xdist -c homeassistant/package_constraints.txt
pip install -r requirements_test_all.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
- script: | - script: |
. venv/bin/activate . venv/bin/activate
pip install -e . pip install -e .
@ -211,9 +208,6 @@ stages:
pip install -U pip setuptools wheel pip install -U pip setuptools wheel
pip install -r requirements_all.txt pip install -r requirements_all.txt
pip install -r requirements_test.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
- script: | - script: |
. venv/bin/activate . venv/bin/activate
pip install -e . pip install -e .

View File

@ -1,4 +1,5 @@
{ {
"disabled": "Dependency contains code that breaks Home Assistant.",
"domain": "hdmi_cec", "domain": "hdmi_cec",
"name": "HDMI-CEC", "name": "HDMI-CEC",
"documentation": "https://www.home-assistant.io/integrations/hdmi_cec", "documentation": "https://www.home-assistant.io/integrations/hdmi_cec",

View File

@ -1,4 +1,5 @@
{ {
"disabled": "Dependency contains code that breaks Home Assistant.",
"domain": "miflora", "domain": "miflora",
"name": "Mi Flora", "name": "Mi Flora",
"documentation": "https://www.home-assistant.io/integrations/miflora", "documentation": "https://www.home-assistant.io/integrations/miflora",

View File

@ -39,11 +39,11 @@ urllib3>=1.24.3
# Constrain httplib2 to protect against CVE-2020-11078 # Constrain httplib2 to protect against CVE-2020-11078
httplib2>=0.18.0 httplib2>=0.18.0
# Not needed for our supported Python versions
enum34==1000000000.0.0
# This is a old unmaintained library and is replaced with pycryptodome # This is a old unmaintained library and is replaced with pycryptodome
pycrypto==1000000000.0.0 pycrypto==1000000000.0.0
# This is built-in and breaks pip if installed # This overrides a built-in Python package
enum34==1000000000.0.0
typing==1000000000.0.0
uuid==1000000000.0.0 uuid==1000000000.0.0

View File

@ -361,7 +361,6 @@ blinkstick==1.1.8
blockchain==1.4.4 blockchain==1.4.4
# homeassistant.components.decora # homeassistant.components.decora
# homeassistant.components.miflora
# bluepy==1.3.0 # bluepy==1.3.0
# homeassistant.components.bme680 # homeassistant.components.bme680
@ -913,9 +912,6 @@ meteofrance-api==0.1.1
# homeassistant.components.mfi # homeassistant.components.mfi
mficlient==0.3.0 mficlient==0.3.0
# homeassistant.components.miflora
miflora==0.6.0
# homeassistant.components.mill # homeassistant.components.mill
millheater==0.3.4 millheater==0.3.4
@ -1177,9 +1173,6 @@ py-synology==0.2.0
# homeassistant.components.seventeentrack # homeassistant.components.seventeentrack
py17track==2.2.2 py17track==2.2.2
# homeassistant.components.hdmi_cec
pyCEC==0.4.13
# homeassistant.components.control4 # homeassistant.components.control4
pyControl4==0.0.6 pyControl4==0.0.6

View File

@ -68,14 +68,14 @@ urllib3>=1.24.3
# Constrain httplib2 to protect against CVE-2020-11078 # Constrain httplib2 to protect against CVE-2020-11078
httplib2>=0.18.0 httplib2>=0.18.0
# Not needed for our supported Python versions
enum34==1000000000.0.0
# This is a old unmaintained library and is replaced with pycryptodome # This is a old unmaintained library and is replaced with pycryptodome
pycrypto==1000000000.0.0 pycrypto==1000000000.0.0
# This is built-in and breaks pip if installed # This overrides a built-in Python package
enum34==1000000000.0.0
typing==1000000000.0.0
uuid==1000000000.0.0 uuid==1000000000.0.0
""" """
IGNORE_PRE_COMMIT_HOOK_ID = ( IGNORE_PRE_COMMIT_HOOK_ID = (