| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Merging this PR will not alter performance✅ 24 untouched benchmarks Comparing nsec_support (a46dea6) with master (ea490c0) |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #1825 +/- ##
=======================================
Coverage 99.81% 99.81%
=======================================
Files 33 33
Lines 3772 3799 +27
Branches 536 543 +7
=======================================
+ Hits 3765 3792 +27
Misses 5 5
Partials 2 2 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
|
Previous review — superseded by a newer review below. |
Sorry, something went wrong.
There was a problem hiding this comment.
Warning
Important issues found.
Sorry, something went wrong.
PR Review — fix: correct nsec bitmap semantics and resolve txt denialsAll four findings from the previous round are resolved; nothing blocking remains. Merge-ready with two non-blocking notes. Re-verified against the current head (7d711a4):
The protocol substance still holds up on re-read. _process_nsec_record is only reachable after the record_key != self.key guard, so the host-name NSEC our own responder emits can never be read as a TXT denial — test_own_nsec_response_does_not_complete_service pins exactly that. get_by_details(..., _CLASS_IN) matches the cached unique-bit NSEC because DNSEntry._fast_init_entry masks class_ through _CLASS_MASK. The goodbye path (_core.py:578, override_ttl=0) now retracts the NSEC at the same host name it announced it at, which is self-consistent. Test fixtures (zc_loopback, aiozc_loopback, quick_request_timing, _clear_cache, RecordUpdate) all exist and handle teardown. Remaining, both non-blocking:
Note: I could not execute the test suite (no Python in the review shell), so the author's "466 passed" test plan is taken as a claim, not verified here. ✅ Resolved since last review (4)Previously-flagged issues verified fixed
🟢 Suggestions1. `stacklevel=2` will point at the wrong frame in the Cython buildsrc/zeroconf/_services/info.py:778-783 src/zeroconf/_services/info.py is in TO_CYTHONIZE (build_ext.py:29), so in shipped wheels dns_nsec is a compiled def on a cdef class. Cython does not push a Python frame for a compiled function during normal execution (frames are materialised lazily, only by __Pyx_AddTraceback on the exception path). _warnings.warn resolves stacklevel against the topmost Python frame, which from inside compiled code is already the caller. So stacklevel=2 skips one frame too far and attributes the DeprecationWarning to the caller's caller. Why it matters: the whole point of the shim is to tell a downstream user where their dns_nsec() call is. In the pure-Python build (and in test_service_info_dns_nsec_deprecated, which only matches on the message) the line is right; in the compiled wheel — the only build most users get — it points at the wrong file:line, which is worse than no location at all. Caveat: unverified against an actual compiled extension — I could not build or run Python in this review shell. If you want to confirm before changing anything, a REQUIRE_CYTHON=1 build plus python -W always::DeprecationWarning -c "..." will show which line gets reported. If it does misattribute, stacklevel=1 is the correct value for a compiled def; there is no single value correct for both builds, so a short comment naming the trade-off is probably the honest fix. warnings.warn(
"dns_nsec is deprecated, and will be removed in a future version. "
"Use dns_address_nsec instead; missing_types is ignored.",
DeprecationWarning,
stacklevel=2,
)
Checklist
Important The branch moved during review. This review was performed against HEAD=7d711a4, but the PR branch now points at 7fb0c4f. Commits pushed after the review started are not reflected below — re-run /review to cover them. Automated review by Kōan (Claude) HEAD=7d711a4 5 min 18s |
Sorry, something went wrong.
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Follow up to #1821. Outgoing NSEC records now follow RFC 6762 §6.1, and ServiceInfo consumes an NSEC that denies the TXT record so async_request resolves promptly instead of burning the full timeout.
Details
Test plan