Skip to content

Conversation

@dhruvpatel848
Copy link

@dhruvpatel848 dhruvpatel848 commented Feb 11, 2026

Description

Removes the unused RestrictedPython>=7.0 dependency from tools/pyproject.toml. This dependency was declared in the sandbox and all extras but is never imported or used anywhere in the tools source code.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

Fixes #1137

Changes Made

  • Removed the entire sandbox optional dependency section (lines 41-43) as it only contained RestrictedPython>=7.0
  • Removed RestrictedPython>=7.0 from the all extra (line 52)

Problem

The RestrictedPython>=7.0 package was declared as an optional dependency in the sandbox and all extras, but is never imported or used anywhere in the tools source code. This creates confusion about the package's capabilities.

Evidence

  • Declared in tools/pyproject.toml lines 42 and 52
  • grep -r "RestrictedPython" tools/src returns 0 results
  • No exec(), eval(), or compile() calls that would require restricted execution
  • The term "sandbox" in this codebase refers to file system path sandboxing (implemented in tools/src/aden_tools/tools/file_system_toolkits/security.py), not Python code execution sandboxing

Impact

  • Cleaner dependencies - Removes misleading dependency
  • Faster installs - One less package to download
  • Clearer intent - Won't confuse users looking for code execution features
  • Reduced attack surface - One less dependency to audit

Testing

  • Verified pyproject.toml syntax is valid (proper TOML structure maintained)
  • Confirmed no code imports or references RestrictedPython
  • File system sandboxing functionality is independent of this dependency
  • Unit tests pass (cd tools && uv run pytest tests/)
  • Lint passes (make check)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas (N/A - only dependency removal)
  • I have made corresponding changes to the documentation (N/A - no user-facing docs reference this)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (N/A - removing unused dependency)
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

N/A - This is a dependency configuration change with no UI impact.

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.

Code Quality: Remove Unused RestrictedPython Dependency

1 participant