Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-libcst for openSUSE:Factory 
checked in at 2022-12-15 19:25:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-libcst (Old)
 and      /work/SRC/openSUSE:Factory/.python-libcst.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-libcst"

Thu Dec 15 19:25:00 2022 rev:7 rq:1042920 version:0.4.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-libcst/python-libcst.changes      
2021-05-21 21:49:29.890362259 +0200
+++ /work/SRC/openSUSE:Factory/.python-libcst.new.1835/python-libcst.changes    
2022-12-15 19:25:16.712081340 +0100
@@ -1,0 +2,171 @@
+Wed Dec 14 11:41:04 UTC 2022 - Daniel Garcia <[email protected]>
+
+- 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 <[email protected]>
+
+- 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
+
+-------------------------------------------------------------------

Old:
----
  libcst-0.3.19.tar.gz
  skip_failing_test.patch

New:
----
  _service
  cargo_config
  libcst-0.4.9.tar.gz
  remove-ufmt-dep.patch
  replace-python-call.patch
  vendor.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-libcst.spec ++++++
--- /var/tmp/diff_new_pack.rxBASM/_old  2022-12-15 19:25:17.484085733 +0100
+++ /var/tmp/diff_new_pack.rxBASM/_new  2022-12-15 19:25:17.488085755 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package python-libcst-test
+# spec file
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,8 +16,8 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
+%define rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
 %global flavor @BUILD_FLAVOR@%{nil}
 %if "%{flavor}" == "test"
 %define psuffix -test
@@ -26,26 +26,34 @@
 %define psuffix %{nil}
 %bcond_with test
 %endif
+%define modname libcst
 Name:           python-libcst%{psuffix}
-Version:        0.3.19
+Version:        0.4.9
 Release:        0
 Summary:        Python 3.5+ concrete syntax tree with AST-like properties
 License:        MIT
 URL:            https://github.com/Instagram/LibCST
-Source:         
https://files.pythonhosted.org/packages/source/l/libcst/libcst-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM skip_failing_test.patch gh#Instagram/LibCST#442 
[email protected]
-# test fails on i586 with Python 3.6
-Patch0:         skip_failing_test.patch
+Source0:        
https://files.pythonhosted.org/packages/source/l/%{modname}/%{modname}-%{version}.tar.gz
+Source1:        vendor.tar.xz
+Source2:        cargo_config
+# PATCH-FIX-OPENSUSE remove-ufmt-dep.patch python-ufmt package doesn't exists 
in Tumbleweed
+Patch0:         remove-ufmt-dep.patch
+# PATCH-FIX-OPENSUSE replace-python-call.patch
+# wrong executable call when outside of venv (gh#Instagram/LibCST#468)
+Patch1:         replace-python-call.patch
+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:  rust
 Requires:       python-PyYAML >= 5.2
 Requires:       python-typing-inspect >= 0.4.0
 Requires:       python-typing_extensions >= 3.7.4.2
-BuildArch:      noarch
-%if %{python_version_nodots} < 37
-Requires:       python-dataclasses
-%endif
+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}
@@ -64,10 +72,16 @@
 
 %prep
 %setup -q -n libcst-%{version}
-%autopatch -p1
+tar x -C native/ -f %{SOURCE1}
+cp -rf native/vendor vendor
+mkdir -p .cargo && echo "" >> .cargo/config.toml && cat %{SOURCE2} 
>>.cargo/config.toml
+
+pushd native
+mkdir -p .cargo
+cat %{SOURCE2} >>.cargo/config.toml
+popd
 
-# wrong executable call when outside of venv (gh#Instagram/LibCST#468)
-sed -i 's/"python"/sys.executable/' libcst/codemod/tests/test_codemod_cli.py
+%autopatch -p1
 
 # Depends on optional pyre
 rm \
@@ -80,17 +94,22 @@
 
 %if !%{with test}
 %build
+export CARGO_NET_OFFLINE=true PROFILE=release
 %python_build
 %endif
 
 %install
 %if !%{with test}
+export CARGO_NET_OFFLINE=true PROFILE=release
 %python_install
-%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%python_expand %fdupes %{buildroot}%{$python_sitearch}
 %endif
 
 %if %{with test}
 %check
+# test_fuzz needs network access because of 'from hypothesmith import 
from_grammar'
+rm libcst/tests/test_fuzz.py
+
 %{python_exec # https://github.com/Instagram/LibCST/issues/331 + 467
 $python -m libcst.codegen.generate matchers
 $python -m libcst.codegen.generate return_types
@@ -103,8 +122,8 @@
 %files %{python_files}
 %doc README.rst
 %license LICENSE
-%{python_sitelib}/libcst
-%{python_sitelib}/libcst-%{version}-py*.egg-info
+%{python_sitearch}/libcst
+%{python_sitearch}/libcst-%{version}-py*.egg-info
 %endif
 
 %changelog

++++++ _service ++++++
<services>
  <service name="cargo_vendor" mode="disabled">
     <param name="srcdir">libcst-0.4.9/native</param>
     <param name="compression">xz</param>
     <param name="update">true</param>
  </service>
  <service name="cargo_audit" mode="disabled">
     <param name="srcdir">libcst-0.4.9/native</param>
  </service>
</services>

++++++ cargo_config ++++++
[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"
(No newline at EOF)

++++++ libcst-0.3.19.tar.gz -> libcst-0.4.9.tar.gz ++++++
++++ 54404 lines of diff (skipped)

++++++ remove-ufmt-dep.patch ++++++
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:

++++++ replace-python-call.patch ++++++
Index: libcst-0.4.9/libcst/codemod/tests/test_codemod_cli.py
===================================================================
--- libcst-0.4.9.orig/libcst/codemod/tests/test_codemod_cli.py
+++ libcst-0.4.9/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",

Reply via email to