Drop Python 3.7 support (#43805)
This commit is contained in:
parent
b651f63ef0
commit
2f486543df
6 changed files with 18 additions and 36 deletions
35
.github/workflows/ci.yaml
vendored
35
.github/workflows/ci.yaml
vendored
|
@ -11,7 +11,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CACHE_VERSION: 1
|
CACHE_VERSION: 1
|
||||||
DEFAULT_PYTHON: 3.7
|
DEFAULT_PYTHON: 3.8
|
||||||
PRE_COMMIT_HOME: ~/.cache/pre-commit
|
PRE_COMMIT_HOME: ~/.cache/pre-commit
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -521,13 +521,12 @@ jobs:
|
||||||
needs: prepare-tests
|
needs: prepare-tests
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7]
|
python-version: [3.8]
|
||||||
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
||||||
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:
|
||||||
|
@ -585,13 +584,12 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7, 3.8, 3.9]
|
python-version: [3.8, 3.9]
|
||||||
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
||||||
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:
|
||||||
|
@ -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') }}-${{ 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: |
|
||||||
# Temporary addition of cmake, needed to build some Python 3.9 packages
|
# Temporary addition of cmake, needed to build some Python 3.9 packages
|
||||||
|
@ -626,13 +623,12 @@ jobs:
|
||||||
needs: prepare-tests
|
needs: prepare-tests
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7]
|
python-version: [3.8]
|
||||||
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
||||||
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:
|
||||||
|
@ -661,13 +657,12 @@ jobs:
|
||||||
needs: prepare-tests
|
needs: prepare-tests
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7]
|
python-version: [3.8]
|
||||||
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
||||||
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:
|
||||||
|
@ -696,15 +691,14 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
group: [1, 2, 3, 4]
|
group: [1, 2, 3, 4]
|
||||||
python-version: [3.7, 3.8, 3.9]
|
python-version: [3.8, 3.9]
|
||||||
name: >-
|
name: >-
|
||||||
Run tests Python ${{ matrix.python-version }} (group ${{ matrix.group }})
|
Run tests Python ${{ matrix.python-version }} (group ${{ matrix.group }})
|
||||||
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
||||||
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:
|
||||||
|
@ -759,13 +753,12 @@ jobs:
|
||||||
needs: pytest
|
needs: pytest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7]
|
python-version: [3.8]
|
||||||
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
container: homeassistant/ci-azure:${{ matrix.python-version }}
|
||||||
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:
|
||||||
|
|
|
@ -14,8 +14,6 @@ pr:
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
containers:
|
containers:
|
||||||
- container: 37
|
|
||||||
image: homeassistant/ci-azure:3.7
|
|
||||||
- container: 38
|
- container: 38
|
||||||
image: homeassistant/ci-azure:3.8
|
image: homeassistant/ci-azure:3.8
|
||||||
repositories:
|
repositories:
|
||||||
|
@ -25,7 +23,7 @@ resources:
|
||||||
endpoint: "home-assistant"
|
endpoint: "home-assistant"
|
||||||
variables:
|
variables:
|
||||||
- name: PythonMain
|
- name: PythonMain
|
||||||
value: "37"
|
value: "38"
|
||||||
- name: versionHadolint
|
- name: versionHadolint
|
||||||
value: "v1.17.6"
|
value: "v1.17.6"
|
||||||
|
|
||||||
|
@ -150,8 +148,6 @@ stages:
|
||||||
strategy:
|
strategy:
|
||||||
maxParallel: 3
|
maxParallel: 3
|
||||||
matrix:
|
matrix:
|
||||||
Python37:
|
|
||||||
python.container: "37"
|
|
||||||
Python38:
|
Python38:
|
||||||
python.container: "38"
|
python.container: "38"
|
||||||
container: $[ variables['python.container'] ]
|
container: $[ variables['python.container'] ]
|
||||||
|
|
|
@ -108,8 +108,6 @@ async def _run_client(hass, client, interval):
|
||||||
await asyncio.sleep(interval)
|
await asyncio.sleep(interval)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
continue
|
continue
|
||||||
except asyncio.CancelledError:
|
|
||||||
raise
|
|
||||||
except Exception: # pylint: disable=broad-except
|
except Exception: # pylint: disable=broad-except
|
||||||
_LOGGER.exception("Unexpected exception, aborting arcam client")
|
_LOGGER.exception("Unexpected exception, aborting arcam client")
|
||||||
return
|
return
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
"""Support for system log."""
|
"""Support for system log."""
|
||||||
import asyncio
|
|
||||||
from collections import OrderedDict, deque
|
from collections import OrderedDict, deque
|
||||||
import logging
|
import logging
|
||||||
import queue
|
import queue
|
||||||
|
@ -165,8 +164,6 @@ class LogErrorQueueHandler(logging.handlers.QueueHandler):
|
||||||
"""Emit a log record."""
|
"""Emit a log record."""
|
||||||
try:
|
try:
|
||||||
self.enqueue(record)
|
self.enqueue(record)
|
||||||
except asyncio.CancelledError:
|
|
||||||
raise
|
|
||||||
except Exception: # pylint: disable=broad-except
|
except Exception: # pylint: disable=broad-except
|
||||||
self.handleError(record)
|
self.handleError(record)
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,10 @@ MINOR_VERSION = 2
|
||||||
PATCH_VERSION = "0.dev0"
|
PATCH_VERSION = "0.dev0"
|
||||||
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
||||||
__version__ = f"{__short_version__}.{PATCH_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.
|
# Truthy date string triggers showing related deprecation warning messages.
|
||||||
REQUIRED_NEXT_PYTHON_VER = (3, 8, 0)
|
REQUIRED_NEXT_PYTHON_VER = (3, 9, 0)
|
||||||
REQUIRED_NEXT_PYTHON_DATE = "December 7, 2020"
|
REQUIRED_NEXT_PYTHON_DATE = ""
|
||||||
|
|
||||||
# Format for platform files
|
# Format for platform files
|
||||||
PLATFORM_FORMAT = "{platform}.{domain}"
|
PLATFORM_FORMAT = "{platform}.{domain}"
|
||||||
|
|
|
@ -34,8 +34,6 @@ class HomeAssistantQueueHandler(logging.handlers.QueueHandler):
|
||||||
"""Emit a log record."""
|
"""Emit a log record."""
|
||||||
try:
|
try:
|
||||||
self.enqueue(record)
|
self.enqueue(record)
|
||||||
except asyncio.CancelledError:
|
|
||||||
raise
|
|
||||||
except Exception: # pylint: disable=broad-except
|
except Exception: # pylint: disable=broad-except
|
||||||
self.handleError(record)
|
self.handleError(record)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue