summaryrefslogtreecommitdiff
path: root/src/apscheduler/eventbrokers
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2022-07-31 00:28:30 +0300
committerAlex Grönholm <alex.gronholm@nextday.fi>2022-07-31 00:28:30 +0300
commitd33f393557f84b3bfaa0b0c714671da00f75606c (patch)
treea428da9905ef93030a2980ff213d41dc6d347b56 /src/apscheduler/eventbrokers
parentb1b45ba4e987b4efa91e4b7d0d744f50dccf5637 (diff)
downloadapscheduler-d33f393557f84b3bfaa0b0c714671da00f75606c.tar.gz
Made the apscheduler.events module private and re-exported its code
Diffstat (limited to 'src/apscheduler/eventbrokers')
-rw-r--r--src/apscheduler/eventbrokers/async_adapter.py4
-rw-r--r--src/apscheduler/eventbrokers/async_local.py2
-rw-r--r--src/apscheduler/eventbrokers/asyncpg.py2
-rw-r--r--src/apscheduler/eventbrokers/base.py6
-rw-r--r--src/apscheduler/eventbrokers/local.py2
-rw-r--r--src/apscheduler/eventbrokers/mqtt.py2
-rw-r--r--src/apscheduler/eventbrokers/redis.py2
7 files changed, 10 insertions, 10 deletions
diff --git a/src/apscheduler/eventbrokers/async_adapter.py b/src/apscheduler/eventbrokers/async_adapter.py
index 4c1cb6c..4ff08a5 100644
--- a/src/apscheduler/eventbrokers/async_adapter.py
+++ b/src/apscheduler/eventbrokers/async_adapter.py
@@ -6,8 +6,8 @@ import attrs
from anyio import to_thread
from anyio.from_thread import BlockingPortal
-from apscheduler.abc import AsyncEventBroker, EventBroker, Subscription
-from apscheduler.events import Event
+from .._events import Event
+from ..abc import AsyncEventBroker, EventBroker, Subscription
@attrs.define(eq=False)
diff --git a/src/apscheduler/eventbrokers/async_local.py b/src/apscheduler/eventbrokers/async_local.py
index dba37f1..e5a68db 100644
--- a/src/apscheduler/eventbrokers/async_local.py
+++ b/src/apscheduler/eventbrokers/async_local.py
@@ -7,8 +7,8 @@ import attrs
from anyio import create_task_group
from anyio.abc import TaskGroup
+from .._events import Event
from ..abc import AsyncEventBroker
-from ..events import Event
from .base import BaseEventBroker
diff --git a/src/apscheduler/eventbrokers/asyncpg.py b/src/apscheduler/eventbrokers/asyncpg.py
index 33aa618..0aad2c9 100644
--- a/src/apscheduler/eventbrokers/asyncpg.py
+++ b/src/apscheduler/eventbrokers/asyncpg.py
@@ -8,9 +8,9 @@ from anyio import TASK_STATUS_IGNORED, CancelScope, sleep
from asyncpg import Connection
from asyncpg.pool import Pool
+from .._events import Event
from .._exceptions import SerializationError
from ..abc import Serializer
-from ..events import Event
from ..serializers.json import JSONSerializer
from .async_local import LocalAsyncEventBroker
from .base import DistributedEventBrokerMixin
diff --git a/src/apscheduler/eventbrokers/base.py b/src/apscheduler/eventbrokers/base.py
index ea30c10..1373d54 100644
--- a/src/apscheduler/eventbrokers/base.py
+++ b/src/apscheduler/eventbrokers/base.py
@@ -6,10 +6,10 @@ from typing import Any, Callable, Iterable
import attrs
-from .. import events
+from .. import _events
+from .._events import Event
from .._exceptions import DeserializationError
from ..abc import EventSource, Serializer, Subscription
-from ..events import Event
@attrs.define(eq=False, frozen=True)
@@ -75,7 +75,7 @@ class DistributedEventBrokerMixin:
return None
try:
- event_class = getattr(events, event_type)
+ event_class = getattr(_events, event_type)
except AttributeError:
self._logger.error(
"Receive notification for a nonexistent event type: %s",
diff --git a/src/apscheduler/eventbrokers/local.py b/src/apscheduler/eventbrokers/local.py
index a870c45..8c59b0b 100644
--- a/src/apscheduler/eventbrokers/local.py
+++ b/src/apscheduler/eventbrokers/local.py
@@ -8,8 +8,8 @@ from typing import Any, Callable, Iterable
import attrs
+from .._events import Event
from ..abc import EventBroker, Subscription
-from ..events import Event
from .base import BaseEventBroker
diff --git a/src/apscheduler/eventbrokers/mqtt.py b/src/apscheduler/eventbrokers/mqtt.py
index 9b0f859..2526f60 100644
--- a/src/apscheduler/eventbrokers/mqtt.py
+++ b/src/apscheduler/eventbrokers/mqtt.py
@@ -8,8 +8,8 @@ from paho.mqtt.client import Client, MQTTMessage
from paho.mqtt.properties import Properties
from paho.mqtt.reasoncodes import ReasonCodes
+from .._events import Event
from ..abc import Serializer
-from ..events import Event
from ..serializers.json import JSONSerializer
from .base import DistributedEventBrokerMixin
from .local import LocalEventBroker
diff --git a/src/apscheduler/eventbrokers/redis.py b/src/apscheduler/eventbrokers/redis.py
index a41ef37..853d14a 100644
--- a/src/apscheduler/eventbrokers/redis.py
+++ b/src/apscheduler/eventbrokers/redis.py
@@ -6,8 +6,8 @@ from threading import Thread
import attrs
from redis import ConnectionPool, Redis
+from .._events import Event
from ..abc import Serializer
-from ..events import Event
from ..serializers.json import JSONSerializer
from .base import DistributedEventBrokerMixin
from .local import LocalEventBroker