Skip to content

ImportError: cannot import name '_const_node_type_names' from 'ast' (/usr/lib/python3.14/ast.py) #836

@ramazaaan

Description

@ramazaaan

Description
Rope fails to import _const_node_type_names when running on Python 3.14:
ImportError: cannot import name '_const_node_type_names' from 'ast'
The fallback code asserts sys.version_info < (3, 8), which fails on Python 3.14.

Workaround:
_const_node_type_names = {
bool: "Constant",
type(None): "Constant",
int: "Constant",
float: "Constant",
complex: "Constant",
str: "Constant",
bytes: "Constant",
type(...): "Constant",
}

To Reproduce
Install Python 3.14
Import Rope or run any tool that triggers rope.base.ast

Editor information (please complete the following information):

  • Python version: 3.14
  • Rope version: 1.13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected or incorrect user-visible behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions