122982 ❲2025-2026❳

For most developers, this is rarely the intended result. Usually, someone using ~ on a boolean actually wants the logical NOT ( not True ), which correctly returns False . Because of this common point of confusion, the Python steering committee decided to deprecate bitwise inversion on booleans to encourage clearer coding practices. What’s New in Issue #122982?

Large codebases and libraries need time to refactor code that might be legacy or automatically generated.

Keep an eye on your console for those DeprecationWarnings —they are there to help you stay ahead of the curve!

Originally, the plan was to move toward a full error or a more aggressive deprecation schedule. However, Issue #122982 proposes . This extension serves a few key purposes: