14
0
forked from pool/python-libcst
Files
python-libcst/replace-python-call.patch

37 lines
1.2 KiB
Diff
Raw Normal View History

---
libcst/codegen/generate.py | 2 +-
libcst/codemod/tests/test_codemod_cli.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/libcst/codegen/generate.py
+++ b/libcst/codegen/generate.py
@@ -69,7 +69,7 @@ def codegen_visitors() -> None:
# by attempting to run codegen again in a new process.
with open(os.devnull, "w") as devnull:
subprocess.check_call(
- ["python3", "-m", "libcst.codegen.gen_visitor_functions"],
+ [sys.executable, "-m", "libcst.codegen.gen_visitor_functions"],
cwd=base,
stdout=devnull,
)
--- a/libcst/codemod/tests/test_codemod_cli.py
+++ b/libcst/codemod/tests/test_codemod_cli.py
- Remove 650-sorting-in-test_ordering.patch not needed anymore - Add remove-ufmt-dep.patch, python-ufmt is not in tumbleweed - Add replace-python-call.patch, wrong executable call when outside of venv (gh#Instagram/LibCST#468) - Update to 0.4.9: - Bump setuptools-rust version by @zsol in #809 - 0.4.8 - Fix parse error message for number parsing by @zzl0 in #724 - Fix problematic doc build, due to the new builder image provided by readthedocs doesn't has the graphviz-dev package pre-installed any more by @MapleCCC in #751 - Fix docstring of FullRepoManager by @MapleCCC in #750 - Fix bug when TypeOf is one of options in OneOf / AllOf by @MapleCCC in #756 - Tighten the metadata type of ExpressionContextProvider by @MapleCCC in #760 - Fix the bug that the use of formatter in codemods has undetermined target Python version, resulting in hard-to-reason-with behavior by @MapleCCC in #771 - Python 3.11 rutime support - test using python 3.11 beta versions by @zsol in #723 - Python 3.11 wheels by @vfazio in #801 - Raise informative exception when metadata is unresolved in a metadata-based match by @MapleCCC in #757 - Add AccessorProvider by @matthewshaer in #807 - 0.4.7 - 2022-07-12 - Fix get_qualified_names_for matching on prefixes of the given name by @lpetre in #719 - Implement lazy loading mechanism for expensive metadata providers by @Chenguang-Zhu in #720 - 0.4.6 - 2022-07-04 - convert_type_comments now preserves comments following type comments by OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libcst?expand=0&rev=20
2022-12-14 12:08:22 +00:00
@@ -4,7 +4,7 @@
# LICENSE file in the root directory of this source tree.
#
-
+import sys
import subprocess
from pathlib import Path
@@ -16,7 +16,7 @@ class TestCodemodCLI(UnitTest):
def test_codemod_formatter_error_input(self) -> None:
rlt = subprocess.run(
[
- "python",
+ sys.executable,
"-m",
"libcst.tool",
"codemod",