Skip to content

ast.Str deprecated and emitting warnings, replace with ast.Constant before Python 3.14 #524

@timkpaine

Description

@timkpaine
/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:769: 273 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:769: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    value=ast.Tuple(elts=[ast.Str(self._NODE_P_VARNAME), ast.Num(n=0)], ctx=ast.Load()),

/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:769: 273 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:769: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    value=ast.Tuple(elts=[ast.Str(self._NODE_P_VARNAME), ast.Num(n=0)], ctx=ast.Load()),

/opt/homebrew/Cellar/[email protected]/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ast.py:587: 1765 warnings
  /opt/homebrew/Cellar/[email protected]/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ast.py:587: DeprecationWarning: Attribute n is deprecated and will be removed in Python 3.14; use value instead
    return Constant(*args, **kwargs)

/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:804: 272 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:804: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    elts=[ast.Str(s=self._OUTPUT_PROXY_VARNAME), ast.Num(n=output.ts_idx)], ctx=ast.Load()

/opt/homebrew/Cellar/[email protected]/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ast.py:587: 1493 warnings
  /opt/homebrew/Cellar/[email protected]/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ast.py:587: DeprecationWarning: Attribute s is deprecated and will be removed in Python 3.14; use value instead
    return Constant(*args, **kwargs)

/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:804: 272 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:804: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    elts=[ast.Str(s=self._OUTPUT_PROXY_VARNAME), ast.Num(n=output.ts_idx)], ctx=ast.Load()

/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:827: 273 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:827: DeprecationWarning: ast.NameConstant is deprecated and will be removed in Python 3.14; use ast.Constant instead
    body = [ast.While(test=ast.NameConstant(value=True), orelse=[], body=innerbody)]

/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:783: 616 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:783: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    elts=[ast.Str(s=self._INPUT_PROXY_VARNAME), ast.Num(n=inp.ts_idx)], ctx=ast.Load()

/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:783: 616 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:783: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    elts=[ast.Str(s=self._INPUT_PROXY_VARNAME), ast.Num(n=inp.ts_idx)], ctx=ast.Load()

/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:792: 605 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:792: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    elts=[ast.Str(s=self._INPUT_VAR_VARNAME), ast.Num(n=inp.ts_idx)], ctx=ast.Load()

/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:792: 605 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:792: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    elts=[ast.Str(s=self._INPUT_VAR_VARNAME), ast.Num(n=inp.ts_idx)], ctx=ast.Load()

/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/base_parser.py:264: 65 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/base_parser.py:264: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    if isinstance(body_item, ast.Expr) and isinstance(body_item.value, ast.Str):

/opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:681: 25 warnings
  /opt/homebrew/lib/python3.12/site-packages/csp/impl/wiring/node_parser.py:681: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    if not isinstance(node, ast.Expr) or not isinstance(node.value, ast.Str):

Metadata

Metadata

Assignees

No one assigned

    Labels

    tag: internalIssues and PRs for maintainance of the project - not interesting to external userstype: enhancementIssues and PRs related to improvements to existing features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions