Upgrade pillow to 6.2.0 (#27581)

pull/27598/head
Fabian Affolter 2019-10-13 14:46:12 +02:00 committed by Martin Hjelmare
parent bb2a1cd439
commit bbafeb5da2
8 changed files with 21 additions and 26 deletions

View File

@ -3,7 +3,7 @@
"name": "Image processing",
"documentation": "https://www.home-assistant.io/integrations/image_processing",
"requirements": [
"pillow==6.1.0"
"pillow==6.2.0"
],
"dependencies": [
"camera"

View File

@ -1,12 +1,14 @@
"""Proxy camera platform that enables image processing of camera data."""
import asyncio
from datetime import timedelta
import io
import logging
from datetime import timedelta
from PIL import Image
import voluptuous as vol
from homeassistant.components.camera import PLATFORM_SCHEMA, Camera
from homeassistant.const import CONF_ENTITY_ID, CONF_NAME, CONF_MODE
from homeassistant.const import CONF_ENTITY_ID, CONF_MODE, CONF_NAME
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import config_validation as cv
import homeassistant.util.dt as dt_util
@ -58,9 +60,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
def _precheck_image(image, opts):
"""Perform some pre-checks on the given image."""
from PIL import Image
import io
if not opts:
raise ValueError()
try:
@ -77,9 +76,6 @@ def _precheck_image(image, opts):
def _resize_image(image, opts):
"""Resize image."""
from PIL import Image
import io
try:
img = _precheck_image(image, opts)
except ValueError:
@ -125,8 +121,6 @@ def _resize_image(image, opts):
def _crop_image(image, opts):
"""Crop image."""
import io
try:
img = _precheck_image(image, opts)
except ValueError:

View File

@ -3,7 +3,7 @@
"name": "Proxy",
"documentation": "https://www.home-assistant.io/integrations/proxy",
"requirements": [
"pillow==6.1.0"
"pillow==6.2.0"
],
"dependencies": [],
"codeowners": []

View File

@ -1 +1 @@
"""The qrcode component."""
"""The QR code component."""

View File

@ -1,15 +1,20 @@
"""Support for the QR image processing."""
from homeassistant.core import split_entity_id
"""Support for the QR code image processing."""
import io
from PIL import Image
from pyzbar import pyzbar
from homeassistant.components.image_processing import (
ImageProcessingEntity,
CONF_SOURCE,
CONF_ENTITY_ID,
CONF_NAME,
CONF_SOURCE,
ImageProcessingEntity,
)
from homeassistant.core import split_entity_id
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the demo image processing platform."""
"""Set up the QR code image processing platform."""
# pylint: disable=unused-argument
entities = []
for camera in config[CONF_SOURCE]:
@ -19,7 +24,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
class QrEntity(ImageProcessingEntity):
"""QR image processing entity."""
"""A QR image processing entity."""
def __init__(self, camera_entity, name):
"""Initialize QR image processing entity."""
@ -49,10 +54,6 @@ class QrEntity(ImageProcessingEntity):
def process_image(self, image):
"""Process image."""
import io
from pyzbar import pyzbar
from PIL import Image
stream = io.BytesIO(image)
img = Image.open(stream)

View File

@ -3,7 +3,7 @@
"name": "Qrcode",
"documentation": "https://www.home-assistant.io/integrations/qrcode",
"requirements": [
"pillow==6.1.0",
"pillow==6.2.0",
"pyzbar==0.1.7"
],
"dependencies": [],

View File

@ -953,7 +953,7 @@ pilight==0.1.1
# homeassistant.components.image_processing
# homeassistant.components.proxy
# homeassistant.components.qrcode
pillow==6.1.0
pillow==6.2.0
# homeassistant.components.dominos
pizzapi==0.0.3

View File

@ -328,7 +328,7 @@ pilight==0.1.1
# homeassistant.components.image_processing
# homeassistant.components.proxy
# homeassistant.components.qrcode
pillow==6.1.0
pillow==6.2.0
# homeassistant.components.plex
plexapi==3.0.6