Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
import ifaddr


from zeroconf.core import Zeroconf
from zeroconf._dns import DNSIncoming
from zeroconf import DNSIncoming, Zeroconf


def _inject_response(zc: Zeroconf, msg: DNSIncoming) -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_aio.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import pytest

from zeroconf.aio import AsyncServiceInfo, AsyncServiceListener, AsyncZeroconf
from zeroconf.core import Zeroconf
from zeroconf import Zeroconf
from zeroconf.const import _LISTENER_TIME
from zeroconf.exceptions import BadTypeInNameException, NonUniqueNameException, ServiceNameAlreadyRegistered
from zeroconf.services import ServiceInfo, ServiceListener
Expand Down
6 changes: 3 additions & 3 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from typing import cast

import zeroconf as r
from zeroconf import core
from zeroconf import _core
from zeroconf import const

from . import has_working_ipv6, _inject_response
Expand All @@ -35,9 +35,9 @@ def teardown_module():


class TestReaper(unittest.TestCase):
@unittest.mock.patch.object(core, "_CACHE_CLEANUP_INTERVAL", 10)
@unittest.mock.patch.object(_core, "_CACHE_CLEANUP_INTERVAL", 10)
def test_reaper(self):
zeroconf = core.Zeroconf(interfaces=['127.0.0.1'])
zeroconf = _core.Zeroconf(interfaces=['127.0.0.1'])
cache = zeroconf.cache
original_entries = list(itertools.chain(*[cache.entries_with_name(name) for name in cache.names()]))
record_with_10s_ttl = r.DNSAddress('a', const._TYPE_SOA, const._CLASS_IN, 10, b'a')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import zeroconf as r
from zeroconf import const
import zeroconf.services as s
from zeroconf.core import Zeroconf
from zeroconf import Zeroconf
from zeroconf.services import (
ServiceBrowser,
ServiceInfo,
Expand Down
2 changes: 1 addition & 1 deletion zeroconf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import sys

from .cache import DNSCache # noqa # import needed for backwards compat
from .core import NotifyListener, Zeroconf # noqa # import needed for backwards compat
from ._core import NotifyListener, Zeroconf # noqa # import needed for backwards compat
from ._dns import ( # noqa # import needed for backwards compat
DNSAddress,
DNSEntry,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion zeroconf/aio.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
from types import TracebackType # noqa # used in type hints
from typing import Awaitable, Callable, Dict, List, Optional, Type, Union

from ._core import NotifyListener, Zeroconf
from ._dns import DNSOutgoing
from .const import _BROWSER_TIME, _CHECK_TIME, _LISTENER_TIME, _MDNS_PORT, _REGISTER_TIME, _UNREGISTER_TIME
from .core import NotifyListener, Zeroconf
from .exceptions import NonUniqueNameException
from .services import ServiceInfo, _ServiceBrowserBase, instance_name_from_service_info
from .utils.aio import wait_condition_or_timeout
Expand Down
2 changes: 1 addition & 1 deletion zeroconf/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

if TYPE_CHECKING:
# https://github.com/PyCQA/pylint/issues/3525
from .core import Zeroconf # pylint: disable=cyclic-import
from ._core import Zeroconf # pylint: disable=cyclic-import


class QueryHandler:
Expand Down
2 changes: 1 addition & 1 deletion zeroconf/services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

if TYPE_CHECKING:
# https://github.com/PyCQA/pylint/issues/3525
from ..core import Zeroconf # pylint: disable=cyclic-import
from .._core import Zeroconf # pylint: disable=cyclic-import


@enum.unique
Expand Down
2 changes: 1 addition & 1 deletion zeroconf/services/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import time
from typing import Optional, Set, Tuple, Union

from .._core import Zeroconf
from ..const import _SERVICE_TYPE_ENUMERATION_NAME
from ..core import Zeroconf
from ..services import ServiceBrowser, ServiceListener
from ..utils.net import IPVersion, InterfaceChoice, InterfacesType

Expand Down