Description
xdis.stack_effect is implemented in xdis.std, but is missing from module-level exports, so it cannot be accessed at xdis.stack_effect. This breaks parity with dis, which has dis.stack_effect exposed externally.
How to Reproduce
>>> import xdis
>>> xdis.stack_effect
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
xdis.stack_effect
AttributeError: module 'xdis' has no attribute 'stack_effect'
>>> import dis
>>> dis.stack_effect
<built-in function stack_effect>
>>>
Expected behavior
Accessing xdis.stack_effect should give the stack effect function.
Environment
Using xdis installed from git main branch (via pip install git+https://github.com/rocky/python-xdis.git).
Running on Python 3.15.0b1+.
Workarounds
Can access from _std_api directly.
>>> from xdis.std import _std_api
>>> _std_api.stack_effect
<bound method _StdApi.stack_effect of <xdis.std._StdApi object at 0x7f18fcb17cb0>>
>>>
Priority
Not particularly important, the workaround is very easy. However, it does break any uses of xdis for drop-in replacement of dis if the stack_effect function is needed.
Description
xdis.stack_effectis implemented inxdis.std, but is missing from module-level exports, so it cannot be accessed atxdis.stack_effect. This breaks parity withdis, which hasdis.stack_effectexposed externally.How to Reproduce
Expected behavior
Accessing
xdis.stack_effectshould give the stack effect function.Environment
Using
xdisinstalled from git main branch (viapip install git+https://github.com/rocky/python-xdis.git).Running on Python 3.15.0b1+.
Workarounds
Can access from
_std_apidirectly.Priority
Not particularly important, the workaround is very easy. However, it does break any uses of xdis for drop-in replacement of dis if the
stack_effectfunction is needed.