diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c39185f3073..7c1c8bac6b6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ on: env: CACHE_VERSION: 1 - DEFAULT_PYTHON: 3.7 + DEFAULT_PYTHON: 3.8 PRE_COMMIT_HOME: ~/.cache/pre-commit jobs: @@ -521,13 +521,12 @@ jobs: needs: prepare-tests strategy: matrix: - python-version: [3.7] + python-version: [3.8] container: homeassistant/ci-azure:${{ matrix.python-version }} 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: @@ -585,13 +584,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.8, 3.9] container: homeassistant/ci-azure:${{ matrix.python-version }} 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: @@ -605,8 +603,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') }} ${{ env.CACHE_VERSION}}-${{ 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: | # Temporary addition of cmake, needed to build some Python 3.9 packages @@ -626,13 +623,12 @@ jobs: needs: prepare-tests strategy: matrix: - python-version: [3.7] + python-version: [3.8] container: homeassistant/ci-azure:${{ matrix.python-version }} 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: @@ -661,13 +657,12 @@ jobs: needs: prepare-tests strategy: matrix: - python-version: [3.7] + python-version: [3.8] container: homeassistant/ci-azure:${{ matrix.python-version }} 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,15 +691,14 @@ jobs: strategy: matrix: group: [1, 2, 3, 4] - python-version: [3.7, 3.8, 3.9] + python-version: [3.8, 3.9] name: >- Run tests Python ${{ matrix.python-version }} (group ${{ matrix.group }}) container: homeassistant/ci-azure:${{ matrix.python-version }} 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: @@ -759,13 +753,12 @@ jobs: needs: pytest strategy: matrix: - python-version: [3.7] + python-version: [3.8] container: homeassistant/ci-azure:${{ matrix.python-version }} 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 613e386b249..cda5943ecd0 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -14,8 +14,6 @@ pr: resources: containers: - - container: 37 - image: homeassistant/ci-azure:3.7 - container: 38 image: homeassistant/ci-azure:3.8 repositories: @@ -25,7 +23,7 @@ resources: endpoint: "home-assistant" variables: - name: PythonMain - value: "37" + value: "38" - name: versionHadolint value: "v1.17.6" @@ -150,8 +148,6 @@ stages: strategy: maxParallel: 3 matrix: - Python37: - python.container: "37" Python38: python.container: "38" container: $[ variables['python.container'] ] diff --git a/homeassistant/components/arcam_fmj/__init__.py b/homeassistant/components/arcam_fmj/__init__.py index 0175dfd6586..686e7c2de16 100644 --- a/homeassistant/components/arcam_fmj/__init__.py +++ b/homeassistant/components/arcam_fmj/__init__.py @@ -108,8 +108,6 @@ async def _run_client(hass, client, interval): await asyncio.sleep(interval) except asyncio.TimeoutError: continue - except asyncio.CancelledError: - raise except Exception: # pylint: disable=broad-except _LOGGER.exception("Unexpected exception, aborting arcam client") return diff --git a/homeassistant/components/system_log/__init__.py b/homeassistant/components/system_log/__init__.py index bb255ba8bf3..9c868724d9b 100644 --- a/homeassistant/components/system_log/__init__.py +++ b/homeassistant/components/system_log/__init__.py @@ -1,5 +1,4 @@ """Support for system log.""" -import asyncio from collections import OrderedDict, deque import logging import queue @@ -165,8 +164,6 @@ class LogErrorQueueHandler(logging.handlers.QueueHandler): """Emit a log record.""" try: self.enqueue(record) - except asyncio.CancelledError: - raise except Exception: # pylint: disable=broad-except self.handleError(record) diff --git a/homeassistant/const.py b/homeassistant/const.py index 1a191441990..15ea6b7b00d 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -4,10 +4,10 @@ MINOR_VERSION = 2 PATCH_VERSION = "0.dev0" __short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__ = f"{__short_version__}.{PATCH_VERSION}" -REQUIRED_PYTHON_VER = (3, 7, 1) +REQUIRED_PYTHON_VER = (3, 8, 0) # Truthy date string triggers showing related deprecation warning messages. -REQUIRED_NEXT_PYTHON_VER = (3, 8, 0) -REQUIRED_NEXT_PYTHON_DATE = "December 7, 2020" +REQUIRED_NEXT_PYTHON_VER = (3, 9, 0) +REQUIRED_NEXT_PYTHON_DATE = "" # Format for platform files PLATFORM_FORMAT = "{platform}.{domain}" diff --git a/homeassistant/util/logging.py b/homeassistant/util/logging.py index 2f202165550..feef339a200 100644 --- a/homeassistant/util/logging.py +++ b/homeassistant/util/logging.py @@ -34,8 +34,6 @@ class HomeAssistantQueueHandler(logging.handlers.QueueHandler): """Emit a log record.""" try: self.enqueue(record) - except asyncio.CancelledError: - raise except Exception: # pylint: disable=broad-except self.handleError(record)