Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE][Easy] Remove usage of deprecated
ast.Str
, ast.Ellipsis
and `…
…ast.NameConstant` (pytorch#125912) `ast.Str`, `ast.Ellipsis`, and `ast.NameConstant` are deprecated in Python 3.8 and will be removed in Python 3.14. Replace them with `ast.Constant`. Ref: https://docs.python.org/3/library/ast.html#node-classes > **Changed in version 3.8:** Class [ast.Constant](https://docs.python.org/3/library/ast.html#ast.Constant) is now used for all constants. > > **Deprecated since version 3.8:** Old classes ast.Num, ast.Str, ast.Bytes, ast.NameConstant and ast.Ellipsis are still available, but they will be removed in future Python releases. In the meantime, instantiating them will return an instance of a different class. CI log: https://github.com/metaopt/torchopt/actions/runs/9031146681/job/24816802280?pr=216#step:11:6706 Pull Request resolved: pytorch#125912 Approved by: https://github.com/soulitzer
- Loading branch information