FrameLocalsProxy does not support `.update(iterable)`
Open
@gaogaotiantian is already working on this.
Since Jul 6, 2025.
stdlib
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
import inspect
def main():
ls = inspect.currentframe().f_locals
ls.update([("a", 0)])
main()
The above works in Python 3.12 but fails in Python 3.13 with:
TypeError: update() argument must be dict or another FrameLocalsProxy
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.