Skip to content

build: drop dead tomli fallback (closes #330) - #339

Merged
robotrocketscience merged 1 commit into
mainfrom
fix/issue-330-resign-tomli
May 1, 2026
Merged

build: drop dead tomli fallback (closes #330)#339
robotrocketscience merged 1 commit into
mainfrom
fix/issue-330-resign-tomli

Conversation

@robotrocketscience

@robotrocketscience robotrocketscience commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #330 option A. pyproject.toml declares requires-python = ">=3.12", so the tomli fallback in src/aelfrice/deferred_feedback.py:46-49 is unreachable (stdlib tomllib ships in 3.11+). Drop the try/except and the matching DEP003 deptry ignore.

Why a third PR

Prior #332 and #337 had byte-identical diffs but the auto-rebase workflow rewrote both as github-actions[bot] (no signing key), and the branch ruleset requires signed commits. Result: neither was mergeable. This PR re-applies the same change as a freshly signed commit so it can land. Filing the auto-rebase signing strip as a separate ruleset/CI bug.

Verification

  • uv run python -c "from aelfrice import deferred_feedback" → import ok.
  • uvx deptry src → "Success! No dependency issues found."
  • Discretion grep clean.

Closes #330. Supersedes #332 and #337.

Summary by Sourcery

Remove the obsolete tomli fallback now that the project requires Python 3.12+ and relies solely on the standard-library tomllib.

Enhancements:

  • Simplify deferred feedback configuration by dropping dead code related to tomli fallback.

Build:

  • Clean up deptry configuration by removing the unused DEP003 ignore entry for tomli.

@sourcery-ai

sourcery-ai Bot commented May 1, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes the now-unreachable tomli fallback in favor of always using the standard-library tomllib, and drops the corresponding deptry ignore configuration, aligning the project with its Python >=3.12 requirement.

File-Level Changes

Change Details Files
Simplify deferred feedback TOML loading to rely solely on stdlib tomllib and remove the legacy third-party tomli fallback.
  • Remove the try/except import block that conditionally imported tomllib and fell back to tomli on ImportError.
  • Clean up any remaining references or type hints related to the optional tomli dependency in the deferred feedback module.
src/aelfrice/deferred_feedback.py
Update deptry configuration to stop ignoring the deprecated tomli dependency now that it is no longer referenced anywhere.
  • Delete the DEP003 deptry ignore entry that documented tomli as a Python 3.10 fallback for tomllib.
  • Keep all other deptry configuration entries unchanged.
pyproject.toml

Assessment against linked issues

Issue Objective Addressed Explanation
#330 Ensure the toml-loading code either (A) removes the third-party tomli fallback and uses only stdlib tomllib (dropping Python <3.11), or (B) declares tomli as a conditional runtime dependency for Python <3.11.
#330 Remove the DEP003 tomli entry from [tool.deptry.per_rule_ignores] in pyproject.toml.
#330 Keep the project working (tests/imports) on all declared supported Python versions after the change.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@robotrocketscience has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 41 minutes and 29 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c53bb590-284f-4a17-b95d-724e189dff95

📥 Commits

Reviewing files that changed from the base of the PR and between aba8bed and 1613633.

📒 Files selected for processing (2)
  • pyproject.toml
  • src/aelfrice/deferred_feedback.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-330-resign-tomli

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 41 minutes and 29 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

`requires-python = ">=3.12"` makes the `try: import tomllib / except ImportError: import tomli` fallback unreachable; stdlib tomllib ships in 3.11+. Drop the try/except and the matching DEP003 deptry ignore.

Resigned, signed-commit version: prior PRs #332 and #337 had identical diffs but were unsigned after the auto-rebase workflow rewrote them as github-actions[bot]; ruleset requires signatures, so neither was mergeable. Closing both as superseded.
@robotrocketscience
robotrocketscience force-pushed the fix/issue-330-resign-tomli branch from e578785 to 1613633 Compare May 1, 2026 16:05
@robotrocketscience

Copy link
Copy Markdown
Owner Author

[claim:review:Setr:2026-05-01T16:06:44Z]

@robotrocketscience
robotrocketscience merged commit 1613633 into main May 1, 2026
16 checks passed
@robotrocketscience
robotrocketscience deleted the fix/issue-330-resign-tomli branch May 1, 2026 16:07
@robotrocketscience

Copy link
Copy Markdown
Owner Author

[release:review:Setr:2026-05-01T16:08:01Z]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build: replace tomli fallback with stdlib tomllib (drop Py 3.10) or declare tomli

1 participant