# RecursionError: maximum recursion depth exceeded while calling a Python object

- **ID:** `python/recursionerror-maximum-recursion-depth`
- **Domain:** python
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A test function or fixture calls itself recursively without a base case, or a mock setup causes infinite recursion.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## Workarounds

1. **Add a base case to recursive function** (95% success)
   ```
   def recursive_func(n):
    if n <= 0: return
    recursive_func(n-1)
   ```
2. **Use iterative approach instead of recursion** (90% success)
   ```
   def iterative_func(n):
    while n > 0:
        n -= 1
   ```

## Dead Ends

- **Increasing recursion limit with sys.setrecursionlimit** — Postpones the problem; may cause stack overflow or crash. (70% fail)
- **Ignoring the error** — The test will always fail until recursion is fixed. (90% fail)
