Serhiy Storchaka added the comment:

copy.copy() didn't work correctly with threading.local in 3.x. It just silently 
created an empty instance (even not properly initialized, since __init__ is 
bypassed). Now it correctly raises TypeError.

copy.copy() looks working in 2.7 because it copied the instance __dict__. But 
the internal state can be lost. There are no tests.

Definitely this is not 3.6 regression. And it is questionable that it is 3.x 
regression, because it is questionable that copying worked in 2.x.

I would consider making threading.local copyable a new feature. But it is 
questionable that this feature is useful.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28967>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to