Message287521
Serhiy Storchaka: "Check that pickling/unpickling the windows object doesn't cause crash or undefined behaviour. Currently the pickling fails because the name of the class is not true name."
Ah, good idea.
I tested with curses_fix_window_class_name.patch: window objects cannot be pickled. Hopefully! IMHO it doesn't make sense to serialize such "live" object.
haypo@selma$ cat > x.py
import curses
w = curses.initscr()
curses.endwin()
print(type(w))
^D
haypo@selma$ ./python -i x.py
<class '_curses.window'>
>>> import pickle
>>> pickle.dumps(w)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't pickle _curses.window objects |
|
Date |
User |
Action |
Args |
2017-02-10 11:54:48 | vstinner | set | recipients:
+ vstinner, twouters, xdegaye, serhiy.storchaka, yan12125 |
2017-02-10 11:54:48 | vstinner | set | messageid: <1486727688.91.0.646175854497.issue29176@psf.upfronthosting.co.za> |
2017-02-10 11:54:48 | vstinner | link | issue29176 messages |
2017-02-10 11:54:48 | vstinner | create | |
|