René's URL Explorer Experiment


Title: feat: report whether async_update_interfaces brought every interface up by UTKARSH698 · Pull Request #1946 · python-zeroconf/python-zeroconf · GitHub

Open Graph Title: feat: report whether async_update_interfaces brought every interface up by UTKARSH698 · Pull Request #1946 · python-zeroconf/python-zeroconf

X Title: feat: report whether async_update_interfaces brought every interface up by UTKARSH698 · Pull Request #1946 · python-zeroconf/python-zeroconf

Description: Closes #1916 Summary async_update_interfaces returned None, so a caller could not tell that the requested interfaces were not brought up: a failed listen socket rebuild and an interface that failed to bind or re-join were only logged. A failed rebuild also stored the requested interfaces and ip_version as the retained configuration although nothing changed. This makes async_update_interfaces, update_interfaces and AsyncZeroconf.async_update_interfaces return whether every requested interface is up, and keeps the stored configuration when the reconcile did not run. Details AsyncEngine.async_update_interfaces now returns an InterfaceUpdateResult(applied, added, complete) instead of the added bool. added keeps driving the re-announce as before; applied is false only for the two early exits (no interfaces available, rebuild failed); complete is false when the rebuild failed, an interface was not added, or a staying interface could not re-join the rebuilt listen socket (_async_rebuild_listen_socket now returns whether all re-joined). Zeroconf.async_update_interfaces only commits the configuration when applied, which is what the existing comment above it describes. A partial reconcile still commits, so the next rescan retries the interfaces that did not come up rather than reconciling back to the old set. I went with a return value rather than raising on a failed rebuild: failures stay logged and never raised, so existing adapter-change handlers keep the best-effort behaviour, and callers that ignore the result are unaffected. Happy to switch to raising for the rebuild case if you prefer that. _core.py and _engine.py are not in TO_CYTHONIZE, so no .pxd changes. Test plan New tests in tests/test_interface_update.py for the public result: all interfaces up, an interface that fails to come up (config still stored), a failed rebuild and an empty interface set (config unchanged), and the sync update_interfaces wrapper. test_update_interfaces_rebuild_rejoin_failure_warns now also checks complete is false. The new and extended tests fail on master and pass with this change. On master, a failed rebuild to IPVersion.V6Only returns None and stores V6Only while the instance is still on IPv4. Existing engine tests updated from the added bool to result.added. Full suite on Windows, Python 3.11 (SKIP_CYTHON=1): 508 passed. pre-commit passes (ruff, mypy, flake8, codespell, pyupgrade) and so does scripts/check_declaration_order.py.

Open Graph Description: Closes #1916 Summary async_update_interfaces returned None, so a caller could not tell that the requested interfaces were not brought up: a failed listen socket rebuild and an interface that failed...

X Description: Closes #1916 Summary async_update_interfaces returned None, so a caller could not tell that the requested interfaces were not brought up: a failed listen socket rebuild and an interface that failed...

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

X: @github

direct link

