GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Supertype query discards subtype in result · Issue #1093 · python-zeroconf/python-zeroconf

Supertype query discards subtype in result #1093

New issue
Copy link
New issue
Copy link
Open
Open
Supertype query discards subtype in result#1093
Copy link

Description

@Erhannis
Erhannis
opened on Oct 6, 2022
Issue body actions

If a device is advertising a service of type "_blah._http._tcp.local.", but I've set ServiceBrowser to filter for its supertype "_http._tcp.local.", then in

    def add_service(self, zc: Zeroconf, type_: str, name: str) -> None:
        info = zc.get_service_info(type_, name)

the type_, and info.type, are both the supertype "_http._tcp.local.", rather than the actual type of the service. IMO, the actual type ought to be accessible. A key point seems to be here:
https://github.com/jstasiak/python-zeroconf/blob/7430ce1c462be0dd210712b4f7b3675efd3a6963/zeroconf/_services/browser.py#L355
wherein the actual type is split into a list of it and its supertypes, I guess? Probably then there's something that filters the resulting events, and only the one keyed to the supertype succeeds.

Desired result: get_service_info ought to include the actual type of the service, and possibly type_ in add_service et al. ought to be the actual type, too, though I'm less convinced of that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.