commit python-pythran for openSUSE:Factory
1 Aug
2024
1 Aug
'24
20:03
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pythran for openSUSE:Factory checked in at 2024-08-01 22:03:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pythran (Old) and /work/SRC/openSUSE:Factory/.python-pythran.new.7232 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-pythran" Thu Aug 1 22:03:26 2024 rev:19 rq:1190557 version:0.16.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pythran/python-pythran.changes 2024-07-02 18:14:40.707530290 +0200 +++ /work/SRC/openSUSE:Factory/.python-pythran.new.7232/python-pythran.changes 2024-08-01 22:03:40.174586300 +0200 @@ -1,0 +2,6 @@ +Wed Jul 31 04:32:03 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com> + +- Add patch support-gast-0.6.patch: + * Support gast 0.6.0 changes, change Requires appropriately. + +------------------------------------------------------------------- New: ---- support-gast-0.6.patch BETA DEBUG BEGIN: New: - Add patch support-gast-0.6.patch: * Support gast 0.6.0 changes, change Requires appropriately. BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pythran.spec ++++++ --- /var/tmp/diff_new_pack.bfYkjX/_old 2024-08-01 22:03:40.794611875 +0200 +++ /var/tmp/diff_new_pack.bfYkjX/_new 2024-08-01 22:03:40.794611875 +0200 @@ -52,6 +52,8 @@ # Tests are only availble from the github archive Source0: https://github.com/serge-sans-paille/pythran/archive/refs/tags/%{version}.tar.gz#/pythran-%{version}-gh.tar.gz Source99: python-pythran-rpmlintrc +# PATCH-FIX-UPSTREAM gh#serge-sans-paille/pythran#840a0e706ec39963aec6bcd1f118bf33177c20b4 +Patch0: support-gast-0.6.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} @@ -61,7 +63,7 @@ Requires: python-numpy Requires: python-ply >= 3.4 Requires: python-setuptools -Requires: (python-gast >= 0.5.0 with python-gast < 0.6.0) +Requires: (python-gast >= 0.6.0 with python-gast < 0.7.0) Requires(post): update-alternatives Requires(postun): update-alternatives # SECTION This is a package that compiles code, the runtime requires devel packages ++++++ support-gast-0.6.patch ++++++ From 840a0e706ec39963aec6bcd1f118bf33177c20b4 Mon Sep 17 00:00:00 2001 From: serge-sans-paille <serge.guelton@telecom-bretagne.eu> Date: Sat, 29 Jun 2024 19:13:02 +0200 Subject: [PATCH] Bump gast requirement to 0.6.0 This mostly helps for harmonious behavior wrt. gast.dump --- docs/TUTORIAL.rst | 8 ++++---- pythran/utils.py | 2 +- requirements.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/TUTORIAL.rst b/docs/TUTORIAL.rst index 09f6902f9..7692547eb 100644 --- a/docs/TUTORIAL.rst +++ b/docs/TUTORIAL.rst @@ -20,7 +20,7 @@ Python ships a standard module, ``ast`` to turn Python code into an AST. For ins >>> code = "a=1" >>> tree = ast.parse(code) # turn the code into an AST >>> print(ast.dump(tree)) # view it as a string - Module(body=[Assign(targets=[Name(id='a', ctx=Store(), annotation=None, type_comment=None)], value=Constant(value=1, kind=None), type_comment=None)], type_ignores=[]) + Module(body=[Assign(targets=[Name(id='a', ctx=Store())], value=Constant(value=1, kind=None))]) Deciphering the above line, one learns that the single assignment is parsed as a module containing a single statement, which is an assignment to a single @@ -33,7 +33,7 @@ Eventually, one needs to parse more complex codes, and things get a bit more cry ... return n if n< 2 else fib(n-1) + fib(n-2)""" >>> tree = ast.parse(fib_src) >>> print(ast.dump(tree)) - Module(body=[FunctionDef(name='fib', args=arguments(args=[Name(id='n', ctx=Param(), annotation=None, type_comment=None)], posonlyargs=[], vararg=None, kwonlyargs=[], kw_defaults=[], kwarg=None, defaults=[]), body=[Return(value=IfExp(test=Compare(left=Name(id='n', ctx=Load(), annotation=None, type_comment=None), ops=[Lt()], comparators=[Constant(value=2, kind=None)]), body=Name(id='n', ctx=Load(), annotation=None, type_comment=None), orelse=BinOp(left=Call(func=Name(id='fib', ctx=Load(), annotation=None, type_comment=None), args=[BinOp(left=Name(id='n', ctx=Load(), annotation=None, type_comment=None), op=Sub(), right=Constant(value=1, kind=None))], keywords=[]), op=Add(), right=Call(func=Name(id='fib', ctx=Load(), annotation=None, type_comment=None), args=[BinOp(left=Name(id='n', ctx=Load(), annotation=None, type_comment=None), op=Sub(), right=Constant(value=2, kind=None))], keywords=[]))))], decorator_list=[], returns=None, type_comment=None)], type_ignores=[]) + Module(body=[FunctionDef(name='fib', args=arguments(args=[Name(id='n', ctx=Param())]), body=[Return(value=IfExp(test=Compare(left=Name(id='n', ctx=Load()), ops=[Lt()], comparators=[Constant(value=2, kind=None)]), body=Name(id='n', ctx=Load()), orelse=BinOp(left=Call(func=Name(id='fib', ctx=Load()), args=[BinOp(left=Name(id='n', ctx=Load()), op=Sub(), right=Constant(value=1, kind=None))]), op=Add(), right=Call(func=Name(id='fib', ctx=Load()), args=[BinOp(left=Name(id='n', ctx=Load()), op=Sub(), right=Constant(value=2, kind=None))]))))])]) The idea remains the same. The whole Python syntax is described in http://docs.python.org/2/library/ast.html and is worth a glance, otherwise @@ -199,7 +199,7 @@ constant expressions. In the previous code, there is only two constant >>> ce = pm.gather(analyses.ConstantExpressions, tree) >>> sorted(map(ast.dump, ce)) - ["Attribute(value=Name(id='math', ctx=Load(), annotation=None, type_comment=None), attr='cos', ctx=Load())", 'Constant(value=3, kind=None)'] + ["Attribute(value=Name(id='math', ctx=Load()), attr='cos', ctx=Load())", 'Constant(value=3, kind=None)'] One of the most critical analyse of Pythran is the points-to analysis. There are two flavors of this analyse, one that computes an over-set of the aliased @@ -210,7 +210,7 @@ variable, and one that computes an under set. ``Aliases`` computes an over-set:: >>> al = pm.gather(analyses.Aliases, tree) >>> returned = tree.body[-1].body[-1].value >>> print(ast.dump(returned)) - Name(id='b', ctx=Load(), annotation=None, type_comment=None) + Name(id='b', ctx=Load()) >>> sorted(a.id for a in al[returned]) ['c', 'd'] diff --git a/pythran/utils.py b/pythran/utils.py index 2d7a67327..55a7e8ad6 100644 --- a/pythran/utils.py +++ b/pythran/utils.py @@ -106,7 +106,7 @@ def get_variable(assignable): ... slice=ast.Name('j', ast.Load(), None, None), ... ctx=ast.Load()) >>> ast.dump(get_variable(ref)) - "Name(id='a', ctx=Load(), annotation=None, type_comment=None)" + "Name(id='a', ctx=Load())" """ msg = "Only name and subscript can be assigned." assert isinstance(assignable, (ast.Name, ast.Subscript)), msg diff --git a/requirements.txt b/requirements.txt index fd6a738e5..c7a25c52a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ ply>=3.4 setuptools -gast~=0.5.0 +gast~=0.6.0 numpy beniget~=0.4.0
96
Age (days ago)
96
Last active (days ago)
0 comments
1 participants
participants (1)
-
Source-Sync