René's URL Explorer Experiment


Title: fix: make Signal.fire keyword-only to type the dispatch contract by bluetoothbot · Pull Request #1784 · python-zeroconf/python-zeroconf · GitHub

Open Graph Title: fix: make Signal.fire keyword-only to type the dispatch contract by bluetoothbot · Pull Request #1784 · python-zeroconf/python-zeroconf

X Title: fix: make Signal.fire keyword-only to type the dispatch contract by bluetoothbot · Pull Request #1784 · python-zeroconf/python-zeroconf

Description: Summary Signal.fire(**kwargs: Any) forwarded arbitrary kwargs to handlers typed Callable[..., None], so a typo at a fire site or a missing parameter at a handler only surfaced when a real service event happened to dispatch. mypy could not catch dispatch mismatches. fire() is now keyword-only with the four documented parameters (zeroconf, service_type, name, state_change) and forwards them explicitly, so the dispatch contract is checked statically. Closes #1779 Changes Make Signal.fire keyword-only with an explicit (*, zeroconf, service_type, name, state_change) signature. Forward the four parameters by name instead of splatting **kwargs. Add tests covering dispatch, the typo-kwarg failure mode, and positional-arg rejection. Behaviour notes Signal is importable from the top-level package (back-compat import in src/zeroconf/__init__.py, not in __all__). Third-party code that instantiated its own Signal and called fire() with other kwargs now gets a TypeError instead of dispatching. Signal is undocumented; this tightening is the intent of the issue. _services/__init__.py is in TO_CYTHONIZE and Signal is a cdef class. With Cython 3's default annotation_typing, service_type: str and name: str become typed arguments in the compiled wheel, so a non-str argument raises TypeError there while pure Python forwards it. The only in-tree caller (browser.py) always passes str. Test plan SKIP_CYTHON=1 poetry run pytest tests/ (full suite green). poetry run ruff check / ruff format --check on the touched files (clean). REQUIRE_CYTHON=1 regeneration succeeds for _services/__init__.py. Generated by Kōan

Open Graph Description: Summary Signal.fire(**kwargs: Any) forwarded arbitrary kwargs to handlers typed Callable[..., None], so a typo at a fire site or a missing parameter at a handler only surfaced when a real service e...

