Drop Python 3.7 support (#43805)

This commit is contained in:
Franck Nijhof 2021-01-01 13:47:01 +01:00 committed by GitHub
parent b651f63ef0
commit 2f486543df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 36 deletions

View File

@ -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:

View File

@ -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'] ]

View File

@ -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

View File

@ -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)

View File

@ -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}"

View File

@ -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)