FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Some CPython tests fail in integration_tests with conda-forge lpython · Issue #1826 · lcompilers/lpython · GitHub

Some CPython tests fail in integration_tests with conda-forge lpython #1826

Description

See #1825 for setup. These fail:

	156 - structs_04 (Failed)
	159 - structs_09 (Failed)
	160 - structs_10 (Failed)
	166 - structs_17 (Failed)
	204 - test_01_goto (Failed)
	225 - lpython_decorator_01 (Failed)

The actual failures are:

ld: library not found for -lpython3.10
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Traceback (most recent call last):
  File "/Users/ondrej/repos/lpython/integration_tests/lpython_decorator_01.py", line 4, in <module>
    @lpython
     ^^^^^^^
  File "/Users/ondrej/repos/lpython/src/runtime/lpython/lpython.py", line 784, in __init__
    assert r == 0, "Failed to create the shared library"
AssertionError: Failed to create the shared library

Here probably python3.11 is used. => must make the decorator more robust

Traceback (most recent call last):
  File "/Users/ondrej/repos/lpython/integration_tests/test_01_goto.py", line 35, in <module>
    test_goto()
  File "/Users/ondrej/repos/lpython/integration_tests/test_01_goto.py", line 29, in test_goto
    print(f())
          ^^^
  File "/Users/ondrej/repos/lpython/integration_tests/test_01_goto.py", line 8, in f
    goto .end
    ^^^^
NameError: name 'goto' is not defined

goto does not work somehow.

Traceback (most recent call last):
  File "/Users/ondrej/repos/lpython/integration_tests/structs_10.py", line 12, in <module>
    @dataclass
     ^^^^^^^^^
  File "/Users/ondrej/repos/lpython/src/runtime/lpython/lpython.py", line 47, in dataclass
    return py_dataclass(arg)
           ^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 1221, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 1211, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 959, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 816, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class '__main__.Mat'> for field mat is not allowed: use default_factory

and:

Traceback (most recent call last):
  File "/Users/ondrej/repos/lpython/integration_tests/structs_17.py", line 3, in <module>
    @dataclass
     ^^^^^^^^^
  File "/Users/ondrej/repos/lpython/src/runtime/lpython/lpython.py", line 47, in dataclass
    return py_dataclass(arg)
           ^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 1221, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 1211, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 959, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 816, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class '__main__.B.C'> for field bc is not allowed: use default_factory

and

Traceback (most recent call last):
  File "/Users/ondrej/repos/lpython/integration_tests/structs_09.py", line 7, in <module>
    @dataclass
     ^^^^^^^^^
  File "/Users/ondrej/repos/lpython/src/runtime/lpython/lpython.py", line 47, in dataclass
    return py_dataclass(arg)
           ^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 1221, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 1211, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 959, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 816, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class '__main__.C'> for field bc is not allowed: use default_factory

and

Traceback (most recent call last):
  File "/Users/ondrej/repos/lpython/integration_tests/structs_04.py", line 9, in <module>
    @dataclass
     ^^^^^^^^^
  File "/Users/ondrej/repos/lpython/src/runtime/lpython/lpython.py", line 47, in dataclass
    return py_dataclass(arg)
           ^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 1221, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 1211, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 959, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ondrej/mambaforge/envs/t1/lib/python3.11/dataclasses.py", line 816, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class '__main__.A'> for field a is not allowed: use default_factory

Some issue in a dataclass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL