Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

memory/gctransform/test/test_framework.py::test_no_collect

def test_no_collect():
        from rpython.rlib import rgc
        from rpython.translator.c.genc import CStandaloneBuilder
    
        @rgc.no_collect
        def g():
            return 1
    
        assert g._dont_inline_
        assert g._gc_no_collect_
    
        def entrypoint(argv):
            return g() + 2
    
        t = rtype(entrypoint, [s_list_of_strings])
        t.config.translation.gc = "minimark"
        cbuild = CStandaloneBuilder(t, entrypoint, t.config,
                                    gcpolicy=FrameworkGcPolicy2)
        cbuild.make_entrypoint_wrapper = False
>       db = cbuild.build_database()

memory/gctransform/test/test_framework.py:120: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
translator/c/genc.py:102: in build_database
    self.config.translation.reverse_debugger)
translator/c/database.py:64: in __init__
    self.gctransformer = self.gcpolicy.gettransformer(translator, gchooks)
translator/c/gc.py:309: in gettransformer
    return self.transformerclass(translator, gchooks=gchooks)
memory/gctransform/framework.py:132: in __init__
    GCClass, GC_PARAMS = choose_gc_from_config(translator.config)
memory/gc/base.py:593: in choose_gc_from_config
    globals(), locals(), [classname])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    """
    # XXX Should find a way to bound the major collection threshold by the
    # XXX total addressable size.  Maybe by keeping some minimarkpage arenas
    # XXX pre-reserved, enough for a few nursery collections?  What about
    # XXX raw-malloced memory?
    import sys
    from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup
    from rpython.rtyper.lltypesystem.lloperation import llop
    from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage
    from rpython.memory.gc.base import GCBase, MovingGCBase
>   from rpython.memory.gc import env
E     File "/build_dir/rpython-linux-x86-32/build/rpython/memory/gc/env.py", line 423
E   SyntaxError: Non-ASCII character '\xe2' in file /build_dir/rpython-linux-x86-32/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

memory/gc/minimark.py:55: SyntaxError
---------- Captured stderr call ----------
[rtyper] -=- specialized 6 blocks -=-
[rtyper] -=- specialized 4 more blocks -=-
[rtyper] -=- specialized 25 more blocks -=-
builder: rpython-linux-x86-32 build #832
test: memory/gctransform/test/test_framework/py/test_no_collect