# RecursionError: maximum recursion depth exceeded

- **ID:** `python/pytest-recursion-error-fixture`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A fixture depends on itself directly or indirectly (e.g., `def a(b): ...` and `def b(a): ...`), causing infinite recursion during fixture resolution.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.x | active | — | — |
| 8.x | active | — | — |

## Workarounds

1. **** (85% success)
   ```
   @pytest.fixture
def a(request):
    b = request.getfixturevalue('b')
    ...
   ```
2. **** (95% success)
   ```
   def _common_setup(): ...

@pytest.fixture
def a():
    return _common_setup()

@pytest.fixture
def b():
    return _common_setup()
   ```

## Dead Ends

- **** — Delays the crash and may cause a segfault; does not fix the circular dependency. (90% fail)
- **** — If the dependency is intentional, renaming breaks the chain; if not, it may still be circular. (60% fail)
