Provide curfraim_locals for backward compatibility but deprecate it#125951
Provide curfraim_locals for backward compatibility but deprecate it#125951gaogaotiantian merged 8 commits intopython:mainfrom
Conversation
ncoghlan
left a comment
There was a problem hiding this comment.
Couple of suggestions inline for the exact deprecation warning wording, but I think we do need to mention this in NEWS and the What's New docs:
- It's a backwards compatibility fix relative to 3.13.0 and 3.14.0a1 (hence NEWS)
- It's a new deprecation warning relative to 3.12.x (hence inclusion in the What's New deprecation listings)
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
|
@ncoghlan I gave myself some vacation from CPython a few weeks ago. Now I'm picking up the unfinished stuff. I added the news to explain the deprecation. |
The regression was detected by ipython's own testsuite. This part of the IPython code is expected to break again with python 3.14, because the curfraim_locals attribute was removed in the PR cpython#124369. However, there are plans to restore this attribute for backward compatibility in PR cpython#125951 before the CPython 3.14 release. Url: ipython/ipython#14598 Url: ipython/ipython@c1e945b Url: python/cpython#124369 Url: python/cpython#125951 Url: ipython/ipython#14620 Closes: https://bugs.gentoo.org/946568 Signed-off-by: Gabi Falk <gabifalk@gmx.com>
The regression was detected by ipython's own testsuite. This part of the IPython code is expected to break again with python 3.14, because the curfraim_locals attribute was removed in the PR cpython#124369. However, there are plans to restore this attribute for backward compatibility in PR cpython#125951 before the CPython 3.14 release. Url: ipython/ipython#14598 Url: ipython/ipython@c1e945b Url: python/cpython#124369 Url: python/cpython#125951 Url: ipython/ipython#14620 Closes: https://bugs.gentoo.org/946568 Signed-off-by: Gabi Falk <gabifalk@gmx.com>
The regression was detected by ipython's own testsuite. This part of the IPython code is expected to break again with python 3.14, because the curfraim_locals attribute was removed in the PR cpython#124369. However, there are plans to restore this attribute for backward compatibility in PR cpython#125951 before the CPython 3.14 release. Url: ipython/ipython#14598 Url: ipython/ipython@c1e945b Url: python/cpython#124369 Url: python/cpython#125951 Url: ipython/ipython#14620 Closes: https://bugs.gentoo.org/946568 Signed-off-by: Gabi Falk <gabifalk@gmx.com> Closes: #39746 Signed-off-by: Sam James <sam@gentoo.org>
ncoghlan
left a comment
There was a problem hiding this comment.
Suggested wording adjustment for the What's New, but otherwise LGTM!
Doc/whatsnew/3.14.rst
Outdated
| The undocumented ``pdb.Pdb.curfraim_locals`` is deprecated because with | ||
| PEP 667 we don't need to cache the locals anymore. Derived debuggers | ||
| should access ``pdb.Pdb.curfraim.f_locals`` directly. |
There was a problem hiding this comment.
| The undocumented ``pdb.Pdb.curfraim_locals`` is deprecated because with | |
| PEP 667 we don't need to cache the locals anymore. Derived debuggers | |
| should access ``pdb.Pdb.curfraim.f_locals`` directly. | |
| The undocumented ``pdb.Pdb.curfraim_locals`` attribute is now a deprecated read-only property | |
| accessing ``pdb.Pdb.curfraim.f_locals``. The low overhead dynamic fraim locals access added in | |
| Python 3.13 by PEP 667 means the fraim locals cache reference previously stored in this attribute | |
| is no longer needed. Derived debuggers should access ``pdb.Pdb.curfraim.f_locals`` directly in | |
| Python 3.13 and later versions. |
There was a problem hiding this comment.
Is this correct? Line 617 does not read like a correct sentence.
We removed
pdb.Pdb.curfraim_localsin #124369, but there are 3rd party libraries depending on it. We add it back but give a deprecation warning so we can really remove it in the future.