X Description: Summary Signal.fire(**kwargs: Any) forwarded arbitrary kwargs to handlers typed Callable[..., None], so a typo at a fire site or a missing parameter at a handler only surfaced when a real service e...

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

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:1ce2cff6-29b6-84a5-36fa-c85212b3ce30
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE670:15226A:E2A66:131815:6B008039
html-safe-nonce62a56a5cbecbe15a960a36ee1de33397cb6b0eee5be48f93cde0aface88ddf43
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjcwOjE1MjI2QTpFMkE2NjoxMzE4MTU6NkIwMDgwMzkiLCJ2aXNpdG9yX2lkIjoiMzUzNjY1NzcxNjA3ODQ3NzM2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac489ceaeda7ed4bb1b528aa51aa2d834d6909f79f296410f386e0d201bd2e77d8
hovercard-subject-tagpull_request:3749730585
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/1784/files
twitter:imagehttps://avatars.githubusercontent.com/u/284751220?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/284751220?s=400&v=4
og:image:altSummary Signal.fire(**kwargs: Any) forwarded arbitrary kwargs to handlers typed Callable[..., None], so a typo at a fire site or a missing parameter at a handler only surfaced when a real service e...
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://github.com/python-zeroconf/python-zeroconf/pull/1784/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-zeroconf%2Fpython-zeroconf%2Fpull%2F1784%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%2F1784%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/1784/files
Reloadhttps://github.com/python-zeroconf/python-zeroconf/pull/1784/files
Reloadhttps://github.com/python-zeroconf/python-zeroconf/pull/1784/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
bluetoothbothttps://github.com/bluetoothbot
python-zeroconf:masterhttps://github.com/python-zeroconf/python-zeroconf/tree/master
bluetoothbot:koan/fix-issue-1779https://github.com/bluetoothbot/python-zeroconf/tree/koan/fix-issue-1779
Conversation 23 https://github.com/python-zeroconf/python-zeroconf/pull/1784
Commits 9 https://github.com/python-zeroconf/python-zeroconf/pull/1784/commits
Checks 36 https://github.com/python-zeroconf/python-zeroconf/pull/1784/checks
Files changed https://github.com/python-zeroconf/python-zeroconf/pull/1784/files
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1784/files
fix: make Signal.fire keyword-only to type the dispatch contract https://github.com/python-zeroconf/python-zeroconf/pull/1784/files#top
Show all changes 9 commits https://github.com/python-zeroconf/python-zeroconf/pull/1784/files
769d9e5 fix: type Signal dispatch contract with Protocol bluetoothbot May 26, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1784/commits/769d9e568088c4772686a82197f77add554cd59e
77c8c08 fix: make Signal.fire keyword-only to type the dispatch contract bluetoothbot Aug 26, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1784/commits/77c8c08ed59d1c3281ffda9ab44952ebb1b69450
6d21163 test: silence mypy arg-type on positional Signal.fire call bluetoothbot Aug 26, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1784/commits/6d21163e623ceb552985b8832dacf0c6b168222a
255510b fix: resolve CI failures on #1784 (attempt 1) bluetoothbot Aug 26, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1784/commits/255510b028294cd78fe10bf1ad711a19d1e2d0e0
7193b54 chore: drop out-of-scope cython version cap from build requires bluetoothbot Aug 26, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1784/commits/7193b54f083efa07fdc301417854968c630ef511
4f16168 fix: resolve CI failures on #1784 (attempt 1) bluetoothbot Aug 26, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1784/commits/4f16168126a5810b7b955b00ec4f9b904a6b962c
aed6b41 chore: drop out-of-scope cython cap and ci release-dry-run change bluetoothbot Aug 28, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1784/commits/aed6b418e105615aba13afb57b292ad98380536f
b127121 test: pin unknown-kwarg rejection in Signal.fire test bluetoothbot Aug 28, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1784/commits/b127121ca36eb3eecc075d4c9c0954d634565561
c789ca9 fix: accept and discard extra kwargs in Signal.fire for back compat bluetoothbot Aug 28, 2026 https://github.com/python-zeroconf/python-zeroconf/pull/1784/commits/c789ca945b3a5886a27dc95b8b4ddf92906f9dcd
Clear filters https://github.com/python-zeroconf/python-zeroconf/pull/1784/files
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1784/files
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1784/files
__init__.py https://github.com/python-zeroconf/python-zeroconf/pull/1784/files#diff-5debaf9a3c782a631db473f2b23fd05f636b71cc23a5bf6f0459fab2c6a53ea3
test_services.py https://github.com/python-zeroconf/python-zeroconf/pull/1784/files#diff-caee650c3003842e9277d696a063ab724d42606e64cbf44cf1deb9d1d67d1d98
src/zeroconf/_services/__init__.pyhttps://github.com/python-zeroconf/python-zeroconf/pull/1784/files#diff-5debaf9a3c782a631db473f2b23fd05f636b71cc23a5bf6f0459fab2c6a53ea3
View file https://github.com/python-zeroconf/python-zeroconf/blob/c789ca945b3a5886a27dc95b8b4ddf92906f9dcd/src/zeroconf/_services/__init__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-zeroconf/python-zeroconf/pull/1784/{{ revealButtonHref }}
https://github.com/python-zeroconf/python-zeroconf/pull/1784/files#diff-5debaf9a3c782a631db473f2b23fd05f636b71cc23a5bf6f0459fab2c6a53ea3
bdracohttps://github.com/bdraco
Aug 28, 2026https://github.com/python-zeroconf/python-zeroconf/pull/1784/files#r3883264065
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1784/files
bluetoothbothttps://github.com/bluetoothbot
Aug 28, 2026https://github.com/python-zeroconf/python-zeroconf/pull/1784/files#r3883640074
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1784/files
bdracohttps://github.com/bdraco
Aug 28, 2026https://github.com/python-zeroconf/python-zeroconf/pull/1784/files#r3883806860
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python-zeroconf/python-zeroconf/pull/1784/files
https://github.com/python-zeroconf/python-zeroconf/pull/1784/files#diff-5debaf9a3c782a631db473f2b23fd05f636b71cc23a5bf6f0459fab2c6a53ea3
tests/test_services.pyhttps://github.com/python-zeroconf/python-zeroconf/pull/1784/files#diff-caee650c3003842e9277d696a063ab724d42606e64cbf44cf1deb9d1d67d1d98
View file https://github.com/python-zeroconf/python-zeroconf/blob/c789ca945b3a5886a27dc95b8b4ddf92906f9dcd/tests/test_services.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-zeroconf/python-zeroconf/pull/1784/{{ revealButtonHref }}
https://github.com/python-zeroconf/python-zeroconf/pull/1784/files#diff-caee650c3003842e9277d696a063ab724d42606e64cbf44cf1deb9d1d67d1d98
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.