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

...
conftest.py:10: in db
    request.getfixturevalue('db')
conftest.py:10: in db
    request.getfixturevalue('db')
...

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

## Root Cause

A fixture calls request.getfixturevalue() with its own name, creating an infinite recursion. This often happens when refactoring fixtures and accidentally referencing the wrong name.

## Version Compatibility

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

## Workarounds

1. **** (98% success)
   ```
   @pytest.fixture
def db(request):
    engine = request.getfixturevalue('engine')  # not 'db'
    return engine.connect()
   ```
2. **** (95% success)
   ```
   @pytest.fixture
def db(engine):  # pytest injects engine directly
    return engine.connect()
   ```

## Dead Ends

- **** — Delays the crash but the infinite recursion still exhausts memory and eventually raises RecursionError or crashes the interpreter. (90% fail)
- **** — The recursion happens during fixture resolution before the try block can catch it in a useful way. (95% fail)
