[issue33277] Deprecate __loader__, __package__, and __cached__ on modules

Barry A. Warsaw report at bugs.python.org
Wed Oct 20 20:17:50 EDT 2021


Barry A. Warsaw <barry at python.org> added the comment:

On Oct 20, 2021, at 11:31, Brett Cannon <report at bugs.python.org> wrote:
> 
>> +1 on a proxy (with read-only attrs) for everything but __name__, __file__, and __path__ (which can all be different than the spec).
> 
> I'm -1 on a proxy as that doesn't simplify the situation. Having (nearly) duplicate attributes is confusing and I have yet to see it benefit anyone.

If we don’t implement a proxy to enforce equivalence, then we shouldn’t say as such in the documentation.  And we should be much clearer about what the purpose of the spec is versus the module attributes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________


More information about the Python-bugs-list mailing list