diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-09-10 04:21:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-09-10 04:21:55 +0100 |
commit | 677b7ba5c317778df2ad7e70df94b9b7eec4adbc (patch) | |
tree | 6c418a1546fff5becab5d8b9ed6803323e7f316e /kde-frameworks/syntax-highlighting | |
parent | fbda87924e6faa7a1919f1a2b4182490bde5ec5c (diff) |
gentoo resync : 10.09.2021
Diffstat (limited to 'kde-frameworks/syntax-highlighting')
-rw-r--r-- | kde-frameworks/syntax-highlighting/Manifest | 3 | ||||
-rw-r--r-- | kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.85.0-python-add-yield-from-keyword.patch | 170 | ||||
-rw-r--r-- | kde-frameworks/syntax-highlighting/syntax-highlighting-5.85.0-r1.ebuild (renamed from kde-frameworks/syntax-highlighting/syntax-highlighting-5.85.0.ebuild) | 6 |
3 files changed, 177 insertions, 2 deletions
diff --git a/kde-frameworks/syntax-highlighting/Manifest b/kde-frameworks/syntax-highlighting/Manifest index 579497d4a622..7216cf1a17ec 100644 --- a/kde-frameworks/syntax-highlighting/Manifest +++ b/kde-frameworks/syntax-highlighting/Manifest @@ -1,5 +1,6 @@ +AUX syntax-highlighting-5.85.0-python-add-yield-from-keyword.patch 11150 BLAKE2B ac67afb36241a591e9a773d359452f8c101df21a62d332e76617be455f962e944a18c7c1cf61c2b37ccba85a6079c509290e5dc7f2897173e6c7e46e20226571 SHA512 cf5472233c61033625e178dc19bfd5ffb2181b2ecdb969807feceb38645a74dcd04909b01d1410fa71b597654bcedf81c09626ef5973c7f909d03822183c3231 DIST syntax-highlighting-5.82.0.tar.xz 2290880 BLAKE2B 14a98534b4e0ec85bd3bb3603c6330f665b5d2a3958f1b9034e48fdc542aca0c0eca80a1bc5c75179c480ffb40189dd94a847093e81ab4af91442a9e323f7d32 SHA512 4487fece4b144fcdc3b03bc0c11573dcdb0bb073218f25a98a7d08fe55db0fde027f32b5614fa5083097136310cae46d7d28288f7f874eaa2fbd930af2d9fb16 DIST syntax-highlighting-5.85.0.tar.xz 2334784 BLAKE2B faaa2e57b4f5acc6b090e0ffebbeb70715dc164f634683b2d442017087aed630581ab5d91e04fd4591d28c3a6d7bbfff395a36af6ed3911de79a512c00fe1f3a SHA512 d01ef96ba4fc2c281918850adbc72239f60875a6c9f1c589286eaa4cb7a18be96e8b184f77e1a056ed17ece7d70338e4b6fd7cadf69a307e4a8bdc0ce6dc3d38 EBUILD syntax-highlighting-5.82.0.ebuild 567 BLAKE2B 8695a7114da0e9cdd60c23cb683a081db1c7ea7de45c7d859632d9d1b7add893a84b2e83811da08d7fc8fbe559031c972b67c4591cace6dcc37d3c5d5abe6e97 SHA512 467147bcdede56f1e143414be3ab96dc5de9d624399a86613dd1e9bb6e9a4e8e5f34756f38c37a9aa18ecafe540229837fbf065075bcae13cff8cab0f52bb760 -EBUILD syntax-highlighting-5.85.0.ebuild 577 BLAKE2B 0a7236545a616ed78cd41733a55952981d1be2a3bc418e5ff127dfd28e859dba158c1bd1c20b0ed7a97e0413198dafb3101cecab0216a670b0704babfd24e0a1 SHA512 89aa5445ba5f4d736303577f299c766c5435d156b92065736f68b768472b495bd44d7e5e3aea0423f9ececfac4fac2085e46e22f89768b326b0a9cd856ade5a7 +EBUILD syntax-highlighting-5.85.0-r1.ebuild 663 BLAKE2B a81199cbf541b8a140b432419ac121a099087a588945f94f698c15d4b7df68b200068201cf9c0990342f09484c51da29ef8022af58de31b543d30ed0e559832b SHA512 c4e32b95678514ab15e52d52c8405565de2baacbcfad67a1798fd7497fbbc4f07bc5f39acc5769eeba2e2ac13f15e5ce91fc2e64fcc83edc34b47acee57ae893 MISC metadata.xml 455 BLAKE2B 134b0f3f4b2f38ab25d44a1daefc5f38113068cb041dc46722d9ad95846278b35d0c4a294a62266b3825627c6258a6d0f2ba3054350d2e6443f6fc82278f55cd SHA512 a8b4ea9fe9068223e7079de9e04a29c3ef461eb669ecd72a16a614e8c3b7ecec9e4433dab347c4e02140a6d42aaa25fbff77a5e269639d1c4311c59ecfa42c73 diff --git a/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.85.0-python-add-yield-from-keyword.patch b/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.85.0-python-add-yield-from-keyword.patch new file mode 100644 index 000000000000..ba1ae38355e8 --- /dev/null +++ b/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.85.0-python-add-yield-from-keyword.patch @@ -0,0 +1,170 @@ +From 439f8cbfe0b5d1f931c2233d1790e1280170c24c Mon Sep 17 00:00:00 2001 +From: Jan Paul Batrina <jpmbatrina01@gmail.com> +Date: Sat, 28 Aug 2021 21:27:41 +0800 +Subject: [PATCH] Python: Add "yield from" keyword + +BUG: 441540 +--- + autotests/folding/test.py.fold | 9 +++++++++ + autotests/html/test.py.dark.html | 9 +++++++++ + autotests/html/test.py.html | 9 +++++++++ + autotests/input/test.py | 9 +++++++++ + autotests/reference/test.py.ref | 9 +++++++++ + data/syntax/python.xml | 17 +++++++++++++++-- + 6 files changed, 60 insertions(+), 2 deletions(-) + +diff --git a/autotests/folding/test.py.fold b/autotests/folding/test.py.fold +index 7bbf054c..5e7a3ba8 100644 +--- a/autotests/folding/test.py.fold ++++ b/autotests/folding/test.py.fold +@@ -118,6 +118,15 @@ match<beginfold id='2'>(</beginfold id='2'>command.split<beginfold id='2'>(</beg + case <beginfold id='5'>[</beginfold id='5'>"quit"<endfold id='5'>]</endfold id='5'>: + print<beginfold id='2'>(</beginfold id='2'>"Goodbye!"<endfold id='2'>)</endfold id='2'> + ++def func1<beginfold id='2'>(</beginfold id='2'><endfold id='2'>)</endfold id='2'>: ++ yield 1 ++ yield from <beginfold id='5'>[</beginfold id='5'>func<beginfold id='2'>(</beginfold id='2'><endfold id='2'>)</endfold id='2'>, 1, 2, "3"<endfold id='5'>]</endfold id='5'> ++ # invalid, "from" no longer part of "yield from" ++ yield, from 1 ++ ++async def func2<beginfold id='2'>(</beginfold id='2'><endfold id='2'>)</endfold id='2'>: ++ await asyncio.sleep<beginfold id='2'>(</beginfold id='2'>1<endfold id='2'>)</endfold id='2'> ++ + "\\\\\\\\\\ENSURE THAT THIS AND THE FOLLOWING LINES ARE AT THE <endfold id='6'>END</endfold id='6'> OF THE FILE\\\\\\\\\\ \ + " + </indentfold>a = 'otherwise all succeeding lines will be +diff --git a/autotests/html/test.py.dark.html b/autotests/html/test.py.dark.html +index 23718b11..1d6c1dd2 100644 +--- a/autotests/html/test.py.dark.html ++++ b/autotests/html/test.py.dark.html +@@ -124,6 +124,15 @@ match(command.split()) + <span style="color:#fdbc4b;font-weight:bold;">case</span> [<span style="color:#f44f4f;">"quit"</span>]: + <span style="color:#7f8c8d;">print</span>(<span style="color:#f44f4f;">"Goodbye!"</span>) + ++<span style="font-weight:bold;">def</span> func1(): ++ <span style="color:#fdbc4b;font-weight:bold;">yield</span> <span style="color:#f67400;">1</span> ++ <span style="color:#fdbc4b;font-weight:bold;">yield</span> <span style="color:#fdbc4b;font-weight:bold;">from</span> [func(), <span style="color:#f67400;">1</span>, <span style="color:#f67400;">2</span>, <span style="color:#f44f4f;">"3"</span>] ++ <span style="color:#7a7c7d;"># invalid, "from" no longer part of "yield from"</span> ++ <span style="color:#fdbc4b;font-weight:bold;">yield</span>, <span style="color:#27ae60;">from</span> <span style="color:#f67400;">1</span> ++ ++<span style="color:#fdbc4b;font-weight:bold;">async</span> <span style="font-weight:bold;">def</span> func2(): ++ <span style="color:#fdbc4b;font-weight:bold;">await</span> asyncio.sleep(<span style="color:#f67400;">1</span>) ++ + <span style="color:#7a7c7d;">"</span><span style="color:#3daee9;">\\\\\\\\\\</span><span style="color:#7a7c7d;">ENSURE THAT THIS AND THE FOLLOWING LINES ARE AT THE </span><span style="color:#2980b9;background-color:#153042;">END</span><span style="color:#7a7c7d;"> OF THE FILE</span><span style="color:#3daee9;">\\\\\\\\\\</span><span style="color:#7a7c7d;"> </span><span style="color:#3daee9;">\</span> + <span style="color:#7a7c7d;">"</span> + a <span style="color:#3f8058;">=</span> <span style="color:#f44f4f;">'otherwise all succeeding lines will be</span> +diff --git a/autotests/html/test.py.html b/autotests/html/test.py.html +index 55cfefb0..4d7a2709 100644 +--- a/autotests/html/test.py.html ++++ b/autotests/html/test.py.html +@@ -124,6 +124,15 @@ match(command.split()) + <span style="font-weight:bold;">case</span> [<span style="color:#bf0303;">"quit"</span>]: + <span style="color:#644a9b;font-weight:bold;">print</span>(<span style="color:#bf0303;">"Goodbye!"</span>) + ++<span style="font-weight:bold;">def</span> func1(): ++ <span style="font-weight:bold;">yield</span> <span style="color:#b08000;">1</span> ++ <span style="font-weight:bold;">yield</span> <span style="font-weight:bold;">from</span> [func(), <span style="color:#b08000;">1</span>, <span style="color:#b08000;">2</span>, <span style="color:#bf0303;">"3"</span>] ++ <span style="color:#898887;"># invalid, "from" no longer part of "yield from"</span> ++ <span style="font-weight:bold;">yield</span>, <span style="color:#ff5500;">from</span> <span style="color:#b08000;">1</span> ++ ++<span style="font-weight:bold;">async</span> <span style="font-weight:bold;">def</span> func2(): ++ <span style="font-weight:bold;">await</span> asyncio.sleep(<span style="color:#b08000;">1</span>) ++ + <span style="color:#898887;">"</span><span style="color:#924c9d;">\\\\\\\\\\</span><span style="color:#898887;">ENSURE THAT THIS AND THE FOLLOWING LINES ARE AT THE </span><span style="color:#0057ae;background-color:#e0e9f8;">END</span><span style="color:#898887;"> OF THE FILE</span><span style="color:#924c9d;">\\\\\\\\\\</span><span style="color:#898887;"> </span><span style="color:#924c9d;">\</span> + <span style="color:#898887;">"</span> + a <span style="color:#ca60ca;">=</span> <span style="color:#bf0303;">'otherwise all succeeding lines will be</span> +diff --git a/autotests/input/test.py b/autotests/input/test.py +index 3eb8378d..d91db578 100644 +--- a/autotests/input/test.py ++++ b/autotests/input/test.py +@@ -118,6 +118,15 @@ match(command.split()): + case ["quit"]: + print("Goodbye!") + ++def func1(): ++ yield 1 ++ yield from [func(), 1, 2, "3"] ++ # invalid, "from" no longer part of "yield from" ++ yield, from 1 ++ ++async def func2(): ++ await asyncio.sleep(1) ++ + "\\\\\\\\\\ENSURE THAT THIS AND THE FOLLOWING LINES ARE AT THE END OF THE FILE\\\\\\\\\\ \ + " + a = 'otherwise all succeeding lines will be +diff --git a/autotests/reference/test.py.ref b/autotests/reference/test.py.ref +index 9c5bdb54..1742da2b 100644 +--- a/autotests/reference/test.py.ref ++++ b/autotests/reference/test.py.ref +@@ -118,6 +118,15 @@ + <Normal Text> </Normal Text><Flow Control Keyword>case</Flow Control Keyword><Normal Text> [</Normal Text><String>"quit"</String><Normal Text>]:</Normal Text><br/> + <Normal Text> </Normal Text><Builtin Function>print</Builtin Function><Normal Text>(</Normal Text><String>"Goodbye!"</String><Normal Text>)</Normal Text><br/> + <Normal Text></Normal Text><br/> ++<Definition Keyword>def</Definition Keyword><Normal Text> func1():</Normal Text><br/> ++<Normal Text> </Normal Text><Flow Control Keyword>yield</Flow Control Keyword><Normal Text> </Normal Text><Int>1</Int><br/> ++<Normal Text> </Normal Text><Flow Control Keyword>yield</Flow Control Keyword><Normal Text> </Normal Text><Flow Control Keyword>from</Flow Control Keyword><Normal Text> [func(), </Normal Text><Int>1</Int><Normal Text>, </Normal Text><Int>2</Int><Normal Text>, </Normal Text><String>"3"</String><Normal Text>]</Normal Text><br/> ++<Normal Text> </Normal Text><Comment># invalid, "from" no longer part of "yield from"</Comment><br/> ++<Normal Text> </Normal Text><Flow Control Keyword>yield</Flow Control Keyword><Normal Text>, </Normal Text><Import>from</Import><Normal Text> </Normal Text><Int>1</Int><br/> ++<Normal Text></Normal Text><br/> ++<Flow Control Keyword>async</Flow Control Keyword><Normal Text> </Normal Text><Definition Keyword>def</Definition Keyword><Normal Text> func2():</Normal Text><br/> ++<Normal Text> </Normal Text><Flow Control Keyword>await</Flow Control Keyword><Normal Text> asyncio.sleep(</Normal Text><Int>1</Int><Normal Text>)</Normal Text><br/> ++<Normal Text></Normal Text><br/> + <Comment>"</Comment><String Char>\\\\\\\\\\</String Char><Comment>ENSURE THAT THIS AND THE FOLLOWING LINES ARE AT THE </Comment><Region Marker>END</Region Marker><Comment> OF THE FILE</Comment><String Char>\\\\\\\\\\</String Char><Comment> </Comment><String Char>\</String Char><br/> + <Comment>"</Comment><br/> + <Normal Text>a </Normal Text><Operator>=</Operator><Normal Text> </Normal Text><String>'otherwise all succeeding lines will be</String><br/> +diff --git a/data/syntax/python.xml b/data/syntax/python.xml +index 7143bf30..676872f0 100644 +--- a/data/syntax/python.xml ++++ b/data/syntax/python.xml +@@ -52,7 +52,7 @@ + <!-- v2.07 add support for %prog and co, see bug 142832 --> + <!-- v2.08 add missing overloaders, new Python 3 statements, builtins, and keywords --> + <!-- v2.29 recognize escape sequenzes correctly --> +-<language name="Python" version="21" style="python" indenter="python" kateversion="5.0" section="Scripts" extensions="*.py;*.pyw;SConstruct;SConscript;*.FCMacro" mimetype="application/x-python;text/x-python;text/x-python3" casesensitive="1" author="Michael Bueker" license=""> ++<language name="Python" version="22" style="python" indenter="python" kateversion="5.0" section="Scripts" extensions="*.py;*.pyw;SConstruct;SConscript;*.FCMacro" mimetype="application/x-python;text/x-python;text/x-python3" casesensitive="1" author="Michael Bueker" license=""> + <highlighting> + <list name="import"> + <item>import</item> +@@ -90,10 +90,17 @@ + <item>try</item> + <item>while</item> + <item>with</item> +- <item>yield</item> + <item>async</item> + <item>await</item> + </list> ++ <list name="flow_yield"> ++ <item>yield</item> ++ <!-- ++ "yield from" added here as a keyword for autocompletion. The actual handling ++ is in context="yield" so that we won't need to add space as a weakDeliminator. ++ --> ++ <item>yield from</item> ++ </list> + <list name="patternmatching"> + <item>match</item> + <item>case</item> +@@ -380,6 +387,7 @@ + <keyword attribute="Definition Keyword" String="defs" context="#stay"/> + <keyword attribute="Operator Keyword" String="operators" context="#stay"/> + <keyword attribute="Flow Control Keyword" String="flow" context="#stay"/> ++ <keyword attribute="Flow Control Keyword" String="flow_yield" context="yield"/> + <keyword attribute="Flow Control Keyword" String="patternmatching" context="Pattern Matching" lookAhead="1" firstNonSpace="1"/> + <keyword attribute="Builtin Function" String="builtinfuncs" context="#stay"/> + <keyword attribute="Special Variable" String="specialvars" context="#stay"/> +@@ -428,6 +436,11 @@ + <RegExpr attribute="Error" String="[\w\d]+" context="#pop#pop"/> + </context> + ++ <context name="yield" attribute="Flow Control Keyword" lineEndContext="#pop" fallthrough="1" fallthroughContext="#pop"> ++ <DetectSpaces attribute="Normal Text" context="#stay"/> ++ <WordDetect attribute="Flow Control Keyword" context="#pop" String="from"/> ++ </context> ++ + <context name="Pattern Matching" attribute="Flow Control Keyword" lineEndContext="#pop"> + <!-- + Python 3.10: https://docs.python.org/3.10/reference/compound_stmts.html#the-match-statement +-- +GitLab + diff --git a/kde-frameworks/syntax-highlighting/syntax-highlighting-5.85.0.ebuild b/kde-frameworks/syntax-highlighting/syntax-highlighting-5.85.0-r1.ebuild index 2118f82f77db..0b22fba7fa4e 100644 --- a/kde-frameworks/syntax-highlighting/syntax-highlighting-5.85.0.ebuild +++ b/kde-frameworks/syntax-highlighting/syntax-highlighting-5.85.0-r1.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 ECM_TEST="forceoptional" QTMIN=5.15.2 @@ -23,6 +23,10 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${P}-python-add-yield-from-keyword.patch # KDE-bug 441540 +) + src_install() { ecm_src_install dobin "${BUILD_DIR}"/bin/katehighlightingindexer |