Is it possible to re-generate the source of pickled objects including encapsulated globals?
维护者通常 16 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先检查 Python 的 pickle/unpickle 行为以及 inspect.getsource,重点关注被引用的 globals 在经过 pickle 的函数中是如何表示的。确定所请求的输出是否可以包含这些 globals,并定义 dictionary 或函数列表的可运行源代码应包含什么。
由索引模型根据 Issue 内容生成。
描述
I know that I can pickle a dictionary or list of functions, then unpickle them and use the inspect.getsource to print the source of each of them, but that does not include the source of any globals that are referenced inside those functions. I'd like to be able to regenerate the source of all pickled objects to create runnable source. I have to think the globals are stored somewhere that can be inspected, but I wasn't able to find them.
- 主要语言
- Python
- 星标
- 1.9k
- 派生
- 206
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudpipe/cloudpickle 的其他 Issue
-
Bug: unguarded dict.pop() in _function_setstate causes KeyError crash on crafted pickle (regression from c6f8cd4)可能已有人在做 @soodoku 于 83 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
cloudpipe/cloudpickle#593 · 1 条评论 ·
维护者通常 16 天内回复
-
Globals read only inside a class body defined in a by-value function are not pickled (NameError after loading)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 55/100
cloudpipe/cloudpickle#609 · 1 条评论 ·
维护者通常 16 天内回复
-
A class pickled by value before its annotations are read loses them.可能已有人在做 @pralav-25 于 10 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 67/100
cloudpipe/cloudpickle#608 ·
维护者通常 16 天内回复
-
难度 4/5 3-5 天 新手友好度 42/100
cloudpipe/cloudpickle#595 ·
维护者通常 16 天内回复
-
cloudpickle is not compatible with PyPy 7.3.22可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 65/100
cloudpipe/cloudpickle#592 · 2 条评论 ·
维护者通常 16 天内回复
查看 cloudpipe/cloudpickle 的全部 Issue
相似的 Issue
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoop未关闭
难度 2/5 1-3 小时 新手友好度 76/100
doronz88/pymobiledevice3#2051 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
collabnix/awesome-mcp-lists#230 ·
维护者通常 9 天内回复
-
Groc schedules with out of range values pass config validation and fail later when the scheduler is built可能已有人在做 @auraseb 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
autowarefoundation/autoware_carla_scenario#342 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
ianktoo/project-monitor#14 ·