Message283169
| Author |
serhiy.storchaka |
| Recipients |
JelleZijlstra, ned.deily, serhiy.storchaka |
| Date |
2016年12月14日.07:11:41 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1481699502.15.0.259826188888.issue28967@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|