Skip to content

chore: extend the ordering convention to the remaining large classes - #1874

Merged
bdraco merged 1 commit into
masterfrom
reorder_remaining_classes
Aug 29, 2026
Merged

bdraco merged 1 commit into
masterfrom
reorder_remaining_classes

Conversation

@bdraco

@bdraco bdraco commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

The second independent audit showed #1867 missed the classes outside _dns.py and the protocol writers; Zeroconf in particular kept the 2009 public method sequence intact. This applies the same stated rule (dunders first with __init__ pinned, public alphabetical, private alphabetical) to Zeroconf, DNSCache, ServiceInfo, ServiceBrowser, _ServiceBrowserBase and DNSIncoming.

Measured with the auditor's metric (ordered LCS over shared snake cased method names vs the 2009 monolith): Zeroconf 0.92 to 0.23, ServiceInfo 1.00 to 0.50, DNSIncoming 0.78 to 0.44, DNSCache 1.00 to 0.75. ServiceBrowser stays at 1.00 because its three shared names happen to sort alphabetically into the 2009 order; the arrangement is rule generated either way.

No behavior changes; pure declaration reordering. pxd files untouched.

Test plan

  • full suite passes against a REQUIRE_CYTHON rebuild
  • CodSpeed should be flat

@github-actions

Copy link
Copy Markdown

Thanks for contributing! A quick note: this project is in the process of moving from LGPL-2.1 to Apache 2.0, see #1835.

By continuing with this pull request you are okay with your contribution, and your previous contributions to this repository, being offered under Apache 2.0.

If that does not work for you, no hard feelings; reply with the exact phrase I do not agree to the Apache 2.0 license or simply close this pull request, and nothing of yours will be included in the change.

@codspeed

codspeed Bot commented Aug 29, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing reorder_remaining_classes (abfedbb) with master (90f9226)

Open in CodSpeed

@codecov

codecov Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.87%. Comparing base (90f9226) to head (abfedbb).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1874   +/-   ##
=======================================
  Coverage   99.87%   99.87%           
=======================================
  Files          33       33           
  Lines        3882     3882           
  Branches      567      567           
=======================================
  Hits         3877     3877           
  Misses          3        3           
  Partials        2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bdraco
bdraco marked this pull request as ready for review August 29, 2026 22:23
@bdraco
bdraco merged commit a595a5c into master Aug 29, 2026
37 checks passed
@bdraco
bdraco deleted the reorder_remaining_classes branch August 29, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant