pulkin / pyteleport Goto Github PK
View Code? Open in Web Editor NEWSnapshot, transmit, and resume python states
License: BSD 2-Clause "Simplified" License
Snapshot, transmit, and resume python states
License: BSD 2-Clause "Simplified" License
Code to reproduce:
import pyteleport as pt, dill as d
def gf():
yield 1
yield 2
d.dumps(gf())
Stacktrace:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/diwank/.local/lib/python3.10/site-packages/dill/_dill.py", line 263, in dumps
dump(obj, file, protocol, byref, fmode, recurse, **kwds)#, strictio)
File "/home/diwank/.local/lib/python3.10/site-packages/dill/_dill.py", line 235, in dump
Pickler(file, protocol, **_kwds).dump(obj)
File "/home/diwank/.local/lib/python3.10/site-packages/dill/_dill.py", line 394, in dump
StockPickler.dump(self, obj)
File "/home/diwank/.asdf/installs/python/3.10.5/lib/python3.10/pickle.py", line 487, in dump
self.save(obj)
File "/home/diwank/.local/lib/python3.10/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/home/diwank/.asdf/installs/python/3.10.5/lib/python3.10/pickle.py", line 560, in save
f(self, obj) # Call unbound method with explicit self
File "/home/diwank/.local/lib/python3.10/site-packages/pyteleport/dill_tools.py", line 39, in pickle_generator
morph_fun = morph_stack(snapshot(obj.gi_frame, stack_method="direct"), root=False, flags=0x20)
File "/home/diwank/.local/lib/python3.10/site-packages/pyteleport/snapshot.py", line 241, in snapshot
raise ValueError(f"Failed to find a callable in {vstack[stack_size]}")
ValueError: Failed to find a callable in <NULL>
Hey @pulkin !
Have been having a lot of fun playing around with pyteleport, very educational for me so thanks! :)
I am still learning about python internals but I wanted to know how could we implement dill.dumps
for pickling async generator objects? Similar to what you've done for generator objects for instance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.