fix: export SpanPanelAdapterIncompatibleError, correct the README badges (3.0.1) - #159
Merged
Merged
Conversation
3.0.0 documented `SpanPanelAdapterIncompatibleError` as a top-level export in three places -- this changelog, the README error table, and `SpanMqttClient.connect`'s own docstring, which names it as something the caller receives -- but omitted it from `__init__.py`. `resolve_adapter` raises it into caller hands rather than logging it, so a consumer following the documented API got an ImportError at exactly the point it was trying to handle a real failure. Additive: the class, its attributes and its raise sites are unchanged. The reason it shipped is that the existing guard compares `__all__` against a hand-transcribed set, so it catches the two drifting apart but not a name missing from both -- and the same omission was made in both. The new check derives the expected set from the module instead. Falsified against the 3.0.0 state: both existing guards pass on the bug, and only the new one fails, naming the class. Badges: the release badge read `schema-1-v1.0.0`, because `github/v/release` returns the newest tag by date and this repository publishes three distributions from one tag namespace; it now filters on `v*`. The Python badge was hardcoded at `3.10+` -- five minor versions below the real floor -- so it is now read from PyPI, which needs the classifiers this adds. Added version badges for both adapters, since the repository ships three distributions and showed one. The PyPI badge needed no change; it was showing a stale value from a CDN cache and has since caught up on its own. Version support: the notice covered only the 1.x sunset. 2.x is closed to new work and every capability since 3.0.0 landed on 3.x, so the table now says that rather than leaving 2.x looking current. Also dropped "v2" from the tagline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The defect
3.0.0 documented
SpanPanelAdapterIncompatibleErroras a top-level export in three places — this changelog, the README's error table (line 401), andSpanMqttClient.connect's own docstring, which names it as something the caller receives — but it was omitted from__init__.py:resolve_adapterraises it into caller hands (adapters.py:213,:222) rather than logging it, so a consumer following the documented API got anImportErrorat exactly the point it was trying to handle a real failure. Its two siblings are in the same import block; this was an omission, not a design choice.Purely additive — the class, its attributes and its raise sites are unchanged.
Why it shipped, and the guard that now catches it
test_public_api_unchanged.pypins__all__against a hand-transcribed set. That catches the two drifting apart, but not a name missing from both — and the same omission was made in both places.The new check derives the expected set from the module rather than transcribing it.
Falsified against the 3.0.0 state (both files reverted, new guard kept):
Both existing guards pass on the bug. Only the new one fires, and it names the class.
Badges
schema-1-v1.0.0.github/v/releasereturns the newest tag by date, and this repository now publishes three distributions into one tag namespace, so it showed whichever released last. Now filtered onv*; verified it returnsv3.0.0.3.10+— five minor versions below the real floor, for the whole of 3.0.0, because nothing connected it torequires-python. Now read from PyPI viapypi/pyversions, which needs the classifiers this adds. Verified in the built wheel.v2.6.4in the report that started this, but that was a stale CDN cache; shields already returnsv3.0.0.Version support
The old notice covered only the 1.x sunset, leaving 2.x looking current. It is closed to new work — the parent/child data model, adoption, discovery and extension properties all landed on 3.x — so the table says so, and spells out that 2.x → 3.x is an install rather than only an upgrade. Also dropped "v2" from the tagline.
Hot-loading accuracy
Step 1 now states what current firmware actually reports (the canonical
1.0) before describing the tolerant and rejecting branches, and the1.0-betaexample is gone from the README, the dispatch docstring and the changelog. Every replacement example was checked againstselect_adapter_keyrather than read off the regex:Verification