Domain: redirect.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:a2ad8744-79e0-d0d0-0dd8-37897b2956c1
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD094:22D266:D6E11:128ACB:6B0080C5
html-safe-nonce77cf90f6765d0e5fb6fcf14dda9d77fb578bee39dfd4fe70a4f16d623628a03d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDk0OjIyRDI2NjpENkUxMToxMjhBQ0I6NkIwMDgwQzUiLCJ2aXNpdG9yX2lkIjoiNTMwNDEwNTUzMzY5Mzc4ODM1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf7330934466086239f4eef172d43eca0e8be98a208e090b4b2605f9db3e10bdd
hovercard-subject-tagpull_request:5221710810
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/1946/files
twitter:imagehttps://avatars.githubusercontent.com/u/146472914?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/146472914?s=400&v=4
og:image:altCloses #1916 Summary async_update_interfaces returned None, so a caller could not tell that the requested interfaces were not brought up: a failed listen socket rebuild and an interface that failed...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None82c186f13e104004ab7bdb779f3195e59dd38bfde531aaa74b76470fc2462b83
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
released1bc2aa1939001689f5ce935982c10a6138f745c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#start-of-content
https://redirect.github.com/
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-zeroconf%2Fpython-zeroconf%2Fpull%2F1946%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://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-zeroconf%2Fpython-zeroconf%2Fpull%2F1946%2Ffiles
Sign uphttps://redirect.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://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files
Reloadhttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files
Reloadhttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files
python-zeroconfhttps://redirect.github.com/python-zeroconf
python-zeroconfhttps://redirect.github.com/python-zeroconf/python-zeroconf
Codehttps://redirect.github.com/python-zeroconf/python-zeroconf
Issues50 (50)https://redirect.github.com/python-zeroconf/python-zeroconf/issues
Pull requests16 (16)https://redirect.github.com/python-zeroconf/python-zeroconf/pulls
Discussionshttps://redirect.github.com/python-zeroconf/python-zeroconf/discussions
Actionshttps://redirect.github.com/python-zeroconf/python-zeroconf/actions
Projectshttps://redirect.github.com/python-zeroconf/python-zeroconf/projects
Wikihttps://redirect.github.com/python-zeroconf/python-zeroconf/wiki
Security and quality5 (5)https://redirect.github.com/python-zeroconf/python-zeroconf/security
Insightshttps://redirect.github.com/python-zeroconf/python-zeroconf/insights
Sign up for GitHub https://redirect.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://redirect.github.com/login?return_to=%2Fpython-zeroconf%2Fpython-zeroconf%2Fissues%2Fnew%2Fchoose
UTKARSH698https://redirect.github.com/UTKARSH698
python-zeroconf:masterhttps://redirect.github.com/python-zeroconf/python-zeroconf/tree/master
UTKARSH698:fix/report-interface-update-outcomehttps://redirect.github.com/UTKARSH698/python-zeroconf/tree/fix/report-interface-update-outcome
Conversation 3 https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946
Commits 1 https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/commits
Checks 43 https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/checks
Files changed https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files
Please reload this pagehttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files
feat: report whether async_update_interfaces brought every interface up https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#top
Show all changes 1 commit https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files
c52e18f feat: report whether async_update_interfaces brought every interface up UTKARSH698 Nov 9, 2026 https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/commits/c52e18fbb995220480eb1fc1ab1eb6e9b12a5443
Clear filters https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files
Please reload this pagehttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files
Please reload this pagehttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files
_core.py https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
_engine.py https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
asyncio.py https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-96bdd1e4e7a9ff49c66e746ace69a44b9a538be08cc39b7c38139bb78e81cf14
test_interface_update.py https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-6c178c122681da1325df3cb27aaf36fe56f56d55b73d4103eec8f42d4c25af3c
src/zeroconf/_core.pyhttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
View file https://redirect.github.com/python-zeroconf/python-zeroconf/blob/c52e18fbb995220480eb1fc1ab1eb6e9b12a5443/src/zeroconf/_core.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/{{ revealButtonHref }}
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-334d60456692812966fc9644e6d71b6e2c60dfc6fb2d02d02d5fef6a480c360d
src/zeroconf/_engine.pyhttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
View file https://redirect.github.com/python-zeroconf/python-zeroconf/blob/c52e18fbb995220480eb1fc1ab1eb6e9b12a5443/src/zeroconf/_engine.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/{{ revealButtonHref }}
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-8dc080e5555d9366069bd1bdbe1cee5bafd50ff8efc9e6ce469d6716bbf7663e
src/zeroconf/asyncio.pyhttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-96bdd1e4e7a9ff49c66e746ace69a44b9a538be08cc39b7c38139bb78e81cf14
View file https://redirect.github.com/python-zeroconf/python-zeroconf/blob/c52e18fbb995220480eb1fc1ab1eb6e9b12a5443/src/zeroconf/asyncio.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/{{ revealButtonHref }}
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-96bdd1e4e7a9ff49c66e746ace69a44b9a538be08cc39b7c38139bb78e81cf14
https://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files#diff-96bdd1e4e7a9ff49c66e746ace69a44b9a538be08cc39b7c38139bb78e81cf14
Please reload this pagehttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/files
Please reload this pagehttps://redirect.github.com/python-zeroconf/python-zeroconf/pull/1946/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.