PendingDeprecationWarning
PythonWARNINGCommonWarning
Feature may be deprecated in a future release
Quick Answer
Enable with -W all to see all PendingDeprecationWarnings during development; plan migration before they become DeprecationWarnings.
Production Risk
Low.
What this means
Signals that a feature may be deprecated in a future Python version but has not been formally deprecated yet. Silenced by default — only visible when warnings are explicitly enabled.
Why it happens
- 1Using a feature that the Python team is considering for deprecation in the next major version
Fix
Enable and audit during CI
Enable and audit during CI
# Run with all warnings enabled python -W all my_script.py # Or in pytest pytest -W error::PendingDeprecationWarning
Why this works
Treating PendingDeprecationWarning as errors in CI prevents gradual accumulation of deferred migration work.
Sources
Official documentation ↗
Python Docs
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev