bpo-40870: Invalidate usage of some constants with ast.Name (GH-20649)

(cherry picked from commit 68874a8502da440a1dc4746cf73262648b870aee)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
3 files changed