AD7 d dl mZ d dlZd dlmZ d dlZd dlZd dlZd dlZd dl Z d dl Z d dlmZ d dl mZ d dlmZ ddlmZ dd lmZ ddZddZddZddZddZdS ) )annotationsN) ExitStack)Optional) exceptions)Template )compat)CommandError template_filestrdestoutput_encodingreturnNonec t | } |j di | | }t |d 5 }| | d d d d S # 1 swxY w Y d S # t j dd 5 }| t j | |j }d d d n# 1 swxY w Y t d|z xY w)N)filenamewbz.txtF)suffixdeletezDTemplate rendering failed; see %s for a template-oriented traceback. )r render_unicodeencodeopenwritetempfileNamedTemporaryFiler text_error_templatenamer ) r r r kwtemplateoutputfntffnames f/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/alembic/util/pyfiles.pytemplate_to_filer&