Hi,

On Tue, 19 Oct 2021 at 20:47, M A <teammember0...@gmail.com> wrote:
> [translation:ERROR] Exception: A function calling locals() is not RPython.  
> Note that if you're translating code outside the PyPy repository, a likely 
> cause is that py.test's --assert=rewrite mode is getting in the way.  You 
> should copy the file pytest.ini from the root of the PyPy repository into 
> your own project.

Hard to know for sure, but maybe you've put these lines inside a
function that is getting translated?  Put them at module level
instead.

Also note that rffi.llexternal() probably needs an argument to tell it
not to release the GIL.  This is necessary in the backend because
there are some assumptions that this code generation and patching is
atomic.  If you forget, you should get another clean error, though.
In this case the safest is to say ``rffi.llexternal(...,
_nowrapper=True)``.


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to