Message283169
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. |
|
Date |
User |
Action |
Args |
2016-12-14 07:11:42 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, ned.deily, JelleZijlstra |
2016-12-14 07:11:42 | serhiy.storchaka | set | messageid: <1481699502.15.0.259826188888.issue28967@psf.upfronthosting.co.za> |
2016-12-14 07:11:42 | serhiy.storchaka | link | issue28967 messages |
2016-12-14 07:11:41 | serhiy.storchaka | create | |
|