Skip to content

Commit 66b673c

Browse files
authored
chore: make zeroconf._services.info compatible with Cython 3.1 (#1576)
1 parent 02eef34 commit 66b673c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/zeroconf/_services/info.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -577,15 +577,15 @@ def _process_record_threadsafe(self, zc: Zeroconf, record: DNSRecord, now: float
577577

578578
def dns_addresses(
579579
self,
580-
override_ttl: int | None = None,
580+
override_ttl: int_ | None = None,
581581
version: IPVersion = IPVersion.All,
582582
) -> list[DNSAddress]:
583583
"""Return matching DNSAddress from ServiceInfo."""
584584
return self._dns_addresses(override_ttl, version)
585585

586586
def _dns_addresses(
587587
self,
588-
override_ttl: int | None,
588+
override_ttl: int_ | None,
589589
version: IPVersion,
590590
) -> list[DNSAddress]:
591591
"""Return matching DNSAddress from ServiceInfo."""
@@ -611,11 +611,11 @@ def _dns_addresses(
611611
self._dns_address_cache = records
612612
return records
613613

614-
def dns_pointer(self, override_ttl: int | None = None) -> DNSPointer:
614+
def dns_pointer(self, override_ttl: int_ | None = None) -> DNSPointer:
615615
"""Return DNSPointer from ServiceInfo."""
616616
return self._dns_pointer(override_ttl)
617617

618-
def _dns_pointer(self, override_ttl: int | None) -> DNSPointer:
618+
def _dns_pointer(self, override_ttl: int_ | None) -> DNSPointer:
619619
"""Return DNSPointer from ServiceInfo."""
620620
cacheable = override_ttl is None
621621
if self._dns_pointer_cache is not None and cacheable:
@@ -632,11 +632,11 @@ def _dns_pointer(self, override_ttl: int | None) -> DNSPointer:
632632
self._dns_pointer_cache = record
633633
return record
634634

635-
def dns_service(self, override_ttl: int | None = None) -> DNSService:
635+
def dns_service(self, override_ttl: int_ | None = None) -> DNSService:
636636
"""Return DNSService from ServiceInfo."""
637637
return self._dns_service(override_ttl)
638638

639-
def _dns_service(self, override_ttl: int | None) -> DNSService:
639+
def _dns_service(self, override_ttl: int_ | None) -> DNSService:
640640
"""Return DNSService from ServiceInfo."""
641641
cacheable = override_ttl is None
642642
if self._dns_service_cache is not None and cacheable:
@@ -659,11 +659,11 @@ def _dns_service(self, override_ttl: int | None) -> DNSService:
659659
self._dns_service_cache = record
660660
return record
661661

662-
def dns_text(self, override_ttl: int | None = None) -> DNSText:
662+
def dns_text(self, override_ttl: int_ | None = None) -> DNSText:
663663
"""Return DNSText from ServiceInfo."""
664664
return self._dns_text(override_ttl)
665665

666-
def _dns_text(self, override_ttl: int | None) -> DNSText:
666+
def _dns_text(self, override_ttl: int_ | None) -> DNSText:
667667
"""Return DNSText from ServiceInfo."""
668668
cacheable = override_ttl is None
669669
if self._dns_text_cache is not None and cacheable:
@@ -680,11 +680,11 @@ def _dns_text(self, override_ttl: int | None) -> DNSText:
680680
self._dns_text_cache = record
681681
return record
682682

683-
def dns_nsec(self, missing_types: list[int], override_ttl: int | None = None) -> DNSNsec:
683+
def dns_nsec(self, missing_types: list[int], override_ttl: int_ | None = None) -> DNSNsec:
684684
"""Return DNSNsec from ServiceInfo."""
685685
return self._dns_nsec(missing_types, override_ttl)
686686

687-
def _dns_nsec(self, missing_types: list[int], override_ttl: int | None) -> DNSNsec:
687+
def _dns_nsec(self, missing_types: list[int], override_ttl: int_ | None) -> DNSNsec:
688688
"""Return DNSNsec from ServiceInfo."""
689689
return DNSNsec(
690690
self._name,
@@ -696,11 +696,11 @@ def _dns_nsec(self, missing_types: list[int], override_ttl: int | None) -> DNSNs
696696
0.0,
697697
)
698698

699-
def get_address_and_nsec_records(self, override_ttl: int | None = None) -> set[DNSRecord]:
699+
def get_address_and_nsec_records(self, override_ttl: int_ | None = None) -> set[DNSRecord]:
700700
"""Build a set of address records and NSEC records for non-present record types."""
701701
return self._get_address_and_nsec_records(override_ttl)
702702

703-
def _get_address_and_nsec_records(self, override_ttl: int | None) -> set[DNSRecord]:
703+
def _get_address_and_nsec_records(self, override_ttl: int_ | None) -> set[DNSRecord]:
704704
"""Build a set of address records and NSEC records for non-present record types."""
705705
cacheable = override_ttl is None
706706
if self._get_address_and_nsec_records_cache is not None and cacheable:

0 commit comments

Comments
 (0)