8000 feat: speed up AsyncServiceInfo · python-zeroconf/python-zeroconf@e2e45c8 · GitHub
[go: up one dir, main page]

Skip to content

Commit e2e45c8

Browse files
committed
feat: speed up AsyncServiceInfo
previously we subclassed ServiceInfo for AsyncServiceInfo but since its the same now, its faster to assign it as it avoids the slowdown of subclassed objects with cython
1 parent 6a48fac commit e2e45c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/zeroconf/_services/info.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -955,5 +955,7 @@ def __repr__(self) -> str:
955955
)
956956

957957

958-
class AsyncServiceInfo(ServiceInfo):
959-
"""An async version of ServiceInfo."""
958+
# Alias for backwards compatibility since
959+
# all async methods are now available on the
960+
# ServiceInfo object itself.
961+
AsyncServiceInfo = ServiceInfo

0 commit comments

Comments
 (0)
0