From a38fda02321082f3830b64383e2bdfefd2d2ef85fbeae0b30deee7a1f3a73604 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 30 Jul 2024 18:31:35 +0000 Subject: [PATCH 1/3] Update SPEC file OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libcst?expand=0&rev=33 --- .gitattributes | 23 ++ .gitignore | 1 + _service | 8 + cargo_config | 5 + libcst-0.4.9.tar.gz | 3 + libcst-1.4.0.tar.gz | 3 + python-libcst.changes | 444 ++++++++++++++++++++++++++++++++++++++ python-libcst.spec | 103 +++++++++ remove-ufmt-dep.patch | 17 ++ replace-python-call.patch | 36 ++++ vendor.tar.xz | 3 + vendor.tar.zst | 3 + 12 files changed, 649 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 cargo_config create mode 100644 libcst-0.4.9.tar.gz create mode 100644 libcst-1.4.0.tar.gz create mode 100644 python-libcst.changes create mode 100644 python-libcst.spec create mode 100644 remove-ufmt-dep.patch create mode 100644 replace-python-call.patch create mode 100644 vendor.tar.xz create mode 100644 vendor.tar.zst diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..820ebda --- /dev/null +++ b/_service @@ -0,0 +1,8 @@ + + + libcst-*.tar.gz + native/Cargo.toml + true + + + diff --git a/cargo_config b/cargo_config new file mode 100644 index 0000000..6fb4ff4 --- /dev/null +++ b/cargo_config @@ -0,0 +1,5 @@ +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" \ No newline at end of file diff --git a/libcst-0.4.9.tar.gz b/libcst-0.4.9.tar.gz new file mode 100644 index 0000000..08fa58d --- /dev/null +++ b/libcst-0.4.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01786c403348f76f274dbaf3888ae237ffb73e6ed6973e65eba5c1fc389861dd +size 742071 diff --git a/libcst-1.4.0.tar.gz b/libcst-1.4.0.tar.gz new file mode 100644 index 0000000..c9f9b32 --- /dev/null +++ b/libcst-1.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:449e0b16604f054fa7f27c3ffe86ea7ef6c409836fe68fe4e752a1894175db00 +size 771364 diff --git a/python-libcst.changes b/python-libcst.changes new file mode 100644 index 0000000..1458923 --- /dev/null +++ b/python-libcst.changes @@ -0,0 +1,444 @@ +------------------------------------------------------------------- +Mon Jul 22 10:24:31 UTC 2024 - Matej Cepl + +- Upgrade to 1.4.0: + - Fix Literal parse error in RemoveImportsVisitor + - Don't reset context.scratch between files + - Various documentation fixes + Typo fix FullRepoManager + ✏️ Fix tiny typo in docs/source/metadata.rst + ✏️ Fix typo in docs/source/scope_tutorial.ipynb + Update CONTRIBUTING.md + - Add helper functions for common ways of filtering nodes + - Dump CST to .dot (graphviz) files + - Implement PEP-696 +- Upgrade to 1.3.1: + - ImportError due to missing mypy_extensions dependency +- Upgrade to 1.3.0: + - Removed dependencies on typing_extensions and typing_inspect +- Temporarily switch off running of the test suite (gh#Instagram/LibCST#1176) + +------------------------------------------------------------------- +Fri Mar 1 00:29:21 UTC 2024 - Soc Virnyl Estela + +- Update to version 1.2.0 + * Upgrade pyo3 to 0.20 + * Remove reference to distutil + * Add roundtrip tests from Python + * Fix parsing list matchers without explicit brackets + * Make readme example use python syntax highlighting + * Upgrade rust to version 1.70 in readthedocs config + * Update maturin requirement from <0.16,>=0.8.3 to >=0.8.3,<1.5 + * Allow `Element::codegen` to be used by external users + * installing rustc/cargo for mybinder demo + * Update test_fix_pyre_directives.py + * remove 3.8 support + * Update syn to v2 + * Set repository metadata entry for Rust crates + * upgrade flake8 + * Update pyproject.toml for Python 3.12 support + * fix filepathprovider generic type + * Update README.rst + * Fix link in type_inference_provider.py + * Parse multiline expressions in f-strings + * Upgrade pyre + * eliminate relative paths from Cargo.toml + * Parse arbitrarily nested f-strings + * ScopeProvider: Record Access for Attributes and Decorators + * AddImportsVisitor: add imports before the first non-import statement + * Scope provider changes for type annotations + * add upper bound to pyo3 dependency + * scope_provider: Simplify parent resolution + * parser: remove Regexes from whitespace parser + * Add crate metadata + * Support files with mixed newlines + * PEP 695 - Type Parameter Syntax + * Remove need for regex in TextPosition::matches + * Fix readme's Python version requirement + * Switch to using thread_local regular expressions to avoid regex mutex contention + * Remove criterion-cycles-per-byte dependency and related benchmark measurement + * drop support for Python 3.7 + * Don't gather dirs ending .py + * Don't insert duplicate imports + * Don't swallow trailing whitespace + * Allow pyo3 >=0.17 + * Do not annotate the same variable multiple times in ApplyTypeAnnotationsVisitor + * Update changelog to 1.0.1 + * Codemod CLI: Print diff only when there is a change + * Fix parsing of code without trailing newlines + * Fix whitespace, fstring, walrus related parse errors + * Fix Sentinal typo + * remove quotes around charset in .editorconfig + * Update maturin requirement from <0.14,>=0.8.3 to >=0.8.3,<0.16 + * Fix type of `evaluated_value` on string to allow bytes + * Switch default parser implementation to native + * exclude native/target directory from sdist + * update changelog + * relax validation rules on decorators + * Fix crash on escaped backslashes in rf-string + * Fix pyre setup link in metadata.rst + * Support PEP 604 in ApplyTypeAnnotationsVisitor + * Fix spelling and grammar in some comments + * Fix ApplyTypeAnnotationsVisitor behavior on attribute assignments. + * Allow running codemods without configuring in YAML + * Ensure current Python interpreter is used for subprocesses + * Use subprocess.DEVNULL instead of opening os.devnull by hand + * PEP 621 + hatch to run tests/lint/etc + * Fix: relative imports from '' package are not allowed + * Add new FilePathProvider + * Use new setup-python caching actions + * Pass root path to FullyQualifiedNameProvider + * Script to regenerate test fixtures + * Add setuptools-rust to build requirements in setup.py + * Ignore common virtualenv names + * Fix Github issue 855 - fail to parse with statement + * fix PEP 604 union annotations in decorators + * Add py3.11 classifier +- Update _service file + * remove obsoleted mode "disabled" to "manual" + * adopt new obs-service-cargo packaging method +- Remove patches + * remove-ufmt-dep.patch + * replace-python-call.patch + +------------------------------------------------------------------- +Fri Apr 21 12:27:55 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Wed Apr 19 02:01:37 UTC 2023 - Matej Cepl + +- Refresh replace-python-call.patch to make tests working. + +------------------------------------------------------------------- +Thu Apr 13 22:42:28 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Wed Dec 14 11:41:04 UTC 2022 - Daniel Garcia + +- Remove 650-sorting-in-test_ordering.patch not needed anymore +- Remove skip_failing_test.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 + @superbobry in #702 + - QualifiedNameProvider optimizations + - Cache the scope name prefix to prevent scope traversal in a tight loop by + @lpetre in #708 + - Faster qualified name formatting by @lpetre in #710 + - Prevent unnecessary work in Scope.get_qualified_names_for_ by @lpetre in + #709 + - Fix parsing of parenthesized empty tuples by @zsol in #712 + - Support whitespace after ParamSlash by @zsol in #713 + - [parser] bail on deeply nested expressions by @zsol in #718 + +- 0.4.5 - 2022-06-17 + - Only skip supported escaped characters in f-strings by @zsol in #700 + - Escaping quote characters in raw string literals causes a tokenizer error + by @zsol in #668 + - Corrected a code example in the documentation by @zzl0 in #703 + - Handle multiline strings that start with quotes by @zzl0 in #704 + - Fixed a performance regression in libcst.metadata.ScopeProvider by @lpetre + in #698 + +- 0.4.4 - 2022-06-13 + - Add package links to PyPI by @adamchainz in #688 + - native: add overall benchmark by @zsol in #692 + - Add support for PEP-646 by @zsol in #696 + - parser: use references instead of smart pointers for Tokens by @zsol in + #691 + +- 0.4.3 - 2022-05-11 + - Restore the 0.4.1 behavior for libcst.helpers.get_absolute_module by + @lpetre in #684 + +- 0.4.2 - 2022-05-04 + - native: Avoid crashing by making IntoPy conversion fallible by @zsol in + #639 + - native: make sure ParserError's line is zero-indexed by @zsol in #681 + - Fix space validation for AsName and Await by @zsol in #641 + - Qualified Name Provider: Fix returned qname for symbols that are prefixes + of each other by @wiyr in #669 + - Rename Codemod: Correct last renamed import from by @toofar in #675 + - Many changes to the Apply Type Comments codemod: + - Allow for skipping quotes when applying type comments by @stroxler in + #644 + - Port pyre fixes by @stroxler in #651 + - Preserve as-imports when merging type annotations. by @martindemello in + #664 + - Qualify imported symbols when the dequalified form would cause a conflict + by @martindemello in #674 + - Add an argument to always qualify imported type annotations. by + @martindemello in #676 + - Create an AddTrailingCommas codemod by @stroxler in #643 + - Define gather global names visitor by @shannonzhu in #657 + - Support module and package names in the codemod context by @lpetre in #662 + - Drop support for running libcst using a python 3.6 interpreter by @lpetre + in #663 + - Update relative import logic to match cpython by @lpetre in #660 + - Scope Provider: Consider access information when computing qualified names + for nodes by @lpetre in #682 + +------------------------------------------------------------------- +Fri Feb 18 21:32:48 UTC 2022 - Matej Cepl + +- Update to 0.4.1: + - Add docs about the native parts + - Specify minimum rust toolchain version + - build wheels on main branch for linux/arm64 + - ApplyTypeAnnotationVisitor changes + - Add support for methods with func type comment excluding + self/cls + - Merge in TypeVars and Generic base classes in + ApplyTypeAnnotationVisitor + - Full handling for applying type comments to Assign + - Add support for For and With + - Support FunctionDef transformations + - change pyo3 as optional dependency in native Python Parser + - add slots to base classes, @add_slots takes bases into + account + - [native] Box most enums + - [native] Return tuples instead of lists in CST nodes + - Allow trailing whitespace without newline at EOF + - Handle ast.parse failures when converting function type + comments + - [native] Don't redundantly nest StarredElement inside another + Element + - [native] Allow unparenthesized tuples inside f-strings + - Don't require whitespace right after match + - Proxy both parentheses in some pattern matching nodes + +- Update to 0.4.0 - 2022-01-12 + This release contains a new parsing infrastructure that is + turned off by default. You can enable it by setting the + LIBCST_PARSER_TYPE environment variable to native before + parsing an input with the usual LibCST APIs. Parsing Python + 3.10 documents is only supported in this new mode. + Note: the new parser is built as a native extension, so LibCST + will ship with binary wheels from now on. + - Implement a Python PEG parser in Rust + - implement PEP-654: except* + - Implement PEP-634 - Match statement + - Add instructions to codegen test failures + - Support Parenthesized With Statements + - Support relative imports in AddImportsVisitor + - Codemod for PEP 484 Assign w / type comments -> PEP 526 + AnnAssign + - Update license headers + - Use precise signature matching when inserting function type + annotations + +- Update to 0.3.23 - 2021-11-23 + - Fix missing string annotation references + +- Update to 0.3.22 - 2021-11-22 + - Add --indent-string option to libcst.tool print + - Publish pre-release packages to test.pypi.org + - Add ImportAssignment class extending Assignment to record + assignments for import statements + - Do not add imports if we added no type info in + ApplyTypeAnnotationVisitor (commit) + - Support relative imports in ApplyTypeAnnotationVisitor + qualifier handling + - Don't gather metadata if the wrapper already contains it + - Swallow parsing errors in string annotations + - Stop parsing string annotations when no longer in a typing + call + - Move find_qualified_names_for in the Assignment class + +- Update to 0.3.21 - 2021-09-21 + - Fix pyre command for type inference provider + - Change codegen to treat typing.Union[Foo, NoneType] and + typing.Optional[Foo] as the same gh#Instagram/LibCST#508 + - Rewrite the MatchIfTrue type to be generic on _MatchIfTrueT + +- Update to 0.3.20 - 2021-08-09 + - TypeAnnotationsVisitor: don't truncate function return type + +------------------------------------------------------------------- +Wed May 19 15:49:13 UTC 2021 - Ben Greiner + +- Update to 0.3.19 + * Return more specific QNames for assignments #477 + * Tie accesses from string annotation to the string node #483 + * Fix leaking processes from TypeInferenceProvider #474 + * Fix TypeInferenceProvider breakage with empty cache #476 + * Fix formatting for link to QualifiedName class in docs #480 +- Release 0.3.18 + * Add FlattenSentinel to support replacing a statement with + multiple statements #455 + * Add BuiltinScope #469 + * Add FullyQualifiedNameProvider #465 + * Split QualifiedNameProvider out from + libcst.metadata.scope_provider #464 + * Fix Exception while parsing escape character in raw f-strings + #462 + +------------------------------------------------------------------- +Sun Mar 21 15:05:59 UTC 2021 - Ben Greiner + +- Update ot 0.3.17 + Updated + * Optimization: reduce the number of unused parallel processes + #440 + Fixed + * Walrus operator's left hand side now has STORE expression + context #443 + * ApplyTypeAnnotationsVisitor applies parameter annotations even + if no return type is declared #445 + * Work around Windows problem by using dummy pool for jobs=1 #436 + * Remove extra unused imports added in other files #453 + +------------------------------------------------------------------- +Sun Jan 3 21:02:37 UTC 2021 - Benjamin Greiner + +- Update to version 0.3.16 + Added + * Support PEP-604 style unions in decorator annotations #429 + * Gathering exports in augmented assignment statements #426 + Fixed + * Don't allow out of order accesses in the global scope #431 + * Handle scope ordering in For statements #430 + * Fix for not parsing subscripts such as cast()["from"] #428 + * Walrus operator's left hand side now has STORE expression + context #433 +- Changes in 0.3.15 + Added + * Support Named Unicode Characters and yield in f-strings #424 + Fixed + * Assignment/access ordering in comprehensions #423 + * Referencing of remaining objects in cast() #422 +- refresh skip_failing_test.patch + +------------------------------------------------------------------- +Sun Jan 3 16:38:46 UTC 2021 - Matej Cepl + +- Add skip_failing_test.patch skipping test_ordering + (libcst.metadata.tests.test_scope_provider.ScopeProviderTest) which + doesn't work with Python 3.6 on i586 (gh#Instagram/LibCST#442). + +------------------------------------------------------------------- +Sat Nov 21 00:16:24 UTC 2020 - Benjamin Greiner + +- Update to version 0.3.14 + Fixed + * Fix is_annotation for types used in classdef base and assign + value [#406] + * Visit concatenated f-strings during scope analysis [#411] + * Correct handling of walrus operator in function args [#417] + * Allow generator expressions in f-strings [#419] + * Keep track of assignment/access ordering during scope analysis + [#413] + * Handle string type references in cast() during scope analysis + [#418] +- 0.3.13 + Fixed + * Use correct type for AugAssign and AnnAssign target [#396] + * Support string annotations for type aliases [#401] +- 0.3.12 + Fixed + * fix RemoveImportsVisitor crash when ImportAlias is + inserted without comma [#397] + * Provide STORE for {Class,Function}Def.name in + ExpressionContextProvider [#394] +- 0.3.11 + Added + * Implement TypeOf matcher [#384] + Updated + * Update return type of ParentNodeProvider to be CSTNode [#377] + * Add source code links to each class/function [#378] + Fixed + * Removing an import alias with a trailing standalone + comment should preserve the comment [#392] + +------------------------------------------------------------------- +Tue Aug 25 11:33:22 UTC 2020 - Benjamin Greiner + +- Update to v0.3.10 + Added + * Handle string annotations in ScopeProvider #373 + * Add is_annotation subtype for Access inreferences. #372 + Updated + * Call pyre query with noninteractive logging #371 + * Replace matchers with explicit visitation in gatherers #366 + * Include missing test data in install #365 + Fixed + * Spaces around walrus operator are not required #368 + * SaveMachedNode now matches with trailing empty wildcards #356 + * Correctly extract wildcard matchers #355 +- clean specfile multibuild +- don't require own package on test flavor +- require dataclasses for Python 3.6 distros +- despite gh#Instagram/LibCST#365 says it's fixed, we still need to + regenerate the code for tests + => don't skip tests which actually pass after codegen +- can use plain unittest again, same as upstream +- define skip_python2 for Leap repositories + +------------------------------------------------------------------- +Fri Aug 21 09:43:55 UTC 2020 - Tomáš Chvátal + +- Switch to multibuild in order to avoid buildcycles + +------------------------------------------------------------------- +Sat Aug 8 04:41:45 UTC 2020 - John Vandenberg + +- Removed tests depending on optional dependency pyre +- Update to v0.3.9 + * Support string type annotations in RemoveUnusedImports + * Add scope to ImportAlias + * Add scope to ClassDef + * Fixed all pyre related errors + * Fixed enclosing attribute for attributes in call arguments + +------------------------------------------------------------------- +Thu Aug 6 09:47:23 UTC 2020 - Benjamin Greiner + +- Enhance codegen to support varied versions of isort +- Update to v0.3.8 + * Handle type subscripts when applying annotations + * Added FullRepoManager cache property + * Added optional args for tox commands + * Only remove trailing comma if the last alias is removed + * Fixed inserting imports after module docstring + * Fixed ParenthesizedWhitespace before params in FuncDef + * Fixed validation for ImportAlias and Try statements + * Fixed NotEqual position issue + * Fixed minor typo in scope_provider.py + +------------------------------------------------------------------- +Sat Jul 4 03:47:40 AM UTC 2020 - John Vandenberg + +- Initial spec for v0.3.7 diff --git a/python-libcst.spec b/python-libcst.spec new file mode 100644 index 0000000..1bf45e2 --- /dev/null +++ b/python-libcst.spec @@ -0,0 +1,103 @@ +# +# spec file for package python-libcst +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +# %%if "%%{flavor}" == "test" +# %%define psuffix -test +# %%bcond_without test +# %%else +%define psuffix %{nil} +%bcond_with test +# %%endif +%define modname libcst +%{?sle15_python_module_pythons} +Name: python-libcst%{psuffix} +Version: 1.4.0 +Release: 0 +Summary: Python 3.5+ concrete syntax tree with AST-like properties +License: MIT +URL: https://github.com/Instagram/LibCST +Source0: https://files.pythonhosted.org/packages/source/l/libcst/%{modname}-%{version}.tar.gz +Source1: vendor.tar.zst +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools-rust} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: cargo +BuildRequires: cargo-packaging +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: zstd +Requires: python-PyYAML >= 5.2 +Requires: python-typing-inspect >= 0.4.0 +Requires: python-typing_extensions >= 3.7.4.2 +Requires: (python-dataclasses if python-base < 3.7) +%if %{with test} +# black and isort needed for tests and the code regeneration +BuildRequires: %{python_module PyYAML >= 5.2} +BuildRequires: %{python_module black} +BuildRequires: %{python_module dataclasses if %python-base < 3.7} +BuildRequires: %{python_module hypothesis >= 4.36.0} +BuildRequires: %{python_module hypothesmith >= 0.0.4} +BuildRequires: %{python_module typing-inspect >= 0.4.0} +BuildRequires: %{python_module typing_extensions >= 3.7.4.2} +%endif +%python_subpackages + +%description +A concrete syntax tree with AST-like properties for Python 3.5+ programs. + +%prep +%autosetup -a1 -n libcst-%{version} -p1 + +# # Depends on optional pyre +# rm \ +# libcst/metadata/tests/test_type_inference_provider.py \ +# libcst/metadata/tests/test_full_repo_manager.py \ +# libcst/tests/test_pyre_integration.py + +%build +export CARGO_NET_OFFLINE=true PROFILE=release +%pyproject_wheel + +%install +export CARGO_NET_OFFLINE=true PROFILE=release +%pyproject_install +# gh#Instagram/LibCST#818 +%{python_expand rm -rf %{buildroot}%{$python_sitearch}/libcst/tests +%fdupes %{buildroot}%{$python_sitearch} +} + +%clean + +%if %{with test} +%check +%python_expand find %{buildroot}%{$python_sitearch} -name \*.so\* +%pyunittest_arch discover -v libcst/tests +%endif + +%if %{without test} +%files %{python_files} +%doc README.rst +%license LICENSE +%{python_sitearch}/libcst +%{python_sitearch}/libcst-%{version}*-info +%endif + +%changelog diff --git a/remove-ufmt-dep.patch b/remove-ufmt-dep.patch new file mode 100644 index 0000000..4d94eb9 --- /dev/null +++ b/remove-ufmt-dep.patch @@ -0,0 +1,17 @@ +Index: libcst-0.4.9/libcst/codegen/generate.py +=================================================================== +--- libcst-0.4.9.orig/libcst/codegen/generate.py ++++ libcst-0.4.9/libcst/codegen/generate.py +@@ -25,8 +25,10 @@ from libcst.codegen.transforms import ( + + + def format_file(fname: str) -> None: +- with open(os.devnull, "w") as devnull: +- subprocess.check_call(["ufmt", "format", fname], stdout=devnull, stderr=devnull) ++ # Do not format to avoid ufmt dependency that's not yet in opensuse ++ pass ++ # with open(os.devnull, "w") as devnull: ++ # subprocess.check_call(["ufmt", "format", fname], stdout=devnull, stderr=devnull) + + + def clean_generated_code(code: str) -> str: diff --git a/replace-python-call.patch b/replace-python-call.patch new file mode 100644 index 0000000..73e8dae --- /dev/null +++ b/replace-python-call.patch @@ -0,0 +1,36 @@ +--- + 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 +@@ -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", diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000..58e043a --- /dev/null +++ b/vendor.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c119328db7b0c42d71498ee49480fcac03cb8026743e46f8fedbee5b0e6c62f2 +size 14686248 diff --git a/vendor.tar.zst b/vendor.tar.zst new file mode 100644 index 0000000..63d277e --- /dev/null +++ b/vendor.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7d89b1c34b8bc302ff105323671d9089a58e8a59c0d1579bc42379c4f197a28 +size 10695352 From 60e473bc482f80f9bc3bc741561887f2cc107a33729ba67624802d24c7dbc8d8 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 9 Sep 2024 11:39:04 +0000 Subject: [PATCH 2/3] - Add pyo3-022.patch bumping the dependency of pyo3 to 0.22 (gh#Instagram/LibCST!1180). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libcst?expand=0&rev=34 --- pyo3-022.patch | 348 ++++++++++++++++++++++++++++++++++++++++++ python-libcst.changes | 6 + python-libcst.spec | 3 + vendor.tar.zst | 4 +- 4 files changed, 359 insertions(+), 2 deletions(-) create mode 100644 pyo3-022.patch diff --git a/pyo3-022.patch b/pyo3-022.patch new file mode 100644 index 0000000..36ac1c5 --- /dev/null +++ b/pyo3-022.patch @@ -0,0 +1,348 @@ +From 03ca79632fe42ff2d4b22ed6d03c2289497e8d6c Mon Sep 17 00:00:00 2001 +From: Jelmer Vernooij +Date: Tue, 30 Jul 2024 15:34:55 +0000 +Subject: [PATCH] Upgrade pyo3 to 0.22 + +--- + native/Cargo.lock | 57 +++++++------------------------ + native/libcst/Cargo.toml | 2 - + native/libcst/src/nodes/expression.rs | 13 +++---- + native/libcst/src/nodes/parser_config.rs | 2 - + native/libcst/src/nodes/traits.rs | 2 - + native/libcst/src/parser/errors.rs | 13 +++---- + native/libcst/src/py.rs | 2 - + native/libcst_derive/src/into_py.rs | 15 ++++---- + 8 files changed, 40 insertions(+), 66 deletions(-) + +--- a/native/Cargo.lock ++++ b/native/Cargo.lock +@@ -36,12 +36,6 @@ source = "registry+https://github.com/ru + checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + + [[package]] +-name = "bitflags" +-version = "2.6.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +- +-[[package]] + name = "bumpalo" + version = "3.16.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -229,9 +223,9 @@ checksum = "e5274423e17b7c9fc20b6e7e2085 + + [[package]] + name = "heck" +-version = "0.4.1" ++version = "0.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" ++checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + + [[package]] + name = "hermit-abi" +@@ -333,16 +327,6 @@ dependencies = [ + ] + + [[package]] +-name = "lock_api" +-version = "0.4.12" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +-dependencies = [ +- "autocfg", +- "scopeguard", +-] +- +-[[package]] + name = "log" + version = "0.4.22" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -485,15 +469,15 @@ dependencies = [ + + [[package]] + name = "pyo3" +-version = "0.20.3" ++version = "0.22.2" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233" ++checksum = "831e8e819a138c36e212f3af3fd9eeffed6bf1510a805af35b0edee5ffa59433" + dependencies = [ + "cfg-if", + "indoc", + "libc", + "memoffset", +- "parking_lot", ++ "once_cell", + "portable-atomic", + "pyo3-build-config", + "pyo3-ffi", +@@ -503,9 +487,9 @@ dependencies = [ + + [[package]] + name = "pyo3-build-config" +-version = "0.20.3" ++version = "0.22.2" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7" ++checksum = "1e8730e591b14492a8945cdff32f089250b05f5accecf74aeddf9e8272ce1fa8" + dependencies = [ + "once_cell", + "target-lexicon", +@@ -513,9 +497,9 @@ dependencies = [ + + [[package]] + name = "pyo3-ffi" +-version = "0.20.3" ++version = "0.22.2" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa" ++checksum = "5e97e919d2df92eb88ca80a037969f44e5e70356559654962cbb3316d00300c6" + dependencies = [ + "libc", + "pyo3-build-config", +@@ -523,9 +507,9 @@ dependencies = [ + + [[package]] + name = "pyo3-macros" +-version = "0.20.3" ++version = "0.22.2" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158" ++checksum = "eb57983022ad41f9e683a599f2fd13c3664d7063a3ac5714cae4b7bee7d3f206" + dependencies = [ + "proc-macro2", + "pyo3-macros-backend", +@@ -535,9 +519,9 @@ dependencies = [ + + [[package]] + name = "pyo3-macros-backend" +-version = "0.20.3" ++version = "0.22.2" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185" ++checksum = "ec480c0c51ddec81019531705acac51bcdbeae563557c982aa8263bb96880372" + dependencies = [ + "heck", + "proc-macro2", +@@ -576,15 +560,6 @@ dependencies = [ + ] + + [[package]] +-name = "redox_syscall" +-version = "0.5.3" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +-dependencies = [ +- "bitflags", +-] +- +-[[package]] + name = "regex" + version = "1.10.6" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -676,12 +651,6 @@ dependencies = [ + ] + + [[package]] +-name = "smallvec" +-version = "1.13.2" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +- +-[[package]] + name = "syn" + version = "2.0.77" + source = "registry+https://github.com/rust-lang/crates.io-index" +--- a/native/libcst/Cargo.toml ++++ b/native/libcst/Cargo.toml +@@ -36,7 +36,7 @@ trace = ["peg/trace"] + + [dependencies] + paste = "1.0.9" +-pyo3 = { version = "0.20", optional = true } ++pyo3 = { version = "0.22", optional = true } + thiserror = "1.0.37" + peg = "0.8.1" + chic = "1.2.2" +--- a/native/libcst/src/nodes/expression.rs ++++ b/native/libcst/src/nodes/expression.rs +@@ -2524,6 +2524,7 @@ impl<'r, 'a> Inflate<'a> for DeflatedNam + #[cfg(feature = "py")] + mod py { + ++ use pyo3::types::PyAnyMethods; + use pyo3::types::PyModule; + + use super::*; +@@ -2535,7 +2536,7 @@ mod py { + match self { + Self::Starred(s) => s.try_into_py(py), + Self::Simple { value, comma } => { +- let libcst = PyModule::import(py, "libcst")?; ++ let libcst = PyModule::import_bound(py, "libcst")?; + let kwargs = [ + Some(("value", value.try_into_py(py)?)), + comma +@@ -2547,11 +2548,11 @@ mod py { + .filter(|x| x.is_some()) + .map(|x| x.as_ref().unwrap()) + .collect::>() +- .into_py_dict(py); ++ .into_py_dict_bound(py); + Ok(libcst + .getattr("Element") + .expect("no Element found in libcst") +- .call((), Some(kwargs))? ++ .call((), Some(&kwargs))? + .into()) + } + } +@@ -2571,7 +2572,7 @@ mod py { + whitespace_before_colon, + .. + } => { +- let libcst = PyModule::import(py, "libcst")?; ++ let libcst = PyModule::import_bound(py, "libcst")?; + let kwargs = [ + Some(("key", key.try_into_py(py)?)), + Some(("value", value.try_into_py(py)?)), +@@ -2592,11 +2593,11 @@ mod py { + .filter(|x| x.is_some()) + .map(|x| x.as_ref().unwrap()) + .collect::>() +- .into_py_dict(py); ++ .into_py_dict_bound(py); + Ok(libcst + .getattr("DictElement") + .expect("no Element found in libcst") +- .call((), Some(kwargs))? ++ .call((), Some(&kwargs))? + .into()) + } + } +--- a/native/libcst/src/nodes/parser_config.rs ++++ b/native/libcst/src/nodes/parser_config.rs +@@ -125,7 +125,7 @@ fn parser_config_asdict<'py>(py: Python< + ("version", config.version.clone_ref(py)), + ("future_imports", config.future_imports.clone_ref(py)), + ] +- .into_py_dict(py) ++ .into_py_dict_bound(py) + } + + pub fn init_module(_py: Python, m: &PyModule) -> PyResult<()> { +--- a/native/libcst/src/nodes/traits.rs ++++ b/native/libcst/src/nodes/traits.rs +@@ -170,7 +170,7 @@ pub mod py { + .map(|x| x.try_into_py(py)) + .collect::>>()? + .into_iter(); +- Ok(PyTuple::new(py, converted).into()) ++ Ok(PyTuple::new_bound(py, converted).into()) + } + } + +--- a/native/libcst/src/parser/errors.rs ++++ b/native/libcst/src/parser/errors.rs +@@ -28,7 +28,7 @@ pub enum ParserError<'a> { + #[cfg(feature = "py")] + mod py_error { + +- use pyo3::types::{IntoPyDict, PyModule}; ++ use pyo3::types::{IntoPyDict, PyAnyMethods, PyModule}; + use pyo3::{IntoPy, PyErr, PyErrArguments, Python}; + + use super::ParserError; +@@ -65,13 +65,14 @@ mod py_error { + ("raw_line", (line + 1).into_py(py)), + ("raw_column", col.into_py(py)), + ] +- .into_py_dict(py); +- let libcst = PyModule::import(py, "libcst").expect("libcst cannot be imported"); +- PyErr::from_value( ++ .into_py_dict_bound(py); ++ let libcst = ++ PyModule::import_bound(py, "libcst").expect("libcst cannot be imported"); ++ PyErr::from_value_bound( + libcst + .getattr("ParserSyntaxError") + .expect("ParserSyntaxError not found") +- .call((), Some(kwargs)) ++ .call((), Some(&kwargs)) + .expect("failed to instantiate"), + ) + }) +@@ -86,7 +87,7 @@ mod py_error { + ("raw_line", self.raw_line.into_py(py)), + ("raw_column", self.raw_column.into_py(py)), + ] +- .into_py_dict(py) ++ .into_py_dict_bound(py) + .into_py(py) + } + } +--- a/native/libcst/src/py.rs ++++ b/native/libcst/src/py.rs +@@ -8,7 +8,7 @@ use pyo3::prelude::*; + + #[pymodule] + #[pyo3(name = "native")] +-pub fn libcst_native(_py: Python, m: &PyModule) -> PyResult<()> { ++pub fn libcst_native(_py: Python, m: &Bound) -> PyResult<()> { + #[pyfn(m)] + fn parse_module(source: String, encoding: Option<&str>) -> PyResult { + let m = crate::parse_module(source.as_str(), encoding)?; +--- a/native/libcst_derive/src/into_py.rs ++++ b/native/libcst_derive/src/into_py.rs +@@ -38,12 +38,14 @@ fn impl_into_py_enum(ast: &DeriveInput, + let kwargs_toks = fields_to_kwargs(&var.fields, true); + toks.push(quote! { + Self::#varname { #(#fieldnames,)* .. } => { +- let libcst = pyo3::types::PyModule::import(py, "libcst")?; ++ use pyo3::types::PyAnyMethods; ++ ++ let libcst = pyo3::types::PyModule::import_bound(py, "libcst")?; + let kwargs = #kwargs_toks ; + Ok(libcst + .getattr(stringify!(#varname)) + .expect(stringify!(no #varname found in libcst)) +- .call((), Some(kwargs))? ++ .call((), Some(&kwargs))? + .into()) + } + }) +@@ -87,12 +89,13 @@ fn impl_into_py_struct(ast: &DeriveInput + #[automatically_derived] + impl#generics crate::nodes::traits::py::TryIntoPy for #ident #generics { + fn try_into_py(self, py: pyo3::Python) -> pyo3::PyResult { +- let libcst = pyo3::types::PyModule::import(py, "libcst")?; ++ use pyo3::types::PyAnyMethods; ++ let libcst = pyo3::types::PyModule::import_bound(py, "libcst")?; + let kwargs = #kwargs_toks ; + Ok(libcst + .getattr(stringify!(#ident)) + .expect(stringify!(no #ident found in libcst)) +- .call((), Some(kwargs))? ++ .call((), Some(&kwargs))? + .into()) + } + } +@@ -162,7 +165,7 @@ fn fields_to_kwargs(fields: &Fields, is_ + #(#optional_rust_varnames.map(|x| x.try_into_py(py)).transpose()?.map(|x| (stringify!(#optional_py_varnames), x)),)* + }; + if empty_kwargs { +- quote! { pyo3::types::PyDict::new(py) } ++ quote! { pyo3::types::PyDict::new_bound(py) } + } else { + quote! { + [ #kwargs_pairs #optional_pairs ] +@@ -170,7 +173,7 @@ fn fields_to_kwargs(fields: &Fields, is_ + .filter(|x| x.is_some()) + .map(|x| x.as_ref().unwrap()) + .collect::>() +- .into_py_dict(py) ++ .into_py_dict_bound(py) + } + } + } diff --git a/python-libcst.changes b/python-libcst.changes index 1458923..0a6a96d 100644 --- a/python-libcst.changes +++ b/python-libcst.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 9 11:38:15 UTC 2024 - Matej Cepl + +- Add pyo3-022.patch bumping the dependency of pyo3 to 0.22 + (gh#Instagram/LibCST!1180). + ------------------------------------------------------------------- Mon Jul 22 10:24:31 UTC 2024 - Matej Cepl diff --git a/python-libcst.spec b/python-libcst.spec index 1bf45e2..5b77d6e 100644 --- a/python-libcst.spec +++ b/python-libcst.spec @@ -34,6 +34,9 @@ License: MIT URL: https://github.com/Instagram/LibCST Source0: https://files.pythonhosted.org/packages/source/l/libcst/%{modname}-%{version}.tar.gz Source1: vendor.tar.zst +# PATCH-FIX-UPSTREAM pyo3-022.patch gh#Instagram/LibCST!1180 mcepl@suse.com +# updgrade pyo3 to 0.22 version +Patch0: pyo3-022.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools-rust} BuildRequires: %{python_module setuptools_scm} diff --git a/vendor.tar.zst b/vendor.tar.zst index 63d277e..34f4927 100644 --- a/vendor.tar.zst +++ b/vendor.tar.zst @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b7d89b1c34b8bc302ff105323671d9089a58e8a59c0d1579bc42379c4f197a28 -size 10695352 +oid sha256:d732efcdb2ae0dd9d040884dc5f29c22c02beaf302a5b1d9b5e27cf2c1dda69a +size 12316451 From 13880de2215c8f257620548eba8d0e0afca3f56879857a1103c36c50b6386b36 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 9 Sep 2024 12:22:44 +0000 Subject: [PATCH 3/3] Fix patches and build system. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libcst?expand=0&rev=35 --- _service | 1 - pyo3-022.patch | 171 +++++++------------------------------------------ vendor.tar.zst | 4 +- 3 files changed, 25 insertions(+), 151 deletions(-) diff --git a/_service b/_service index 820ebda..4b64973 100644 --- a/_service +++ b/_service @@ -4,5 +4,4 @@ native/Cargo.toml true - diff --git a/pyo3-022.patch b/pyo3-022.patch index 36ac1c5..819aebc 100644 --- a/pyo3-022.patch +++ b/pyo3-022.patch @@ -4,156 +4,31 @@ Date: Tue, 30 Jul 2024 15:34:55 +0000 Subject: [PATCH] Upgrade pyo3 to 0.22 --- - native/Cargo.lock | 57 +++++++------------------------ - native/libcst/Cargo.toml | 2 - - native/libcst/src/nodes/expression.rs | 13 +++---- - native/libcst/src/nodes/parser_config.rs | 2 - - native/libcst/src/nodes/traits.rs | 2 - - native/libcst/src/parser/errors.rs | 13 +++---- - native/libcst/src/py.rs | 2 - - native/libcst_derive/src/into_py.rs | 15 ++++---- - 8 files changed, 40 insertions(+), 66 deletions(-) + .cargo/config.toml | 8 +++++++- + native/libcst/Cargo.toml | 2 +- + native/libcst/src/nodes/expression.rs | 13 +++++++------ + native/libcst/src/nodes/parser_config.rs | 2 +- + native/libcst/src/nodes/traits.rs | 2 +- + native/libcst/src/parser/errors.rs | 13 +++++++------ + native/libcst/src/py.rs | 2 +- + native/libcst_derive/src/into_py.rs | 15 +++++++++------ + 8 files changed, 34 insertions(+), 23 deletions(-) ---- a/native/Cargo.lock -+++ b/native/Cargo.lock -@@ -36,12 +36,6 @@ source = "registry+https://github.com/ru - checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - - [[package]] --name = "bitflags" --version = "2.6.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" -- --[[package]] - name = "bumpalo" - version = "3.16.0" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -229,9 +223,9 @@ checksum = "e5274423e17b7c9fc20b6e7e2085 - - [[package]] - name = "heck" --version = "0.4.1" -+version = "0.5.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - - [[package]] - name = "hermit-abi" -@@ -333,16 +327,6 @@ dependencies = [ - ] - - [[package]] --name = "lock_api" --version = "0.4.12" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" --dependencies = [ -- "autocfg", -- "scopeguard", +--- a/.cargo/config.toml ++++ b/.cargo/config.toml +@@ -8,4 +8,10 @@ rustflags = [ + rustflags = [ + "-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup", -] -- --[[package]] - name = "log" - version = "0.4.22" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -485,15 +469,15 @@ dependencies = [ - - [[package]] - name = "pyo3" --version = "0.20.3" -+version = "0.22.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233" -+checksum = "831e8e819a138c36e212f3af3fd9eeffed6bf1510a805af35b0edee5ffa59433" - dependencies = [ - "cfg-if", - "indoc", - "libc", - "memoffset", -- "parking_lot", -+ "once_cell", - "portable-atomic", - "pyo3-build-config", - "pyo3-ffi", -@@ -503,9 +487,9 @@ dependencies = [ - - [[package]] - name = "pyo3-build-config" --version = "0.20.3" -+version = "0.22.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7" -+checksum = "1e8730e591b14492a8945cdff32f089250b05f5accecf74aeddf9e8272ce1fa8" - dependencies = [ - "once_cell", - "target-lexicon", -@@ -513,9 +497,9 @@ dependencies = [ - - [[package]] - name = "pyo3-ffi" --version = "0.20.3" -+version = "0.22.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa" -+checksum = "5e97e919d2df92eb88ca80a037969f44e5e70356559654962cbb3316d00300c6" - dependencies = [ - "libc", - "pyo3-build-config", -@@ -523,9 +507,9 @@ dependencies = [ - - [[package]] - name = "pyo3-macros" --version = "0.20.3" -+version = "0.22.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158" -+checksum = "eb57983022ad41f9e683a599f2fd13c3664d7063a3ac5714cae4b7bee7d3f206" - dependencies = [ - "proc-macro2", - "pyo3-macros-backend", -@@ -535,9 +519,9 @@ dependencies = [ - - [[package]] - name = "pyo3-macros-backend" --version = "0.20.3" -+version = "0.22.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185" -+checksum = "ec480c0c51ddec81019531705acac51bcdbeae563557c982aa8263bb96880372" - dependencies = [ - "heck", - "proc-macro2", -@@ -576,15 +560,6 @@ dependencies = [ - ] - - [[package]] --name = "redox_syscall" --version = "0.5.3" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" --dependencies = [ -- "bitflags", --] -- --[[package]] - name = "regex" - version = "1.10.6" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -676,12 +651,6 @@ dependencies = [ - ] - - [[package]] --name = "smallvec" --version = "1.13.2" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -- --[[package]] - name = "syn" - version = "2.0.77" - source = "registry+https://github.com/rust-lang/crates.io-index" +\ No newline at end of file ++] ++ ++[source.crates-io] ++replace-with = "vendored-sources" ++ ++[source.vendored-sources] ++directory = "vendor" --- a/native/libcst/Cargo.toml +++ b/native/libcst/Cargo.toml @@ -36,7 +36,7 @@ trace = ["peg/trace"] diff --git a/vendor.tar.zst b/vendor.tar.zst index 34f4927..f09a60a 100644 --- a/vendor.tar.zst +++ b/vendor.tar.zst @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d732efcdb2ae0dd9d040884dc5f29c22c02beaf302a5b1d9b5e27cf2c1dda69a -size 12316451 +oid sha256:0612f718a0d5f7c7f0a70c6151c9370d6c5d51f9074a11c8c3df5d7bf650b655 +size 30171484