Running Transcrypt with python 3.14

Đang mở
#904 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
compilers

Hướng nghiên cứu

Start with org/transcrypt/compiler.py and inspect the attached transcrypt-with-python-3.14.patch. Run Transcrypt with Python 3.14, then verify that the reported ast errors and regex warning are resolved without breaking the existing compilation behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

PRIO: 1 must

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!

Ngôn ngữ chính
Python
Star
2.9k
Fork
218
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TranscryptOrg/Transcrypt

Tất cả issue của TranscryptOrg/Transcrypt

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.