gh-90953: Don't use deprecated AST nodes in clinic.py by AlexWaygood · Pull Request #104322 · python/cpython (original) (raw)

Following 376137f, usage of ast.Num and ast.Str causes DeprecationWarnings to be emitted. This PR updates clinic.py to use the newer AST nodes, avoiding deprecation warnings when running test_clinic.py.

It looks like this script currently takes pains so that it can maintain compatibility with older Python versions. This change means that it won't be possible to run it on Python 3.7 anymore, but Python 3.7 is nearly end-of-life now anyway.