Python 3.9 (#2886)

* Python 3.9

* Fix lint

* fix lint
This commit is contained in:
Pascal Vizeli 2021-05-14 13:57:56 +02:00 committed by GitHub
parent eb9ce8ea1f
commit cb9f998ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 13 deletions

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.8 FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.9
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive

View File

@ -35,7 +35,7 @@ on:
env: env:
BUILD_NAME: supervisor BUILD_NAME: supervisor
BUILD_TYPE: supervisor BUILD_TYPE: supervisor
WHEELS_TAG: 3.8-alpine3.13 WHEELS_TAG: 3.9-alpine3.13
jobs: jobs:
init: init:
@ -71,7 +71,7 @@ jobs:
- name: Check if requirements files changed - name: Check if requirements files changed
id: requirements id: requirements
run: | run: |
if [[ "${{ steps.changed_files.outputs.all }}" =~ requirements.txt ]]; then if [[ "${{ steps.changed_files.outputs.all }}" =~ (requirements.txt|build.json) ]]; then
echo "::set-output name=changed::true" echo "::set-output name=changed::true"
fi fi

View File

@ -8,7 +8,7 @@ on:
pull_request: ~ pull_request: ~
env: env:
DEFAULT_PYTHON: 3.8 DEFAULT_PYTHON: 3.9
PRE_COMMIT_HOME: ~/.cache/pre-commit PRE_COMMIT_HOME: ~/.cache/pre-commit
jobs: jobs:
@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: [3.8] python-version: [3.9]
name: Prepare Python ${{ matrix.python-version }} dependencies name: Prepare Python ${{ matrix.python-version }} dependencies
steps: steps:
- name: Check out code from GitHub - name: Check out code from GitHub
@ -343,7 +343,7 @@ jobs:
needs: prepare needs: prepare
strategy: strategy:
matrix: matrix:
python-version: [3.8] python-version: [3.9]
name: Run tests Python ${{ matrix.python-version }} name: Run tests Python ${{ matrix.python-version }}
steps: steps:
- name: Check out code from GitHub - name: Check out code from GitHub

View File

@ -1,6 +1,6 @@
repos: repos:
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 21.5b0 rev: 21.5b1
hooks: hooks:
- id: black - id: black
args: args:

View File

@ -2,11 +2,11 @@
"image": "homeassistant/{arch}-hassio-supervisor", "image": "homeassistant/{arch}-hassio-supervisor",
"shadow_repository": "ghcr.io/home-assistant", "shadow_repository": "ghcr.io/home-assistant",
"build_from": { "build_from": {
"aarch64": "ghcr.io/home-assistant/aarch64-base-python:3.8-alpine3.13", "aarch64": "ghcr.io/home-assistant/aarch64-base-python:3.9-alpine3.13",
"armhf": "ghcr.io/home-assistant/armhf-base-python:3.8-alpine3.13", "armhf": "ghcr.io/home-assistant/armhf-base-python:3.9-alpine3.13",
"armv7": "ghcr.io/home-assistant/armv7-base-python:3.8-alpine3.13", "armv7": "ghcr.io/home-assistant/armv7-base-python:3.9-alpine3.13",
"amd64": "ghcr.io/home-assistant/amd64-base-python:3.8-alpine3.13", "amd64": "ghcr.io/home-assistant/amd64-base-python:3.9-alpine3.13",
"i386": "ghcr.io/home-assistant/i386-base-python:3.8-alpine3.13" "i386": "ghcr.io/home-assistant/i386-base-python:3.9-alpine3.13"
}, },
"args": { "args": {
"VCN_VERSION": "0.9.4" "VCN_VERSION": "0.9.4"

View File

@ -37,6 +37,7 @@ disable=
too-many-return-statements, too-many-return-statements,
too-many-statements, too-many-statements,
unused-argument, unused-argument,
consider-using-with
[EXCEPTIONS] [EXCEPTIONS]
overgeneral-exceptions=Exception overgeneral-exceptions=Exception

View File

@ -5,7 +5,7 @@ flake8-docstrings==1.6.0
flake8==3.9.2 flake8==3.9.2
pre-commit==2.12.1 pre-commit==2.12.1
pydocstyle==6.0.0 pydocstyle==6.0.0
pylint==2.7.4 pylint==2.8.2
pytest-aiohttp==0.3.0 pytest-aiohttp==0.3.0
pytest-asyncio==0.12.0 # NB!: Versions over 0.12.0 breaks pytest-aiohttp (https://github.com/aio-libs/pytest-aiohttp/issues/16) pytest-asyncio==0.12.0 # NB!: Versions over 0.12.0 breaks pytest-aiohttp (https://github.com/aio-libs/pytest-aiohttp/issues/16)
pytest-cov==2.11.1 pytest-cov==2.11.1

View File

@ -303,6 +303,7 @@ def supervisor_debugger(coresys: CoreSys) -> None:
def setup_diagnostics(coresys: CoreSys) -> None: def setup_diagnostics(coresys: CoreSys) -> None:
"""Sentry diagnostic backend.""" """Sentry diagnostic backend."""
_LOGGER.info("Initializing Supervisor Sentry") _LOGGER.info("Initializing Supervisor Sentry")
# pylint: disable=abstract-class-instantiated
sentry_sdk.init( sentry_sdk.init(
dsn="https://9c6ea70f49234442b4746e447b24747e@o427061.ingest.sentry.io/5370612", dsn="https://9c6ea70f49234442b4746e447b24747e@o427061.ingest.sentry.io/5370612",
before_send=lambda event, hint: filter_data(coresys, event, hint), before_send=lambda event, hint: filter_data(coresys, event, hint),