Coverage for jinja2_async_environment/compiler.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-09-03 14:09 -0700

1"""Async compiler module with backward compatibility exports. 

2 

3This module provides backward compatibility by re-exporting all classes 

4from the new modular compiler structure. 

5""" 

6 

7# Import all classes from the new modular structure 

8from jinja2.compiler import CodeGenerator 

9 

10from .compiler_modules.cache import CompilationCache 

11from .compiler_modules.codegen import AsyncCodeGenerator, _compilation_cache 

12from .compiler_modules.dependencies import DependencyResolver 

13from .compiler_modules.frame import AsyncFrame 

14from .compiler_modules.loops import LoopCodeGenerator 

15from .compiler_modules.patterns import CompiledPatterns 

16 

17# Export all classes for backward compatibility 

18__all__ = [ 

19 "CompiledPatterns", 

20 "CompilationCache", 

21 "DependencyResolver", 

22 "LoopCodeGenerator", 

23 "AsyncFrame", 

24 "AsyncCodeGenerator", 

25 "CodeGenerator", 

26 "_compilation_cache", 

27] 

28 

29# Global compilation cache instance for backward compatibility 

30# This ensures existing code that imports _compilation_cache still works 

31_compilation_cache = _compilation_cache