No, I haven't found a way around this short of implementing my own version of __deepcopy__. Mitigating the problem depends on your situation, but two solutions I can think of are to extract() the item you're about to copy (so that copying it doesn't copy the entire tree), or convert it to a string with decode() _instead_ of copying it.
No, I haven't found a way around this short of implementing my own version of __deepcopy__. Mitigating the problem depends on your situation, but two solutions I can think of are to extract() the item you're about to copy (so that copying it doesn't copy the entire tree), or convert it to a string with decode() _instead_ of copying it.