[New-bugs-announce] [issue46797] ast.Constant.n deprecated without warning

Jakub Wilk report at bugs.python.org
Sat Feb 19 03:29:16 EST 2022

New submission from Jakub Wilk <jwilk at jwilk.net>:

ast.Constant.n is documented to be deprecated, but you don't get any warning when you use it:

$ python3.11 -Wd
Python 3.11.0a5 (main, Feb 12 2022, 17:11:59) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> help(ast.Constant.n)
Help on property:

    Deprecated. Use value instead.

>>> ast.Constant(value=42).n

components: Library (Lib)
messages: 413541
nosy: jwilk, serhiy.storchaka
priority: normal
severity: normal
status: open
title: ast.Constant.n deprecated without warning
versions: Python 3.11

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list