This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients brandtbucher, domdfcoding, gvanrossum, ncoghlan, rhettinger, serhiy.storchaka
Date 2021-08-05.18:10:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628187007.94.0.922145146512.issue43838@roundup.psfhosted.org>
In-reply-to
Content
[Serhiy]
> In particularly it allows to modify __dict__ of builtin types.

This doesn't look like something that would happen accidentally.  We've never had any bug reports about this occurring in the wild.


[GvR]
> Maybe we should not fix this then?

That seems reasonable.  In general, it is hard to completely wall-off instances against deliberate efforts to pry them open:

    >>> from types import MappingProxyType
    >>> import gc
    >>> orig = {1: 2}
    >>> proxy = MappingProxyType(orig)
    >>> refs = gc.get_referents(proxy)
    >>> refs
    [{1: 2}]
    >>> refs[0][1] = 3
    >>> orig
    {1: 3}
History
Date User Action Args
2021-08-05 18:10:08rhettingersetrecipients: + rhettinger, gvanrossum, ncoghlan, serhiy.storchaka, brandtbucher, domdfcoding
2021-08-05 18:10:07rhettingersetmessageid: <1628187007.94.0.922145146512.issue43838@roundup.psfhosted.org>
2021-08-05 18:10:07rhettingerlinkissue43838 messages
2021-08-05 18:10:07rhettingercreate