From ec3880cbffebe63728c04d954bf0621fc875e254b195d0a34893ac3c80eaf328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 23 Nov 2020 09:25:48 +0000 Subject: [PATCH] Accepting request 849770 from home:bnavigator:branches:devel:languages:python - 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] OBS-URL: https://build.opensuse.org/request/show/849770 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libcst?expand=0&rev=7 --- libcst-0.3.10.tar.gz | 3 --- libcst-0.3.14.tar.gz | 3 +++ python-libcst.changes | 34 ++++++++++++++++++++++++++++++++++ python-libcst.spec | 21 +++++---------------- 4 files changed, 42 insertions(+), 19 deletions(-) delete mode 100644 libcst-0.3.10.tar.gz create mode 100644 libcst-0.3.14.tar.gz diff --git a/libcst-0.3.10.tar.gz b/libcst-0.3.10.tar.gz deleted file mode 100644 index 90fa2b5..0000000 --- a/libcst-0.3.10.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0dccbfc1cff7bfa3214980e1d2d90b4e00b2fed002d4b276a8a411217738df3 -size 395395 diff --git a/libcst-0.3.14.tar.gz b/libcst-0.3.14.tar.gz new file mode 100644 index 0000000..17b9e96 --- /dev/null +++ b/libcst-0.3.14.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ce363a6c46ac0100f6b0f72f6a4dd2116e1e1d84259e229d580d30a6d086d84 +size 409871 diff --git a/python-libcst.changes b/python-libcst.changes index a2190a4..6dc1dad 100644 --- a/python-libcst.changes +++ b/python-libcst.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +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 diff --git a/python-libcst.spec b/python-libcst.spec index 9c96fa3..ff3492a 100644 --- a/python-libcst.spec +++ b/python-libcst.spec @@ -27,14 +27,14 @@ %bcond_with test %endif Name: python-libcst%{psuffix} -Version: 0.3.10 +Version: 0.3.14 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 # isort needed for the code regeneration, code mod also on non test flavor -BuildRequires: %{python_module isort} +BuildRequires: %{python_module isort >= 5.5.3} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -46,10 +46,9 @@ BuildArch: noarch Requires: python-dataclasses %endif %if %{with test} -%if %{python_version_nodots} < 37 -BuildRequires: %{python_module dataclasses} -%endif BuildRequires: %{python_module PyYAML >= 5.2} +BuildRequires: (python3-dataclasses if python3-base < 3.7) +BuildRequires: (python36-dataclasses if python36-base) # black needed for tests and the code regeneration BuildRequires: %{python_module black} BuildRequires: %{python_module hypothesis >= 4.36.0} @@ -65,9 +64,7 @@ A concrete syntax tree with AST-like properties for Python 3.5+ programs. %prep %setup -q -n libcst-%{version} # fix executable -sed -i 's/"python"/"python3"/' libcst/codemod/tests/test_codemod_cli.py -# https://github.com/Instagram/LibCST/issues/331 -isort --version | grep "VERSION 4" || sed -i 's/"isort", "-y"/"isort"/' libcst/codegen/generate.py +sed -i 's/"python"/sys.executable/' libcst/codemod/tests/test_codemod_cli.py # Depends on optional pyre rm \ @@ -75,9 +72,6 @@ rm \ libcst/metadata/tests/test_full_repo_manager.py \ libcst/tests/test_pyre_integration.py -# Test result depends on pyre -sed -i 's/"error: .* stack:",/"Transformed 1 files successfully.",/' libcst/codemod/tests/test_codemod_cli.py - %if !%{with test} %build %python_build @@ -91,11 +85,6 @@ sed -i 's/"error: .* stack:",/"Transformed 1 files successfully.",/' libcst/code %if %{with test} %check -%{python_expand # https://github.com/Instagram/LibCST/issues/331 -$python -m libcst.codegen.generate visitors -$python -m libcst.codegen.generate return_types -$python -m libcst.codegen.generate matchers -} %pyunittest -v %endif