Message249450
On further thought, here's a slightly improved version of the patch I posted above.
The difference is that the first version allowed through attempted __class__ assignments where either the old or new class was a subclass of ModuleType; the new version only allows through attempted assignments if both the old AND new class are a subclass of ModuleType.
In practice this doesn't make any difference, because the compatibility-checking code will reject any attempt to switch from a ModuleType subclass to a non ModuleType subclass or vice-versa. So both patches are correct. But the new patch is more obviously correct. |
|
Date |
User |
Action |
Args |
2015-09-01 03:18:15 | njs | set | recipients:
+ njs, lemburg, pitrou, larry, benjamin.peterson, Mark.Shannon, serhiy.storchaka |
2015-09-01 03:18:15 | njs | set | messageid: <1441077495.62.0.287839188367.issue24912@psf.upfronthosting.co.za> |
2015-09-01 03:18:15 | njs | link | issue24912 messages |
2015-09-01 03:18:15 | njs | create | |
|