Repository navigation
feat(diff): list used names deprecated at the target version (DT-CORE-62) - #23
Open
rise11hx-cmyk wants to merge 1 commit into
Open
rise11hx-cmyk wants to merge 1 commit into
rise11hx-cmyk wants to merge 1 commit into
Conversation
diff_versions only reported deprecations that began inside the range, so a used name deprecated before it went unmentioned, and one whose deprecation ended inside it was reported as still deprecated. - New DiffResult field `deprecated_uses`: every used path deprecated at `to_version`, with `deprecated_in` from the same walk check_upgrade uses (`<=X` when it began before the earliest indexed release) and the library's own text as untrusted `message`. - The state at each end is read once, by the `_check_symbols` calls `_unchecked_uses` already made, so a class whose deprecation sits on its `__init__` counts too. - An in-range `deprecated` event whose deprecation no longer holds at `to_version` carries `detail.until`, the first release where the name is indexed but not deprecated. A removal isn't an end: its own event says that. - Test with a synthetic index covering both halves; CHANGELOG entry. DT-CORE-62
rise11hx-cmyk
force-pushed
the
feat/62-diff-deprecated-uses
branch
from
November 19, 2026 06:20
3e25bdb to
8029e05
Compare
This branch has not been deployed
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.
What this does
diff_versionswithused_symbolsused to report only deprecations that began inside the range, so a used name already deprecated before the range went unmentioned, and a deprecation that ended inside the range was still reported as one to act on (DT-CORE-62, #15).Both halves are here, following your reply on the issue:
deprecated_uses— every used path deprecated atto_version, wherever it began. Each item ispath,deprecated_in(from_deprecation, so<=Xwhen it is already there in the earliest indexed release) andmessage(UntrustedText, the library's own text). The state at each end comes from the_check_symbolsresult_unchecked_usesalready asked for, so no name is checked twice, and a class whose deprecation sits on its__init__reads deprecated as it does everywhere else.detail.until— on an in-rangedeprecatedevent whose deprecation no longer holds atto_version, the first release in the range where the name is still indexed but no longer deprecated. A removal isn't an end; its own event says that.No existing field or
kindchanged, andeventskeeps its meaning ("what changed in this range").Before / after, on the published index
uv run deptime index pull(53 packages, built 2026-11-19T04:57Z), then the three examples from the issue:diff langgraph 1.0.2 1.2.20 --used langgraph.errors.NodeInterruptevents: [], no note, nothing about the namedeprecated_uses: [{path: langgraph.errors.NodeInterrupt, deprecated_in: 0.6.0, message: "NodeInterrupt is deprecated. Please use \langgraph.types.interrupt` instead."}]`diff huggingface_hub 0.32.2 0.23.2 --used huggingface_hub.Repositoryevents: [], nothingdeprecated_uses: [{path: huggingface_hub.Repository, deprecated_in: 0.19.0, message: "Repository is deprecated. ..."}]diff gradio 3.23.0 6.31.0 --used gradio.update3.45.0 deprecated "Using the update method is deprecated. ...", no end3.45.0 deprecatedwithdetail.until: 3.48.0;deprecated_uses: []And
check_symbolsstill answers the same states those lists are built from:langgraph 1.2.20 langgraph.errors.NodeInterrupt→ present, deprecated;gradio 6.31.0 gradio.update→ present, no deprecation.Tests (red first, then green)
The new test is
tests/test_query.py::test_diff_lists_used_names_deprecated_at_the_target_version, on its own synthetic index:git stash push -- src/deptime/models.py src/deptime/query.py, thenuv run pytest -q tests/test_query.py -k deprecated_at_the_targetAttributeError: 'DiffResult' object has no attribute 'deprecated_uses'uv run pytestuv run ruff format src testsuv run ruff check src testsThe test covers: a deprecation that began before the range (
<=0.1.0, listed), the same name going from deprecated to fine inside the range (event kept withuntil, not listed), a removal (no inventeduntil), the range starting inside a deprecation (no start event, not listed), noused_symbols(empty), and a class whose deprecation sits on__init__(listed withdeprecated_inat the release it moved there).Notes
uv.lockand the pulled.scratch-deptime/index are not part of the commit; only the four files above changed.DT-CORE-62, closes #15.