Skip to content

Running Transcrypt with python 3.14 #904

@aero-wubook

Description

@aero-wubook

Hi,

I know Transcrypt is not intended to support Python 3.14, but let me open this issue just in case it helps others facing same problems.

Despite latest version of Transcrypt (3.9.4) supports Python 3.9, I've observed it perfectly runs on newer Python versions. At least on our company's codebase, where a considerable part is transcrypted.

I find problems just from Python 3.14. Actually, just on problem (about ast) and one warning (about regex). I share a patch for org/transcrypt/compiler.py.

  • ast errors

We previously had clases like ast.Str, ast.Num, ast.Bytes, etc; and these classes had attributes like s and n. Since ast 3.14 we have ast.Constant and the attribute is value.

  • regex warning

Normal strings cannot be used with re.match, for example:

re.match ('[a-zA-Z0-9_]+\.setter', nameCheck):

Solution is to convert them to raw string.

The patch

Found the patch attached.
transcrypt-with-python-3.14.patch

Hope it helps. Thnks for the work!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions