Skip to content

chore(deps): remove unused Python dependencies - #6103

Merged
Yicong-Huang merged 1 commit into
apache:mainfrom
Yicong-Huang:chore/python-deps-cleanup
Jul 5, 2026
Merged

chore(deps): remove unused Python dependencies#6103
Yicong-Huang merged 1 commit into
apache:mainfrom
Yicong-Huang:chore/python-deps-cleanup

Conversation

@Yicong-Huang

@Yicong-Huang Yicong-Huang commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Removes three Python packages that nothing uses and moves ruff to the dev-only requirements file:

Package File Why it can go
Deprecated==1.2.14 requirements.txt Last import removed in #2847; no installed package requires it
protobuf==7.34.1 requirements.txt No google.protobuf import anywhere; betterproto 2.0 runtime does not depend on it (only its optional extras do)
pybase64==1.3.2 operator-requirements.txt Added in #2167, but the operator templates have always used the stdlib base64 (see ImageUtility.scala in that PR) — zero references to pybase64 in the entire git history
ruff==0.14.7 requirements.txt → dev-requirements.txt Lint tool, not a runtime dependency; keeping it in requirements.txt wrongly puts it in LICENSE-binary-python

Follow-up changes required by the move/removals:

  • .github/workflows/build.yml: the "Lint with Ruff" step now runs after "Install dev dependencies", since ruff comes from dev-requirements.txt.
  • amber/LICENSE-binary-python: dropped the four matching entries. wrapt stays — it is still a hard dependency of aiobotocore, not just of Deprecated.
  • Added # Not imported directly: ... comments to the transitive pins (setuptools, python-dateutil, s3fs/aiobotocore, SQLAlchemy/pg8000, scikit-image) so they don't look unused in future audits.

Any related issues, documentation, discussions?

Closes #6101

How was this PR tested?

Uninstalled the three packages from the local venv (pip uninstall -y protobuf Deprecated pybase64), then ran the existing test suite and the same lint commands CI runs:

cd amber && pytest -m "not integration" -q
# 551 passed, 1 deselected in 64s
cd amber && ruff check src/main/python src/test/python && ruff format --check src/main/python src/test/python
# All checks passed! 190 files already formatted

No new tests: dependency-manifest-only change; CI's check_binary_deps.py license gate verifies the LICENSE-binary-python entries match the installed set.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-fable-5)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file pyamber ci changes related to CI labels Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @Ma77Ball
    You can notify them by mentioning @Ma77Ball in a comment.

@codecov-commenter

codecov-commenter commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.09%. Comparing base (4c9d30a) to head (d4f5714).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6103      +/-   ##
============================================
- Coverage     59.11%   59.09%   -0.03%     
- Complexity     3197     3199       +2     
============================================
  Files          1132     1132              
  Lines         43674    43674              
  Branches       4734     4734              
============================================
- Hits          25820    25810      -10     
- Misses        16420    16432      +12     
+ Partials       1434     1432       -2     
Flag Coverage Δ
access-control-service 70.00% <ø> (ø)
agent-service 44.59% <ø> (ø)
amber 63.10% <ø> (+0.01%) ⬆️
computing-unit-managing-service 0.00% <ø> (ø)
config-service 52.30% <ø> (ø)
file-service 62.81% <ø> (ø)
frontend 51.31% <ø> (-0.07%) ⬇️
notebook-migration-service 78.57% <ø> (ø)
pyamber 91.15% <ø> (ø)
workflow-compiling-service 55.14% <ø> (ø)

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 4 better · 🔴 2 worse · ⚪ 9 noise (<±5%) · 0 without baseline

Compared against main 4c9d30a benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 404 0.247 23,933/28,705/28,705 us 🟢 -15.4% / 🔴 +89.6%
🔴 bs=100 sw=10 sl=64 811 0.495 122,651/132,276/132,276 us 🟢 -9.4% / 🔴 +22.5%
bs=1000 sw=10 sl=64 947 0.578 1,056,931/1,104,341/1,104,341 us ⚪ within ±5% / 🔴 +7.4%
Baseline details

Latest main 4c9d30a from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 404 tuples/sec 422 tuples/sec 776.36 tuples/sec -4.3% -48.0%
bs=10 sw=10 sl=64 MB/s 0.247 MB/s 0.258 MB/s 0.474 MB/s -4.3% -47.9%
bs=10 sw=10 sl=64 p50 23,933 us 21,748 us 12,636 us +10.0% +89.4%
bs=10 sw=10 sl=64 p95 28,705 us 33,941 us 15,143 us -15.4% +89.6%
bs=10 sw=10 sl=64 p99 28,705 us 33,941 us 18,954 us -15.4% +51.4%
bs=100 sw=10 sl=64 throughput 811 tuples/sec 851 tuples/sec 985.33 tuples/sec -4.7% -17.7%
bs=100 sw=10 sl=64 MB/s 0.495 MB/s 0.519 MB/s 0.601 MB/s -4.6% -17.7%
bs=100 sw=10 sl=64 p50 122,651 us 116,109 us 101,671 us +5.6% +20.6%
bs=100 sw=10 sl=64 p95 132,276 us 146,044 us 107,939 us -9.4% +22.5%
bs=100 sw=10 sl=64 p99 132,276 us 146,044 us 113,798 us -9.4% +16.2%
bs=1000 sw=10 sl=64 throughput 947 tuples/sec 954 tuples/sec 1,016 tuples/sec -0.7% -6.8%
bs=1000 sw=10 sl=64 MB/s 0.578 MB/s 0.582 MB/s 0.62 MB/s -0.7% -6.8%
bs=1000 sw=10 sl=64 p50 1,056,931 us 1,045,746 us 989,693 us +1.1% +6.8%
bs=1000 sw=10 sl=64 p95 1,104,341 us 1,105,873 us 1,028,327 us -0.1% +7.4%
bs=1000 sw=10 sl=64 p99 1,104,341 us 1,105,873 us 1,059,969 us -0.1% +4.2%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,494.79,200,128000,404,0.247,23932.72,28705.45,28705.45
1,100,10,64,20,2466.53,2000,1280000,811,0.495,122651.30,132276.28,132276.28
2,1000,10,64,20,21123.55,20000,12800000,947,0.578,1056930.71,1104340.92,1104340.92

@xuang7

xuang7 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Per our discussion, this unused dependency removal will not be backported to the release branch for now, since it would require changes to the CI file and requirements.txt, which may introduce conflicts. We can leave the unused dependency as is for now.

@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jul 5, 2026
Merged via the queue into apache:main with commit 44ec60d Jul 5, 2026
81 of 86 checks passed
@Yicong-Huang
Yicong-Huang deleted the chore/python-deps-cleanup branch July 5, 2026 08:09
Yicong-Huang added a commit to Yicong-Huang/texera that referenced this pull request Jul 17, 2026
…#6110)

### What changes were proposed in this PR?

Audits the explicit transitive pins in `amber/requirements.txt` and
removes the two that serve no purpose. Verified with the pip dependency
graph (`Required-by`) and a full `pip install --dry-run --report`
resolution:

| Pin | Verdict | Why |
| --- | --- | --- |
| `python-dateutil==2.8.2` | **Drop** | Required by six installed
packages (pandas, botocore, betterproto, pg8000, aiobotocore,
strictyaml) — always installed regardless. A `pip freeze` leftover from
the original requirements.txt (apache#1259); every dependent declares `>=2.8`,
so the pin only held us on a 2021 release. Resolves to 2.9.0.post0 |
| `aiobotocore==3.7.0` | **Drop** | Hard dependency of s3fs; its version
is already uniquely constrained by the `botocore==1.42.90` pin
(aiobotocore's per-release botocore window is very narrow). Removing it
eliminates a manual pairing hazard when bumping the boto3/botocore pins.
Still resolves to 3.7.0 |
| `s3fs`, `SQLAlchemy`, `pg8000` | Keep | Empty `Required-by` —
pyiceberg only pulls them via extras, so dropping them would actually
uninstall them (Iceberg S3 FileIO / SqlCatalog would break at runtime).
pg8000 deliberately replaces LGPL psycopg2 (apache#3299) |
| `setuptools==80.10.2` | Keep | Guards `fs`'s `pkg_resources` import
against newer setuptools removing it (apache#4199); `fs` declares setuptools
with no version bound |

`amber/LICENSE-binary-python` updates `python-dateutil` to the resolved
2.9.0.post0 (it stays installed transitively, so the
`check_binary_deps.py` gate still requires the claim); aiobotocore
already claims 3.7.0, which is unchanged by the resolution.

### Any related issues, documentation, discussions?

Closes apache#6108. Follow-up to apache#6101 / apache#6103.

### How was this PR tested?

- `pip install --dry-run --ignore-installed --report` without the pins:
resolution unchanged except python-dateutil → 2.9.0.post0;
aiobotocore/botocore/boto3 stay at their current versions.
- Upgraded the local venv to the resolved versions and ran the existing
pyamber suite (`pytest -m "not integration"`) — passes.
- CI's pyamber leg re-resolves from scratch and `check_binary_deps.py`
verifies the LICENSE-binary-python claims.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-fable-5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Yicong Huang <17627829+Yicong-Huang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI dependencies Pull requests that update a dependency file pyamber

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused Python dependencies and move ruff to dev-requirements

4 participants