[issue18195] error when deep copying module is confusing

2017-02-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue looks as enhancement rather than bug fix. Since it is fixed in 3.6 I'm closing it. -- resolution: -> out of date stage: -> resolved status: open -> closed type: -> enhancement ___ Python tracker

[issue18195] error when deep copying module is confusing

2016-02-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python 3.6: Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/copy.py", line 97, in copy rv = reductor(4) TypeError: can't pickle module objects -- nosy: +serhiy.storchaka __

[issue18195] error when deep copying module is confusing

2013-06-11 Thread R. David Murray
R. David Murray added the comment: Well, we don't generally complicate the code to handle edge cases. That said, it might not be too complicated to add copy protocol methods to the module object which just raise a more useful error. -- nosy: +r.david.murray __

[issue18195] error when deep copying module is confusing

2013-06-11 Thread mrjbq7
New submission from mrjbq7: If you have a simple module (say "foo.py"): $ cat foo.py bar = 1 You get weird errors when trying to deep copy them (which I did by accident, not intentionally trying to deep copy modules): Python 2.7.2: >>> import foo >>> import copy >>> copy.deepcopy(foo) Traceb