From db38266f1d72f819614bb9ea641ca160ba677c88 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 10 Jun 2025 18:21:21 +0200 Subject: [PATCH] Upgrade PyYAML-ft version and use new module name (#1353) * Upgrade PyYAML-ft version and use new module name * add pyre ignore --------- Co-authored-by: Zsolt Dollenstein --- libcst/tool.py | 5 ++++- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libcst/tool.py b/libcst/tool.py index 6dc410cc..a2164b11 100644 --- a/libcst/tool.py +++ b/libcst/tool.py @@ -19,7 +19,10 @@ import textwrap from abc import ABC, abstractmethod from typing import Any, Callable, Dict, List, Tuple, Type -import yaml +try: + import yaml_ft as yaml # pyre-ignore +except ModuleNotFoundError: + import yaml from libcst import CSTLogicError, LIBCST_VERSION, parse_module, PartialParserConfig from libcst._parser.parso.utils import parse_version_string diff --git a/pyproject.toml b/pyproject.toml index 71164512..3c497f97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ requires-python = ">=3.9" dependencies = [ "pyyaml>=5.2; python_version < '3.13'", - "pyyaml-ft; python_version >= '3.13'", + "pyyaml-ft>=8.0.0; python_version >= '3.13'", ] [project.urls]