Closed gsomlo closed 2 years ago
Probably needs an update of the part that reads the Python bitcode to automatically name objects. https://github.com/m-labs/migen/blob/master/migen/fhdl/tracer.py Are you able to take a look?
On Sun, Apr 03, 2022 at 05:26:16PM -0700, Sébastien Bourdeauducq wrote:
https://github.com/m-labs/migen/blob/master/migen/fhdl/tracer.py Are you able to take a look?
I'm afraid that's a bit beyond my current understanding of python inspect...
They mention some changes to the frame struct in 3.11:
https://docs.python.org/3.11/whatsnew/3.11.html
but I'm not exactly sure if referencing e.g. f_back and the like from python is still OK or not, or how would one go about rewriting anything that relies on directly accessing the fields of a frame...
I looked into this a little bit. From What’s New In Python 3.11:
CALL_FUNCTION
, CALL_FUNCTION_KW
and CALL_METHOD
with PUSH_NULL, PRECALL, CALL, and KW_NAMES. This decouples the argument shifting for methods from the handling of keyword arguments and allows better specialization of calls.The _call_opcodes
dictionary in migen.fhdl.tracer
is already conditionalized to handle Python version differences, but this is a somewhat bigger restructuring. I haven’t studied it enough to know how to handle it.
In the failing test/example, the opcode is CALL
on Python 3.11.
closing since merged PR fixes the problem -- thanks!
Trying to build migen using Python 3.11 (on Fedora rawhide, FWIW). Builds OK, but then
test_local_cd
fails duringsetup.py test
.Hopefully it's an easy fix :) -- Thanks!