René's URL Explorer Experiment


Title: feat: add opt-in periodic interface-change monitor by bdraco · Pull Request #1798 · python-zeroconf/python-zeroconf · GitHub

Open Graph Title: feat: add opt-in periodic interface-change monitor by bdraco · Pull Request #1798 · python-zeroconf/python-zeroconf

X Title: feat: add opt-in periodic interface-change monitor by bdraco · Pull Request #1798 · python-zeroconf/python-zeroconf

Description: Summary Adds an opt-in poller that watches for adapter changes and calls async_update_interfaces when the set of interface addresses changes, so a consumer with no native interface-change signal can self-heal without restarting Zeroconf. It is off by default; interface change detection stays platform specific and left to the consumer, this is just a convenience for callers that want it. Stacked on #1797. Details New InterfaceMonitor in _utils/interface_monitor.py polls ifaddr.get_adapters every interval seconds (default 5), diffs a hashable snapshot of adapter index plus address, and rescans only on change. A rescan failure is logged and swallowed so a transient error does not kill the monitor; the next change still triggers a rescan. Surfaced as async_start_interface_monitor / async_stop_interface_monitor on Zeroconf and AsyncZeroconf; the monitor task is cancelled and awaited on close. Consumers that already get adapter-change events (for example Home Assistant) should keep calling async_update_interfaces directly and skip the monitor. Test plan tests/test_interface_monitor.py covers the snapshot helper, rescan on change, no rescan when unchanged, surviving a rescan error, start and stop idempotency, stop without start, and cancellation on close. interface_monitor.py at 100 percent; full monitor, rescan, and engine suites green; pre-commit run clean.

Open Graph Description: Summary Adds an opt-in poller that watches for adapter changes and calls async_update_interfaces when the set of interface addresses changes, so a consumer with no native interface-change signal ca...

X Description: Summary Adds an opt-in poller that watches for adapter changes and calls async_update_interfaces when the set of interface addresses changes, so a consumer with no native interface-change signal ca...

Opengraph URL: https://github.com/python-zeroconf/python-zeroconf/pull/1798

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:5b06800e-7700-607b-c0f0-637a30afbdd4
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEBB2:22A7FA:2A463C:38B658:6B00870D
html-safe-noncee0bc2ad6065dfa30376f8d19cf31b2ff435e5a856f55b68840c7557ea5770d1c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkIyOjIyQTdGQToyQTQ2M0M6MzhCNjU4OjZCMDA4NzBEIiwidmlzaXRvcl9pZCI6IjQ4NTE1NjI0MTc2MDUzNDcwODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac5da427d60c3d08f4ad18dbb684707512cd39d9c12f574a6ff6bab2badb841f69
hovercard-subject-tagpull_request:3908198631
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-zeroconf/python-zeroconf/pull/1798/files
twitter:imagehttps://avatars.githubusercontent.com/u/663432?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/663432?s=400&v=4
og:image:altSummary Adds an opt-in poller that watches for adapter changes and calls async_update_interfaces when the set of interface addresses changes, so a consumer with no native interface-change signal ca...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4d3d8e50f02c1d7bf86d5acfa1d3bfe9366abd6528a6b429eb07a168429d2b61
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python-zeroconf/python-zeroconf git https://github.com/python-zeroconf/python-zeroconf.git
octolytics-dimension-user_id120192235
octolytics-dimension-user_loginpython-zeroconf
octolytics-dimension-repository_id21548731
octolytics-dimension-repository_nwopython-zeroconf/python-zeroconf
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id21548731
octolytics-dimension-repository_network_root_nwopython-zeroconf/python-zeroconf
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedb758f8e02b8257935fb03edf81a3e76eb3abd11
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-zeroconf/python-zeroconf/pull/1798/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-zeroconf%2Fpython-zeroconf%2Fpull%2F1798%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-zeroconf%2Fpython-zeroconf%2Fpull%2F1798%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python-zeroconf%2Fpython-zeroconf
Reloadhttps://github.com/python-zeroconf/python-zeroconf/pull/1798/files
Reloadhttps://github.com/python-zeroconf/python-zeroconf/pull/1798/files
Reloadhttps://github.com/python-zeroconf/python-zeroconf/pull/1798/files
python-zeroconfhttps://github.com/python-zeroconf
python-zeroconfhttps://github.com/python-zeroconf/python-zeroconf
Codehttps://github.com/python-zeroconf/python-zeroconf
Issues50 (50)https://github.com/python-zeroconf/python-zeroconf/issues
Pull requests16 (16)https://github.com/python-zeroconf/python-zeroconf/pulls
Discussionshttps://github.com/python-zeroconf/python-zeroconf/discussions
Actionshttps://github.com/python-zeroconf/python-zeroconf/actions
Projectshttps://github.com/python-zeroconf/python-zeroconf/projects
Wikihttps://github.com/python-zeroconf/python-zeroconf/wiki
Security and quality5 (5)https://github.com/python-zeroconf/python-zeroconf/security
Insightshttps://github.com/python-zeroconf/python-zeroconf/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython-zeroconf%2Fpython-zeroconf%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython-zeroconf%2Fpython-zeroconf%2Fissues%2Fnew%2Fchoose
bdracohttps://github.com/bdraco
masterhttps://github.com/python-zeroconf/python-zeroconf/tree/master
feat/interface-change-monitorhttps://github.com/python-zeroconf/python-zeroconf/tree/feat/interface-change-monitor
Conversation 4 https://github.com/python-zeroconf/python-zeroconf/pull/1798
Commits 24 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits
Checks 36 https://github.com/python-zeroconf/python-zeroconf/pull/1798/checks
Files changed https://github.com/python-zeroconf/python-zeroconf/pull/1798/files
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1798/files
feat: add opt-in periodic interface-change monitor https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#top
Show all changes 24 commits https://github.com/python-zeroconf/python-zeroconf/pull/1798/files
48c5fe5 feat: add async_update_interfaces to rescan network interfaces at run… bdraco Jun 21, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/48c5fe5da6145306e3d40159b940de42546bd638
6199f8a Merge branch 'master' into feat/async-update-interfaces bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/6199f8ae2526212dfff05bbc494968908d9f7ab6
e3afb88 address review: guard Default kind-switch, unlock re-announce, copy i… bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/e3afb881af7ee1c35cf845228b085f960da38d30
60eddff harden: narrow getsockopt mask logging, roll back per-interface add o… bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/60eddffaae137801db91c2a5ae3c65cce58531ae
6e5d314 test: drive Default/unicast cases at the engine level to avoid real-m… bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/6e5d3146cd01970ff177ee44077c444985440439
e05addd harden: cancel removed interface listener TC timers; warn on unexpect… bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/e05adddebfaa556f25da0ed4326565d035afe7b9
3dae38b feat: rebuild listen socket on incompatible family change instead of … bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/3dae38b7d4bc10d62a5b13b8e05371d6a8e54903
d05d3e2 fix: rebuild listen socket safely - derive family from desired set, c… bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/d05d3e2278ca2be105f9da7952b6aa0d3d178741
86771c6 refactor: drop redundant rebuild return value; trim duplicate rebuild… bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/86771c6ca57a2a5bc04eeebb289c1d73803efd19
2058592 refactor: share interface-setup helpers between construction and rescan bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/2058592ab5c45a19b594a079ed0354b898e99b5a
2d4b61b feat: reconcile a Default single-family instance to an explicit set bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/2d4b61b4bdcae3cdc2114bc18585e8fe691e337a
2b37423 docs: correct the no-await invariant comment in _async_create_endpoints bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/2b37423eff40fd39f0c7e8d1dcdf1d6dd50e4dfa
59d9c80 refactor: dedup transport-list filtering; pop the demoted key instead… bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/59d9c80babef4e7fc376c4bf76102677627a8fdd
12bba00 fix: warn when a staying interface fails to re-join on the rebuilt li… bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/12bba0094961d5e61a9ed8a94caa03b44d3939a0
4657975 test: pin re-announce fan-out, ip-change, and v6 leave-index behavior bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/46579752de3bed33c1b7841538a306cdd7b0e1c8
4a2f0e3 fix: only swallow IPV6_V6ONLY read failure on Windows bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/4a2f0e35a613b2f1f69258e2fc34c3667782a807
4086ae2 fix: name the service in re-announce failures; widen sync update timeout bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/4086ae246fc85023191181ac9710898114446f96
37f6b1a fix: degrade getsockopt read failures instead of aborting bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/37f6b1af3448440446869f36734dd76412b7eb7c
c93f537 fix: surface an unreadable IPV6_V6ONLY at warning, document best-effo… bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/c93f53763f70cd1325565cb0d6a75eb7d613c384
423f875 fix: make rescan resilient to a transient empty set and per-interface… bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/423f8752e97209807903b3a070afb806f703495b
55ca5ea fix: only swallow OSError when a per-interface endpoint fails bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/55ca5eadb9eaca810d7cf2f61178da2ee509a541
f0090e4 fix: don't degrade or crash on a listen-socket rebuild failure bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/f0090e4665c5c685aaa5e304058bb1042f72266f
c2df902 fix: don't drop a cancelled re-announce; document the apple_p2p raise bdraco Jun 22, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/c2df9023b4ad3aa5eed7022e9e9d3c78e6e45626
ca0e061 feat: add opt-in periodic interface-change monitor bdraco Jun 21, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1798/commits/ca0e061a2ec293d2445be1cbc8d3c8deb3db35a6
Clear filters https://github.com/python-zeroconf/python-zeroconf/pull/1798/files
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1798/files
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1798/files
_core.py https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
_engine.py https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
_listener.pxd https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-bff2b43c81cd5dc78e524ed6cd0a7c8cef9ad4cd2410097ad3b4cd20f73f589a
_listener.py https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-482d92e649d0a9dfb6f7434c0ec1854490aeda07f86f21ac36e348a9ad1ab4d2
_transport.py https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-c394cbc8422ae77567361c7f435fc6de916373531558d0069bc3535fa7f7de1f
interface_monitor.py https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-a0fef3945a1b9992ffcbd175b908d1a9bdf0da49339122d5a49798a51943e8a7
net.py https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-16e7dbbe84235183a0e3f58fa9fe2fce44a09848c2cb81a2c59775b27218135c
asyncio.py https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-96bdd1e4e7a9ff49c66e746ace69a44b9a538be08cc39b7c38139bb78e81cf14
test_interface_monitor.py https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-c33e2c641858054636f633d718187d577bb244dd29288658d73055c9da7369ce
test_interface_update.py https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-6c178c122681da1325df3cb27aaf36fe56f56d55b73d4103eec8f42d4c25af3c
test_net.py https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-b0722f491ed69822054e986e9b2dac8941d0a485c891d03d41651a8fd7a672a4
src/zeroconf/_core.pyhttps://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
View file https://github.com/python-zeroconf/python-zeroconf/blob/ca0e061a2ec293d2445be1cbc8d3c8deb3db35a6/src/zeroconf/_core.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-zeroconf/python-zeroconf/pull/1798/{{ revealButtonHref }}
https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://github.com/python-zeroconf/python-zeroconf/pull/1798/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1798/files
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1798/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.