# pytest.PytestDeprecationWarning: The 'func' argument is deprecated, use 'function' instead

- **ID:** `python/pytest-warning-as-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using a deprecated parameter in a pytest function, which is treated as an error due to the -W error::pytest.PytestDeprecationWarning filter.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Update the code to use the new parameter: replace `func` with `function` in the call.
   ```
2. **** (85% success)
   ```
   Temporarily allow the warning in pytest.ini: `filterwarnings = default::pytest.PytestDeprecationWarning`
   ```

## Dead Ends

- **** — This hides important deprecation notices that should be addressed for future compatibility. (80% fail)
- **** — This is a temporary fix that prevents using newer features and security patches. (90% fail)
