deptime 0.2.2__tar.gz → 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. {deptime-0.2.2 → deptime-1.0.0}/PKG-INFO +10 -6
  2. {deptime-0.2.2 → deptime-1.0.0}/README.md +6 -4
  3. {deptime-0.2.2 → deptime-1.0.0}/integrations/claude-code/.claude-plugin/plugin.json +1 -1
  4. {deptime-0.2.2 → deptime-1.0.0}/integrations/claude-code/.mcp.json +1 -1
  5. {deptime-0.2.2 → deptime-1.0.0}/integrations/claude-code/commands/fix-upgrade.md +11 -8
  6. {deptime-0.2.2 → deptime-1.0.0}/pyproject.toml +4 -2
  7. {deptime-0.2.2 → deptime-1.0.0}/server.json +2 -2
  8. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/__init__.py +1 -1
  9. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/ingest/snapshot.py +23 -7
  10. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/models.py +9 -3
  11. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/upgrade.py +15 -6
  12. {deptime-0.2.2 → deptime-1.0.0}/tests/test_snapshot.py +15 -1
  13. {deptime-0.2.2 → deptime-1.0.0}/tests/test_upgrade.py +36 -0
  14. {deptime-0.2.2 → deptime-1.0.0}/.gitignore +0 -0
  15. {deptime-0.2.2 → deptime-1.0.0}/LICENSE +0 -0
  16. {deptime-0.2.2 → deptime-1.0.0}/integrations/claude-code/.claude-plugin/icon.png +0 -0
  17. {deptime-0.2.2 → deptime-1.0.0}/integrations/claude-code/README.md +0 -0
  18. {deptime-0.2.2 → deptime-1.0.0}/integrations/claude-code/hooks/hooks.json +0 -0
  19. {deptime-0.2.2 → deptime-1.0.0}/integrations/claude-code/scripts/suggest_deptime.py +0 -0
  20. {deptime-0.2.2 → deptime-1.0.0}/integrations/claude-code/skills/deptime/SKILL.md +0 -0
  21. {deptime-0.2.2 → deptime-1.0.0}/integrations/snippets/agents-md-deptime.md +0 -0
  22. {deptime-0.2.2 → deptime-1.0.0}/integrations/snippets/cursor-deptime.mdc +0 -0
  23. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/bench.py +0 -0
  24. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/cli.py +0 -0
  25. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/config.py +0 -0
  26. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/coverage.toml +0 -0
  27. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/curated.toml +0 -0
  28. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/index/__init__.py +0 -0
  29. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/index/distribution.py +0 -0
  30. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/index/location.py +0 -0
  31. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/index/schema.sql +0 -0
  32. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/index/store.py +0 -0
  33. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/ingest/__init__.py +0 -0
  34. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/ingest/curated.py +0 -0
  35. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/ingest/diff.py +0 -0
  36. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/ingest/pipeline.py +0 -0
  37. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/ingest/pypi.py +0 -0
  38. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/ingest/replacements.py +0 -0
  39. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/lockfiles.py +0 -0
  40. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/query.py +0 -0
  41. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/server/__init__.py +0 -0
  42. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/server/http_app.py +0 -0
  43. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/server/mcp_app.py +0 -0
  44. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/server/metering.py +0 -0
  45. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/site.py +0 -0
  46. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/snippet.py +0 -0
  47. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/stdlib.py +0 -0
  48. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/stdlib_names.txt +0 -0
  49. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/stdlib_versions.txt +0 -0
  50. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/suppressions.py +0 -0
  51. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/tracebacks.py +0 -0
  52. {deptime-0.2.2 → deptime-1.0.0}/src/deptime/untrusted.py +0 -0
  53. {deptime-0.2.2 → deptime-1.0.0}/tests/__init__.py +0 -0
  54. {deptime-0.2.2 → deptime-1.0.0}/tests/conftest.py +0 -0
  55. {deptime-0.2.2 → deptime-1.0.0}/tests/golden/tier_a.toml +0 -0
  56. {deptime-0.2.2 → deptime-1.0.0}/tests/test_bench.py +0 -0
  57. {deptime-0.2.2 → deptime-1.0.0}/tests/test_curated.py +0 -0
  58. {deptime-0.2.2 → deptime-1.0.0}/tests/test_diff.py +0 -0
  59. {deptime-0.2.2 → deptime-1.0.0}/tests/test_distribution.py +0 -0
  60. {deptime-0.2.2 → deptime-1.0.0}/tests/test_docs.py +0 -0
  61. {deptime-0.2.2 → deptime-1.0.0}/tests/test_golden.py +0 -0
  62. {deptime-0.2.2 → deptime-1.0.0}/tests/test_holdout.py +0 -0
  63. {deptime-0.2.2 → deptime-1.0.0}/tests/test_lockfiles.py +0 -0
  64. {deptime-0.2.2 → deptime-1.0.0}/tests/test_model_alone.py +0 -0
  65. {deptime-0.2.2 → deptime-1.0.0}/tests/test_model_alone_upgrades.py +0 -0
  66. {deptime-0.2.2 → deptime-1.0.0}/tests/test_network.py +0 -0
  67. {deptime-0.2.2 → deptime-1.0.0}/tests/test_own_members.py +0 -0
  68. {deptime-0.2.2 → deptime-1.0.0}/tests/test_pipeline.py +0 -0
  69. {deptime-0.2.2 → deptime-1.0.0}/tests/test_plugin_hook.py +0 -0
  70. {deptime-0.2.2 → deptime-1.0.0}/tests/test_query.py +0 -0
  71. {deptime-0.2.2 → deptime-1.0.0}/tests/test_replacements.py +0 -0
  72. {deptime-0.2.2 → deptime-1.0.0}/tests/test_server.py +0 -0
  73. {deptime-0.2.2 → deptime-1.0.0}/tests/test_site.py +0 -0
  74. {deptime-0.2.2 → deptime-1.0.0}/tests/test_stdio.py +0 -0
  75. {deptime-0.2.2 → deptime-1.0.0}/tests/test_stdlib.py +0 -0
  76. {deptime-0.2.2 → deptime-1.0.0}/tests/test_tracebacks.py +0 -0
  77. {deptime-0.2.2 → deptime-1.0.0}/tests/test_untrusted.py +0 -0
  78. {deptime-0.2.2 → deptime-1.0.0}/tests/test_upgrade_bench.py +0 -0
  79. {deptime-0.2.2 → deptime-1.0.0}/tests/test_version_policy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: deptime
3
- Version: 0.2.2
3
+ Version: 1.0.0
4
4
  Summary: API time machine for Python libraries: tells coding agents what changed, in which release, and what to use instead. Local-first MCP server.
5
5
  Project-URL: Homepage, https://github.com/cschmertz/deptime
6
6
  Project-URL: Repository, https://github.com/cschmertz/deptime
@@ -9,13 +9,15 @@ Author: cschmertz
9
9
  License-Expression: MIT
10
10
  License-File: LICENSE
11
11
  Keywords: api-changes,coding-agents,deprecation,griffe,mcp,model-context-protocol,python
12
- Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Environment :: Console
14
14
  Classifier: Intended Audience :: Developers
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python :: 3
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
19
21
  Classifier: Topic :: Software Development :: Libraries
20
22
  Classifier: Topic :: Software Development :: Quality Assurance
21
23
  Requires-Python: >=3.12
@@ -61,7 +63,7 @@ Python libraries rename and remove things between releases. Code that worked las
61
63
  - **Local and free.** Open source (MIT). Your code and errors never leave your machine.
62
64
  - **Says when it doesn't know.** For a package it doesn't cover, or a name it can't follow, the answer is "not covered" or `unknown`, never a guess.
63
65
 
64
- > **Status:** alpha. 0.2.0 adds the upgrade check below. The index rebuilds itself twice a day, and fixes follow [reported wrong answers](https://github.com/cschmertz/deptime/issues/new/choose). Known gaps are listed in [BACKLOG.md](https://github.com/cschmertz/deptime/blob/main/BACKLOG.md).
66
+ > **Status:** 1.0. Tool names, parameters, result fields and CLI options only grow from here: [what 1.x promises](https://github.com/cschmertz/deptime/blob/main/CHANGELOG.md#versioning). The index rebuilds itself twice a day, and fixes follow [reported wrong answers](https://github.com/cschmertz/deptime/issues/new/choose). Known gaps are listed in [BACKLOG.md](https://github.com/cschmertz/deptime/blob/main/BACKLOG.md).
65
67
 
66
68
  ## Check a dependency update
67
69
 
@@ -79,14 +81,14 @@ jobs:
79
81
  runs-on: ubuntu-latest
80
82
  steps:
81
83
  - uses: actions/checkout@v7 # pin to a commit in your own workflows
82
- - uses: cschmertz/deptime@v0.2.2
84
+ - uses: cschmertz/deptime@v1.0.0
83
85
  ```
84
86
 
85
87
  From a terminal, `uvx deptime check-upgrade` compares the pinned versions at `HEAD` with your working tree, or `--package httpx --to 0.28.1` checks one update. An agent can call the `check_upgrade` tool with the code instead, and the Claude Code plugin's `/deptime:fix-upgrade` runs the check and has Claude fix the lines it reports as broken and check the ones it can't tell about. A break is a use the index shows failing at the new version and not at the old one; the report ends with a block a coding agent can act on.
86
88
 
87
89
  **On 264 real Dependabot and Renovate update pull requests** (247 projects, scored once before any fix, [results](https://github.com/cschmertz/deptime/blob/main/bench/upgrade-check/prs/results-2026-11-16.md)), the check failed all 13 whose update breaks the project's code, found 46 of the 48 breaking uses, and flagged 1 of 3,291 uses that still work. 2 of the 264 failed with no real break.
88
90
 
89
- **An agent fixing the breaks** (Claude Code on Sonnet 5.5, 25 real broken updates, [results](https://github.com/cschmertz/deptime/blob/main/bench/agent-fix/results-2026-11-16.md)): alone it left the code working in 80% of sessions; with `/deptime:fix-upgrade` in 64%, in a third of the turns; with the plugin installed and not named, 80%. The command's hand-off is being reworked.
91
+ **An agent fixing the breaks** (Claude Code on Sonnet 5.5, 25 real broken updates, [results](https://github.com/cschmertz/deptime/blob/main/bench/agent-fix/results-2026-11-16.md)): alone it left the code working in 80% of sessions; with `/deptime:fix-upgrade` in 64%, in a third of the turns; with the plugin installed and not named, 80%. On 66 new broken updates ([results](https://github.com/cschmertz/deptime/blob/main/bench/agent-fix/qa26/results-2026-11-16.md)), the reworked command: 72.7% against 69.7% alone, in about half the turns. After fixing what lost it, on 60 broken updates neither had seen ([results](https://github.com/cschmertz/deptime/blob/main/bench/agent-fix/qa27/results-2026-11-17.md)): 86.7% against 76.7% alone, with fewer new breaks, in about half the turns.
90
92
 
91
93
  ## Install
92
94
 
@@ -102,7 +104,7 @@ On first launch DepTime downloads its prebuilt index (one file from this repo's
102
104
 
103
105
  Claude Code users can also install the plugin in [`integrations/claude-code`](https://github.com/cschmertz/deptime/tree/main/integrations/claude-code) with `/plugin marketplace add cschmertz/deptime`, then `/plugin install deptime@deptime`. It adds a skill, the `/deptime:fix-upgrade` command, and a local hook that suggests DepTime when a Python version-change error appears in a command's output.
104
106
 
105
- **First launch timing out?** `uvx` installs DepTime the first time a client starts it. On macOS with an x86_64 `uv` (an Intel Mac, or Intel Homebrew on Apple silicon), one dependency, `cryptography`, has no prebuilt wheel and is compiled, which can take longer than a client waits for a server to start. Run `uvx deptime --help` once beforehand.
107
+ **First launch timing out?** `uvx` installs DepTime the first time a client starts it. On macOS with an x86_64 `uv` (an Intel Mac, or Intel Homebrew on Apple silicon), one dependency, `cryptography`, has no prebuilt wheel and is compiled: about 3 minutes on GitHub's Intel macOS runner, longer than a client waits for a server to start. Run `uvx deptime --help` once beforehand.
106
108
 
107
109
  ### Client compatibility
108
110
 
@@ -115,6 +117,8 @@ Checked 2026-11-05 with `deptime` 0.1.4 ([details](https://github.com/cschmertz/
115
117
  | MCP Python SDK clients 1.0–1.30 and TypeScript SDK clients 1.0–1.32 (protocols 2024-11-05 to 2025-11-25), over stdio and against `deptime serve` | ✅ |
116
118
  | Cursor, VS Code, Claude Desktop | not checked yet; they take the same `uvx deptime mcp` command |
117
119
 
120
+ First launch, from nothing to the right answer (2026-11-17, 0.2.3, [details](https://github.com/cschmertz/deptime/tree/main/bench/s7)): 8 s on Linux, 10 s on Apple-silicon macOS, 20 s on Windows. Runs on Python 3.12 to 3.15.
121
+
118
122
  ## What an answer looks like
119
123
 
120
124
  An agent that hits this error:
@@ -31,7 +31,7 @@ Python libraries rename and remove things between releases. Code that worked las
31
31
  - **Local and free.** Open source (MIT). Your code and errors never leave your machine.
32
32
  - **Says when it doesn't know.** For a package it doesn't cover, or a name it can't follow, the answer is "not covered" or `unknown`, never a guess.
33
33
 
34
- > **Status:** alpha. 0.2.0 adds the upgrade check below. The index rebuilds itself twice a day, and fixes follow [reported wrong answers](https://github.com/cschmertz/deptime/issues/new/choose). Known gaps are listed in [BACKLOG.md](https://github.com/cschmertz/deptime/blob/main/BACKLOG.md).
34
+ > **Status:** 1.0. Tool names, parameters, result fields and CLI options only grow from here: [what 1.x promises](https://github.com/cschmertz/deptime/blob/main/CHANGELOG.md#versioning). The index rebuilds itself twice a day, and fixes follow [reported wrong answers](https://github.com/cschmertz/deptime/issues/new/choose). Known gaps are listed in [BACKLOG.md](https://github.com/cschmertz/deptime/blob/main/BACKLOG.md).
35
35
 
36
36
  ## Check a dependency update
37
37
 
@@ -49,14 +49,14 @@ jobs:
49
49
  runs-on: ubuntu-latest
50
50
  steps:
51
51
  - uses: actions/checkout@v7 # pin to a commit in your own workflows
52
- - uses: cschmertz/deptime@v0.2.2
52
+ - uses: cschmertz/deptime@v1.0.0
53
53
  ```
54
54
 
55
55
  From a terminal, `uvx deptime check-upgrade` compares the pinned versions at `HEAD` with your working tree, or `--package httpx --to 0.28.1` checks one update. An agent can call the `check_upgrade` tool with the code instead, and the Claude Code plugin's `/deptime:fix-upgrade` runs the check and has Claude fix the lines it reports as broken and check the ones it can't tell about. A break is a use the index shows failing at the new version and not at the old one; the report ends with a block a coding agent can act on.
56
56
 
57
57
  **On 264 real Dependabot and Renovate update pull requests** (247 projects, scored once before any fix, [results](https://github.com/cschmertz/deptime/blob/main/bench/upgrade-check/prs/results-2026-11-16.md)), the check failed all 13 whose update breaks the project's code, found 46 of the 48 breaking uses, and flagged 1 of 3,291 uses that still work. 2 of the 264 failed with no real break.
58
58
 
59
- **An agent fixing the breaks** (Claude Code on Sonnet 5.5, 25 real broken updates, [results](https://github.com/cschmertz/deptime/blob/main/bench/agent-fix/results-2026-11-16.md)): alone it left the code working in 80% of sessions; with `/deptime:fix-upgrade` in 64%, in a third of the turns; with the plugin installed and not named, 80%. The command's hand-off is being reworked.
59
+ **An agent fixing the breaks** (Claude Code on Sonnet 5.5, 25 real broken updates, [results](https://github.com/cschmertz/deptime/blob/main/bench/agent-fix/results-2026-11-16.md)): alone it left the code working in 80% of sessions; with `/deptime:fix-upgrade` in 64%, in a third of the turns; with the plugin installed and not named, 80%. On 66 new broken updates ([results](https://github.com/cschmertz/deptime/blob/main/bench/agent-fix/qa26/results-2026-11-16.md)), the reworked command: 72.7% against 69.7% alone, in about half the turns. After fixing what lost it, on 60 broken updates neither had seen ([results](https://github.com/cschmertz/deptime/blob/main/bench/agent-fix/qa27/results-2026-11-17.md)): 86.7% against 76.7% alone, with fewer new breaks, in about half the turns.
60
60
 
61
61
  ## Install
62
62
 
@@ -72,7 +72,7 @@ On first launch DepTime downloads its prebuilt index (one file from this repo's
72
72
 
73
73
  Claude Code users can also install the plugin in [`integrations/claude-code`](https://github.com/cschmertz/deptime/tree/main/integrations/claude-code) with `/plugin marketplace add cschmertz/deptime`, then `/plugin install deptime@deptime`. It adds a skill, the `/deptime:fix-upgrade` command, and a local hook that suggests DepTime when a Python version-change error appears in a command's output.
74
74
 
75
- **First launch timing out?** `uvx` installs DepTime the first time a client starts it. On macOS with an x86_64 `uv` (an Intel Mac, or Intel Homebrew on Apple silicon), one dependency, `cryptography`, has no prebuilt wheel and is compiled, which can take longer than a client waits for a server to start. Run `uvx deptime --help` once beforehand.
75
+ **First launch timing out?** `uvx` installs DepTime the first time a client starts it. On macOS with an x86_64 `uv` (an Intel Mac, or Intel Homebrew on Apple silicon), one dependency, `cryptography`, has no prebuilt wheel and is compiled: about 3 minutes on GitHub's Intel macOS runner, longer than a client waits for a server to start. Run `uvx deptime --help` once beforehand.
76
76
 
77
77
  ### Client compatibility
78
78
 
@@ -85,6 +85,8 @@ Checked 2026-11-05 with `deptime` 0.1.4 ([details](https://github.com/cschmertz/
85
85
  | MCP Python SDK clients 1.0–1.30 and TypeScript SDK clients 1.0–1.32 (protocols 2024-11-05 to 2025-11-25), over stdio and against `deptime serve` | ✅ |
86
86
  | Cursor, VS Code, Claude Desktop | not checked yet; they take the same `uvx deptime mcp` command |
87
87
 
88
+ First launch, from nothing to the right answer (2026-11-17, 0.2.3, [details](https://github.com/cschmertz/deptime/tree/main/bench/s7)): 8 s on Linux, 10 s on Apple-silicon macOS, 20 s on Windows. Runs on Python 3.12 to 3.15.
89
+
88
90
  ## What an answer looks like
89
91
 
90
92
  An agent that hits this error:
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "deptime",
3
3
  "displayName": "DepTime",
4
- "version": "0.2.2",
4
+ "version": "1.0.0",
5
5
  "description": "Explains Python ImportError / AttributeError / TypeError caused by library API changes: what changed, in which release, and what to use instead. Runs locally; your code and errors never leave your machine.",
6
6
  "author": {
7
7
  "name": "cschmertz",
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "deptime": {
4
4
  "command": "uvx",
5
- "args": ["deptime==0.2.2", "mcp"]
5
+ "args": ["deptime==1.0.0", "mcp"]
6
6
  }
7
7
  }
8
8
  }
@@ -1,19 +1,19 @@
1
1
  ---
2
2
  description: Find what a dependency update breaks in this project's Python code with DepTime, then fix those lines
3
3
  argument-hint: "[package version [old-version]] (empty: compare the lockfiles at HEAD with the working tree)"
4
- allowed-tools: Bash(uvx deptime==0.2.2 check-upgrade:*), Bash(rm .deptime-report.md)
4
+ allowed-tools: Bash(uvx deptime==1.0.0 check-upgrade:*), Bash(rm .deptime-report.md)
5
5
  ---
6
6
 
7
- DepTime finds the uses an update breaks; you write the fix. Its breaks are confirmed: fix them, and don't rewrite
8
- code it didn't report as broken or unsure.
7
+ DepTime finds the uses an update breaks; you write the fix. Its breaks are confirmed: fix them. Leave working code
8
+ as it is, but if you find another use this update breaks, fix that too.
9
9
 
10
10
  1. Run the check from the project's root. Arguments: `$ARGUMENTS`. It writes its report to `.deptime-report.md`;
11
11
  read that file with the Read tool (it can be longer than the shell shows). Run each command here exactly as
12
12
  written, on its own: no `;`, `&&`, `echo`, pipe or redirect (the shell already shows the exit code, and a
13
13
  command with more in it may be refused).
14
- - With a package and a version: `uvx deptime==0.2.2 check-upgrade . --package <package> --to <version> --format markdown --output .deptime-report.md`.
14
+ - With a package and a version: `uvx deptime==1.0.0 check-upgrade . --package <package> --to <version> --format markdown --output .deptime-report.md`.
15
15
  Add `--from <old-version>` when it was given.
16
- - With none: `uvx deptime==0.2.2 check-upgrade . --format markdown --output .deptime-report.md`. It compares the
16
+ - With none: `uvx deptime==1.0.0 check-upgrade . --format markdown --output .deptime-report.md`. It compares the
17
17
  pinned versions at `HEAD` (`uv.lock`, `poetry.lock`, `pyproject.toml`, `requirements*.txt`) with the working
18
18
  tree, so update the lockfile first. On a branch, add `--base <the branch's base>`.
19
19
  2. Exit code 2 is an error, printed in the shell. If it says to pass `--from`, the project pins the package somewhere
@@ -22,12 +22,15 @@ code it didn't report as broken or unsure.
22
22
  3. Exit code 1 means breaks. The report's "For a coding agent" block lists each one with every line it reaches:
23
23
  - "the index proves `old` -> `new`": use `new` where the code uses `old`.
24
24
  - "try X": the best replacement the index found; check how X is called at the new version before rewriting.
25
- - No replacement: read the break's lines in the report and the package's release notes; if the fix isn't clear,
26
- leave the line, say why, and offer to pin the package to the last version that had it (the report says which).
25
+ - No replacement: find how the new version does the same thing, in its source, release notes or migration guide,
26
+ and rewrite the code to that, even when it takes more than a rename (a new class, a new way to build or call
27
+ it). Leave a line only when the new version has no way to do what it did; then say why, and offer to pin the
28
+ package to the last version that had it (the report says which).
27
29
  - For the full detail of a break (each replacement's signature and confidence, release links), run the check
28
30
  again with `--format json --output .deptime-report.md` and read the file.
29
31
  4. Uses under "DepTime can't tell" may or may not break: DepTime couldn't follow them. Check each one yourself in
30
- the new version's source or release notes, and fix it if it's broken. Do this even when the check exits 0.
32
+ the new version's source or release notes, and fix it the same way if it's broken. Do this even when the check
33
+ exits 0.
31
34
  Deprecations still work, and uses flagged at the old version too aren't caused by this update: leave both.
32
35
  5. Run the same command again, and repeat until it exits 0 or only breaks you couldn't fix remain. Then delete the
33
36
  report (`rm .deptime-report.md`), and report each line you changed, each unsure use you checked and what you
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "deptime"
3
- version = "0.2.2"
3
+ version = "1.0.0"
4
4
  description = "API time machine for Python libraries: tells coding agents what changed, in which release, and what to use instead. Local-first MCP server."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -9,13 +9,15 @@ license-files = ["LICENSE"]
9
9
  authors = [{ name = "cschmertz" }]
10
10
  keywords = ["mcp", "model-context-protocol", "coding-agents", "deprecation", "api-changes", "griffe", "python"]
11
11
  classifiers = [
12
- "Development Status :: 3 - Alpha",
12
+ "Development Status :: 5 - Production/Stable",
13
13
  "Environment :: Console",
14
14
  "Intended Audience :: Developers",
15
15
  "Operating System :: OS Independent",
16
16
  "Programming Language :: Python :: 3",
17
17
  "Programming Language :: Python :: 3.12",
18
18
  "Programming Language :: Python :: 3.13",
19
+ "Programming Language :: Python :: 3.14",
20
+ "Programming Language :: Python :: 3.15",
19
21
  "Topic :: Software Development :: Libraries",
20
22
  "Topic :: Software Development :: Quality Assurance",
21
23
  ]
@@ -14,13 +14,13 @@
14
14
  "sizes": ["any"]
15
15
  }
16
16
  ],
17
- "version": "0.2.2",
17
+ "version": "1.0.0",
18
18
  "packages": [
19
19
  {
20
20
  "registryType": "pypi",
21
21
  "registryBaseUrl": "https://pypi.org",
22
22
  "identifier": "deptime",
23
- "version": "0.2.2",
23
+ "version": "1.0.0",
24
24
  "runtimeHint": "uvx",
25
25
  "transport": {
26
26
  "type": "stdio"
@@ -1,3 +1,3 @@
1
1
  """DepTime: an API time machine for Python libraries, served to coding agents over MCP and HTTP."""
2
2
 
3
- __version__ = "0.2.2"
3
+ __version__ = "1.0.0"
@@ -38,7 +38,7 @@ from deptime.ingest.replacements import (
38
38
  if TYPE_CHECKING:
39
39
  from deptime.config import ServedRule
40
40
 
41
- SNAPSHOT_FORMAT = 27 # bump when extraction changes: cached snapshots in another format are rebuilt
41
+ SNAPSHOT_FORMAT = 28 # bump when extraction changes: cached snapshots in another format are rebuilt
42
42
  MAX_DEPTH = 12 # guards pathological re-export cycles
43
43
 
44
44
  DEPRECATED_DECORATOR_RE = re.compile(r"^(?:[\w.]+\.)?deprecated\b(?:\(.*\))?$", re.S)
@@ -4172,8 +4172,10 @@ def _bound_class(attr: griffe.Object) -> griffe.Class | None:
4172
4172
  def _bound_method(attr: griffe.Object) -> griffe.Function | None:
4173
4173
  """The method a module-level name is bound to through a module-level instance of one of the package's classes
4174
4174
  (DT-DATA-66): huggingface_hub's `api = HfApi()` then `list_models = api.list_models`. Python finds the bound
4175
- method under the name, which takes the method's parameters but `self`. None for any other value, an instance
4176
- made any other way than calling the class, or a member that isn't a function (a property)."""
4175
+ method under the name, which takes the method's parameters but `self`. The instance's class is the one it calls,
4176
+ else the one its annotation names (DT-DATA-83): streamlit 1.33+'s `_main: _DeltaGenerator =
4177
+ _dg_singleton._main_dg` then `pyplot = _main.pyplot`, and so on for 103 top-level `st.<name>`. None for any
4178
+ other value, an instance whose class neither says, or a member that isn't a function (a property)."""
4177
4179
  value = getattr(attr, "value", None)
4178
4180
  if (
4179
4181
  not isinstance(value, griffe.ExprAttribute)
@@ -4188,18 +4190,32 @@ def _bound_method(attr: griffe.Object) -> griffe.Function | None:
4188
4190
  holder = _resolve(attr.modules_collection[instance.canonical_path]) # type: ignore[union-attr]
4189
4191
  if holder is None or not holder.is_attribute or holder.parent is None or not holder.parent.is_module:
4190
4192
  return None
4193
+ cls = None
4191
4194
  call = getattr(holder, "value", None)
4192
- if not isinstance(call, griffe.ExprCall) or not isinstance(
4195
+ if isinstance(call, griffe.ExprCall) and isinstance(
4193
4196
  call.function, (griffe.ExprName, griffe.ExprAttribute)
4194
4197
  ):
4195
- return None
4196
- cls = _resolve(holder.modules_collection[call.function.canonical_path])
4197
- found = _member(cls, method.name, inherited=True) if cls is not None and cls.is_class else None # type: ignore[union-attr]
4198
+ cls = _class_at(holder, call.function)
4199
+ if cls is None:
4200
+ cls = _class_at(holder, getattr(holder, "annotation", None))
4201
+ found = _member(cls, method.name, inherited=True) if cls is not None else None
4198
4202
  except Exception: # outside the package, not loaded, or an alias griffe can't resolve
4199
4203
  return None
4200
4204
  return found if isinstance(found, griffe.Function) else None
4201
4205
 
4202
4206
 
4207
+ def _class_at(obj: griffe.Object, expr: object) -> griffe.Class | None:
4208
+ """The package's class a plain name or dotted name (not a subscript, a string or a call) resolves to from
4209
+ `obj`'s module; None for anything else, or a name outside the package."""
4210
+ if not isinstance(expr, (griffe.ExprName, griffe.ExprAttribute)):
4211
+ return None
4212
+ try:
4213
+ found = _resolve(obj.modules_collection[expr.canonical_path])
4214
+ except Exception: # outside the package, not loaded, or an alias griffe can't resolve
4215
+ return None
4216
+ return found if found is not None and found.is_class else None # type: ignore[return-value]
4217
+
4218
+
4203
4219
  def _metaclass(cls: griffe.Class) -> griffe.Class | None:
4204
4220
  """The package's class `cls` declares as its metaclass: `class Retry(metaclass=_RetryMeta)`, or six's
4205
4221
  `@six.add_metaclass(_RetryMeta)`, as urllib3 1.26 writes it (DT-DATA-69). None when it declares none, or one
@@ -244,7 +244,11 @@ class FrameOut(BaseModel):
244
244
 
245
245
 
246
246
  class ErrorSignalOut(BaseModel):
247
- kind: str
247
+ kind: str = Field(
248
+ description="What the error says: import_name | module_missing | module_attribute | object_attribute |"
249
+ " class_attribute | unexpected_kwarg | missing_argument | too_many_positional, or circular_import | unknown"
250
+ " (recognized and declined). New kinds may be added."
251
+ )
248
252
  exception_type: str
249
253
  message: str
250
254
  module: str | None = None
@@ -368,7 +372,9 @@ class ExplainResult(BaseModel):
368
372
  class CoverageEntry(BaseModel):
369
373
  package: str
370
374
  import_names: list[str]
371
- tier: str
375
+ tier: str = Field(
376
+ description="A: the AI and agent stack, the highest churn; B: other widely used libraries."
377
+ )
372
378
  versions_indexed: int
373
379
  first_version: str | None
374
380
  latest_version: str | None
@@ -382,7 +388,7 @@ class CoverageEntry(BaseModel):
382
388
 
383
389
  class CoverageResult(BaseModel):
384
390
  index_built_at: str | None
385
- policy: str
391
+ policy: str = Field(description="Which releases of each package are indexed, in a sentence.")
386
392
  packages: list[CoverageEntry]
387
393
  configured_but_not_indexed: list[str] = Field(default_factory=list)
388
394
 
@@ -488,8 +488,6 @@ def _handoff(result: UpgradeCheckResult) -> list[str]:
488
488
  step += f"; try {_plain(f.replacements[0].target)}"
489
489
  where = ", ".join(f"{_plain(loc.file)}:{loc.line}" for loc in locs) or "(no line recorded)"
490
490
  items.append(f"- {where}: {step}")
491
- if not items:
492
- return []
493
491
  # DT-GTM-08: an `unknown` is a use DepTime can't rule out, not one it cleared (DT-QA-05 lost 4 sessions on it)
494
492
  unsure = [
495
493
  f"- {', '.join(f'{_plain(loc.file)}:{loc.line}' for loc in x.locations) or '(no line recorded)'}: "
@@ -498,6 +496,8 @@ def _handoff(result: UpgradeCheckResult) -> list[str]:
498
496
  for x in p.notices
499
497
  if x.status == "unknown"
500
498
  ]
499
+ if not items and not unsure:
500
+ return []
501
501
  more = "- and {} more: run `deptime check-upgrade --format json` for all"
502
502
  shown = items[:MAX_HANDOFF_LINES]
503
503
  if len(items) > len(shown):
@@ -512,12 +512,21 @@ def _handoff(result: UpgradeCheckResult) -> list[str]:
512
512
  "<details><summary>For a coding agent</summary>",
513
513
  "",
514
514
  "```text",
515
- "DepTime confirmed these uses break with this update (failing at the new version, not at the old).",
516
- "Fix these lines:",
517
- *shown,
515
+ # DT-GTM-09 (from DT-QA-26): the block also shows when DepTime confirmed no break but can't tell about
516
+ # some uses, and says what to do without a replacement (the agent left 3 breaks it found as "not clear")
517
+ *(
518
+ [
519
+ "DepTime confirmed these uses break with this update (failing at the new version, not at the old).",
520
+ "Fix these lines. Where no replacement is given, find how the new version does the same thing (its"
521
+ " source, release notes or migration guide) and rewrite the code to it.",
522
+ *shown,
523
+ ]
524
+ if shown
525
+ else ["DepTime confirmed no break in this update."]
526
+ ),
518
527
  *tail,
519
528
  "Deprecations still work, and uses that fail at the old version too aren't caused by this update.",
520
- "Then run deptime check-upgrade again: it should find no breaks.",
529
+ *(["Then run deptime check-upgrade again: it should find no breaks."] if shown else []),
521
530
  "```",
522
531
  "",
523
532
  "</details>",
@@ -3417,7 +3417,9 @@ def test_a_name_bound_to_a_module_level_instances_method_takes_its_signature(tmp
3417
3417
  """DT-DATA-66: huggingface_hub binds its top-level functions as `api = HfApi()` then `list_models =
3418
3418
  api.list_models`; `list_models(model_name=...)` breaks where `HfApi.list_models` has no such parameter."""
3419
3419
  files = {
3420
- "hub/__init__.py": "from hub.api import HfApi, list_models, upload, whoami, size, made, other\n",
3420
+ "hub/__init__.py": (
3421
+ "from hub.api import HfApi, list_models, upload, whoami, size, made, other, typed, typed_made, maybe\n"
3422
+ ),
3421
3423
  "hub/base.py": ("class Base:\n def whoami(self, token=None):\n pass\n"),
3422
3424
  "hub/api.py": (
3423
3425
  "import warnings\n"
@@ -3437,6 +3439,13 @@ def test_a_name_bound_to_a_module_level_instances_method_takes_its_signature(tmp
3437
3439
  "made = factory().list_models\n"
3438
3440
  "_made = factory()\n"
3439
3441
  "other = _made.list_models\n"
3442
+ "from typing import Optional\n"
3443
+ "_typed: HfApi = _holder.api\n"
3444
+ "typed = _typed.list_models\n"
3445
+ "_typed_made: HfApi = factory()\n"
3446
+ "typed_made = _typed_made.upload\n"
3447
+ "_maybe: Optional[HfApi] = None\n"
3448
+ "maybe = _maybe.list_models\n"
3440
3449
  ),
3441
3450
  }
3442
3451
  snap = build_snapshot("hub", "1.0", ["hub"], _write(tmp_path, files))
@@ -3454,6 +3463,11 @@ def test_a_name_bound_to_a_module_level_instances_method_takes_its_signature(tmp
3454
3463
  # A property's value, and an instance not made by calling the class, stay attributes.
3455
3464
  assert symbols["hub.size"].kind == "attribute"
3456
3465
  assert symbols["hub.made"].kind == "attribute" and symbols["hub.other"].kind == "attribute"
3466
+ # DT-DATA-83: an instance its annotation types (streamlit 1.33+'s `_main: _DeltaGenerator = ...`), whatever its
3467
+ # value; not one typed through a subscript.
3468
+ assert [p["name"] for p in symbols["hub.typed"].params] == ["search", "limit"]
3469
+ assert [p["name"] for p in symbols["hub.typed_made"].params] == ["repo_id", "folder", "run_as_future"]
3470
+ assert symbols["hub.maybe"].kind == "attribute"
3457
3471
 
3458
3472
 
3459
3473
  def test_a_modules_version_is_public_however_it_is_bound(tmp_path):
@@ -305,6 +305,42 @@ def test_the_hand_off_asks_the_agent_to_check_unknown_uses():
305
305
  j = lines.index("- b.py:7: httpx.Maybe in httpx 2")
306
306
  assert i < j and "check each one yourself" in lines[j - 1]
307
307
  assert "httpx.Old" not in hand # a deprecation still works: nothing to do for this update
308
+ assert "Where no replacement is given" in hand # DT-GTM-09: rewrite it, don't leave it
309
+
310
+
311
+ def test_agent_block_lists_unknowns_without_breaks():
312
+ """DT-GTM-09: with no confirmed break, the uses DepTime can't tell about still reach the agent."""
313
+ from deptime.models import PackageUpgrade, UpgradeCheckResult, UpgradeNotice, UseLocation
314
+
315
+ notices = [
316
+ UpgradeNotice(
317
+ path="httpx.Maybe",
318
+ status="unknown",
319
+ detail="namespace package",
320
+ locations=[UseLocation(file="b.py", line=7)],
321
+ )
322
+ ]
323
+ res = UpgradeCheckResult(
324
+ project="p",
325
+ breaks=0,
326
+ checked=[
327
+ PackageUpgrade(
328
+ change=_change("1", "2"),
329
+ resolved_version="2",
330
+ exact=True,
331
+ uses=1,
332
+ files=1,
333
+ breaks=[],
334
+ notices=notices,
335
+ )
336
+ ],
337
+ )
338
+ hand = to_markdown(res).split("For a coding agent", 1)[1]
339
+ assert "DepTime confirmed no break in this update." in hand
340
+ assert "- b.py:7: httpx.Maybe in httpx 2" in hand
341
+ assert "run deptime check-upgrade again" not in hand
342
+ res.checked[0].notices = []
343
+ assert "For a coding agent" not in to_markdown(res)
308
344
 
309
345
 
310
346
  def test_project_files_follow_gitignore(tmp_path):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes