File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ email-validator==2.2.0 ; python_version >= "3.8" and python_version < "3.14"
6767exceptiongroup==1.2.2 ; python_version >= "3.8" and python_version < "3.11"
6868fastapi-slim==0.115.2 ; python_version >= "3.8" and python_version < "3.14"
6969filelock==3.16.1 ; python_version >= "3.8" and python_version < "3.14"
70+ fissix==24.4.24 ; python_version >= "3.13" and python_version < "3.14"
7071frozenlist==1.4.1 ; python_version >= "3.8" and python_version < "3.14"
7172fs==2.4.16 ; python_version >= "3.8" and python_version < "3.14"
7273fsspec==2024.9.0 ; python_version >= "3.8" and python_version < "3.14"
Original file line number Diff line number Diff line change 11"""Entry point for the usage of Cheetah templating within Galaxy."""
22
3+ import sys
34import traceback
4- from lib2to3 .refactor import RefactoringTool
55
66from Cheetah .Compiler import Compiler
77from Cheetah .NameMapper import NotFound
88from Cheetah .Parser import ParseError
99from Cheetah .Template import Template
1010from packaging .version import Version
11- from past .translation import myfixes
1211
1312from galaxy .util .tree_dict import TreeDict
1413from . import unicodify
1514
15+ if sys .version_info >= (3 , 13 ):
16+ import fissix
17+ from fissix import (
18+ fixes as fissix_fixes ,
19+ pgen2 as fissix_pgen2 ,
20+ refactor as fissix_refactor ,
21+ )
22+
23+ sys .modules ["lib2to3" ] = fissix
24+ sys .modules ["lib2to3.fixes" ] = fissix_fixes
25+ sys .modules ["lib2to3.pgen2" ] = fissix_pgen2
26+ sys .modules ["lib2to3.refactor" ] = fissix_refactor
27+
28+ from lib2to3 .refactor import RefactoringTool
29+
30+ from past .translation import myfixes
31+
1632# Skip libpasteurize fixers, which make sure code is py2 and py3 compatible.
1733# This is not needed, we only translate code on py3.
1834myfixes = [f for f in myfixes if not f .startswith ("libpasteurize" )]
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ jstree =
5454 dictobj
5555template =
5656 CT3>=3.3.3
57+ fissix; python_version>='3.13'
5758 future>=1.0.0
5859config_template =
5960 Jinja2
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ docutils = "!=0.17, !=0.17.1"
5858dparse = " *"
5959edam-ontology = " *"
6060fastapi-slim = " >=0.111.0"
61+ fissix = { version = " *" , python = " >=3.13" }
6162fs = " *"
6263future = " >=1.0.0" # Python 3.12 support
6364graphene = " *"
You can’t perform that action at this time.
0 commit comments