Skip to content

drop 'tomli' dependency - #297

Merged
chyunsu3 merged 1 commit into
rapidsai:mainfrom
jameslamb:drop-tomli
Nov 26, 2026
Merged

chyunsu3 merged 1 commit into
rapidsai:mainfrom
jameslamb:drop-tomli

Conversation

@jameslamb

Copy link
Copy Markdown
Member

Contributes to rapidsai/build-planning#352

From Python 3.11 onwards, the Python standard library has TOML support via tomllib. The minimum supported python here is 3.12, so we can safely drop uses of the third-party library tomli.

@jameslamb jameslamb added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Nov 20, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 20, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@jameslamb

Copy link
Copy Markdown
Member Author

/ok to test e3c64ba

@github-actions github-actions Bot added conda Relates to conda packaging CUDA/C++ labels Nov 20, 2026
@jameslamb jameslamb mentioned this pull request Nov 20, 2026
7 of 15 tasks
@jameslamb jameslamb changed the title WIP: drop 'tomli' dependency drop 'tomli' dependency Nov 20, 2026
@jameslamb
jameslamb marked this pull request as ready for review November 20, 2026 16:01
@jameslamb
jameslamb requested review from a team as code owners November 20, 2026 16:01
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Removed an unnecessary TOML parsing dependency from the development tooling.
  • Bug Fixes
    • TOML configuration continues to be parsed with Python’s built-in support, with existing fallback and error handling preserved.

The clang-tidy script now uses Python’s standard-library tomllib to parse TOML configuration. The tomli dependency was removed from the pre-commit hook and clang-tidy dependency declarations. The script’s copyright notice was also updated.

Changes: TOML Parser and Dependency Updates

Layer / File(s) Summary
Use tomllib and remove tomli
cpp/scripts/run-clang-tidy.py, .pre-commit-config.yaml, conda/environments/clang_tidy_cuda-129_arch-x86_64.yaml, conda/environments/clang_tidy_cuda-134_arch-x86_64.yaml, dependencies.yaml
The script uses tomllib and retains its missing-key fallback and TOML decoding error handling. The tomli declarations were removed. The copyright notice was updated.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Refactor

Suggested reviewers: chyunsu3

Merge Risk: Minimal · up to e3c64

This change switches TOML parsing in the clang-tidy script to Python's standard library and removes the now-unneeded tomli dependency. No concrete risk was found. The project requires Python 3.12 or newer, which includes tomllib.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title 'drop tomli dependency' matches the changeset. The PR removes tomli from the pre-commit codespell hook, the clang-tidy conda environments, and the dependencies.yaml clang_tidy group. run-cla…
Description check Passed The description says the project's minimum Python is 3.12, so tomllib from the standard library can replace the third-party tomli package. It links issue #352. This matches the changeset, which remove…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title 'drop tomli dependency' matches the changeset. The PR removes tomli from the pre-commit codespell hook, the clang-tidy conda environments, and the dependencies.yaml clang_tidy group. run-clang-tidy.py switches to the standard-library tomllib. The title is short, specific, and names the primary change.

Full details: Description check

Explanation

The description says the project's minimum Python is 3.12, so tomllib from the standard library can replace the third-party tomli package. It links issue #352. This matches the changeset, which removes tomli usage and switches run-clang-tidy.py to tomllib.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 2f4090c and e3c64ba.

Files selected for processing: 5

  • .pre-commit-config.yaml
  • conda/environments/clang_tidy_cuda-129_arch-x86_64.yaml
  • conda/environments/clang_tidy_cuda-134_arch-x86_64.yaml
  • cpp/scripts/run-clang-tidy.py
  • dependencies.yaml
Files with no reviewable changes: 4

  • .pre-commit-config.yaml
  • conda/environments/clang_tidy_cuda-129_arch-x86_64.yaml
  • conda/environments/clang_tidy_cuda-134_arch-x86_64.yaml
  • dependencies.yaml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@chyunsu3
chyunsu3 merged commit 812cda6 into rapidsai:main Nov 26, 2026
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conda Relates to conda packaging CUDA/C++ improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants