Skip to content

python 3.14.0a1 - test_partial and test_smart_decorator are failing  #1480

@hrnciar

Description

@hrnciar

Describe the bug

Fedora is starting to rebuild packages with upcoming python 3.14. Some tests are failing.

======================================================================
ERROR: test_partial (tests.test_trees.TestTrees.test_partial)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 122, in _call_userfunc
    return f.visit_wrapper(f, tree.data, children, tree.meta)
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 504, in _vargs_inline
    return f(*children)
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 482, in __call__
    return self.base_func(*args, **kwargs)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
TypeError: TestTrees.test_partial.<locals>.test() got multiple values for argument 'postfix'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/tests/test_trees.py", line 361, in test_partial
    res = T().transform(tree)
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 161, in transform
    res = list(self._transform_children([tree]))
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 146, in _transform_children
    res = self._transform_tree(c)
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 156, in _transform_tree
    children = list(self._transform_children(tree.children))
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 146, in _transform_children
    res = self._transform_tree(c)
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 157, in _transform_tree
    return self._call_userfunc(tree, children)
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 128, in _call_userfunc
    raise VisitError(tree.data, tree, e)
lark.exceptions.VisitError: Error trying to process rule "a":

TestTrees.test_partial.<locals>.test() got multiple values for argument 'postfix'

======================================================================
ERROR: test_smart_decorator (tests.test_trees.TestTrees.test_smart_decorator)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 122, in _call_userfunc
    return f.visit_wrapper(f, tree.data, children, tree.meta)
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 504, in _vargs_inline
    return f(*children)
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 482, in __call__
    return self.base_func(*args, **kwargs)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
TypeError: reduce() arg 2 must support iteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/tests/test_trees.py", line 293, in test_smart_decorator
    result = test_instance.transform(Tree(method_name, children))
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 161, in transform
    res = list(self._transform_children([tree]))
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 146, in _transform_children
    res = self._transform_tree(c)
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 157, in _transform_tree
    return self._call_userfunc(tree, children)
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-lark-1.2.2-build/lark-1.2.2/lark/visitors.py", line 128, in _call_userfunc
    raise VisitError(tree.data, tree, e)
lark.exceptions.VisitError: Error trying to process rule "partial_reduce_mul":

reduce() arg 2 must support iteration

----------------------------------------------------------------------
Ran 1115 tests in 8.042s

FAILED (errors=2, skipped=131)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions