Armin Rigo added the comment:
Sorry to hijack CPython's bug tracker for that, but can you check if this makes
sense to you? I added a function 'locals_to_fast()' to the __pypy__ built-in
module which just calls the PyPy equivalent to PyFrame_LocalsToFast(). Your
tests are passing, so I
Fabio Zadrozny added the comment:
Hi Armin,
That does make sense to me, but maybe it could be nice providing a standard API
across Python implementations to make that call (even if the CPython version
uses ctypes underneath and the PyPy version uses RPython), but I'll leave that
up to
Fabio Zadrozny added the comment:
Sure, no problems on my side :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1654367
___
___
Armin Rigo added the comment:
CPython 2.7 is in feature-freeze, so we need to add it to __pypy__. If people
here decide to add it more officially to CPython 3.x, then we'll also add it
into pypy3, obviously. I'm sure a debugger can cope with a few extra ifs to
check on which platform it is
Fabio Zadrozny added the comment:
Just a note for anyone interested: ctypes can be used to access that function:
http://pydev.blogspot.com.br/2014/02/changing-locals-of-frame-frameflocals.html
So, I think that the changes I proposed shouldn't be applied (it'd only be
worth if someone provided
Armin Rigo added the comment:
Hi Fabio! This is admittedly a corner-case use case, but if you think it would
be worth it, we can very easily add this as a feature to PyPy (by making
frame.f_locals writeable). Then we can add the write inside pdb, and you could
do the same for PyDev when
Armin Rigo added the comment:
Also, can you provide a concrete case? Trying around in CPython 2.7, it seems
that locals of the current frame can always be modified from a pdb.set_trace().
--
___
Python tracker rep...@bugs.python.org
Fabio Zadrozny added the comment:
Hi Armin,
Sure, just attached the test case with tests failing (on the top, comment the
save_locals(frame) which has a 'pass' to see it working).
Mostly, it happens when editing something not in the top-frame (but sometimes I
think it could fail there too,
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1654367
___
___
Fabio Zadrozny fab...@users.sourceforge.net added the comment:
I agree that it'd be cleaner making the frame locals a dict-like object with
write access, but I wouldn't be able to do that because of time constraints
(and I'd have to research more how to do it and it'd be much more intrusive I
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I think this falls under the language moratorium in that it requires core
changes that make it more difficult for other implementations to catch-up.
--
nosy: +rhettinger
versions: +Python 3.3 -Python 3.2
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: +Python 3.2 -Python 2.7, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1654367
___
Mark Lawrence breamore...@yahoo.co.uk added the comment:
Fabio, could you please supply a patch as requested by Martin in msg55004?
Also note Armin's comments in msg55005.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
Changes by Daniel Diniz aja...@gmail.com:
--
keywords: +patch
stage: - patch review
versions: +Python 2.7, Python 3.1 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1654367
___
14 matches
Mail list logo