diff --git a/platypush/builder/_base.py b/platypush/builder/_base.py index 73cf69c8a..5bc139f47 100644 --- a/platypush/builder/_base.py +++ b/platypush/builder/_base.py @@ -5,7 +5,7 @@ import logging import os import pathlib import sys -from typing import Final, Optional, Sequence +from typing import Optional, Sequence from platypush.config import Config from platypush.utils.manifest import ( @@ -29,7 +29,7 @@ class BaseBuilder(ABC): and :module:`platypush.platydock` modules/scripts. """ - REPO_URL: Final[str] = 'https://github.com/BlackLight/platypush.git' + REPO_URL: str = 'https://github.com/BlackLight/platypush.git' """ We use the Github URL here rather than the self-hosted Gitea URL to prevent too many requests to the Gitea server. diff --git a/platypush/bus/redis.py b/platypush/bus/redis.py index 83ded8aff..40cd7350f 100644 --- a/platypush/bus/redis.py +++ b/platypush/bus/redis.py @@ -1,6 +1,6 @@ import logging import threading -from typing import Final, Optional +from typing import Optional from platypush.bus import Bus from platypush.message import Message @@ -13,7 +13,7 @@ class RedisBus(Bus): Overrides the in-process in-memory local bus with a Redis bus """ - DEFAULT_REDIS_QUEUE: Final[str] = 'platypush/bus' + DEFAULT_REDIS_QUEUE: str = 'platypush/bus' def __init__(self, *args, on_message=None, redis_queue=None, **kwargs): from platypush.utils import get_redis diff --git a/platypush/entities/_base.py b/platypush/entities/_base.py index 2a739124a..cc76450f3 100644 --- a/platypush/entities/_base.py +++ b/platypush/entities/_base.py @@ -7,7 +7,7 @@ import subprocess import sys import types from datetime import datetime -from typing import Callable, Dict, Final, List, Optional, Set, Type, Tuple, Any +from typing import Callable, Dict, List, Optional, Set, Type, Tuple, Any import pkgutil @@ -41,7 +41,7 @@ EntityKey = Tuple[str, str] EntityMapping = Dict[EntityKey, 'Entity'] """ Internal mapping for entities used for deduplication/merge/upsert. """ -_import_error_ignored_modules: Final[Set[str]] = {'bluetooth'} +_import_error_ignored_modules: Set[str] = {'bluetooth'} """ ImportError exceptions will be ignored for these entity submodules when imported dynamically. An ImportError for these modules means that some optional diff --git a/platypush/plugins/mqtt/_client.py b/platypush/plugins/mqtt/_client.py index 5ef0c9d4d..a82cd1ba8 100644 --- a/platypush/plugins/mqtt/_client.py +++ b/platypush/plugins/mqtt/_client.py @@ -2,14 +2,14 @@ from enum import IntEnum import logging import os import threading -from typing import Any, Callable, Dict, Final, Iterable, Optional, Union +from typing import Any, Callable, Dict, Iterable, Optional, Union import paho.mqtt.client as mqtt from platypush.config import Config MqttCallback = Callable[["MqttClient", Any, mqtt.MQTTMessage], Any] -DEFAULT_TIMEOUT: Final[int] = 30 +DEFAULT_TIMEOUT: int = 30 class MqttClient(mqtt.Client, threading.Thread):