Eric Snow <ericsnowcurren...@gmail.com> added the comment:

On Wed, Oct 20, 2021 at 6:11 PM Barry A. Warsaw <rep...@bugs.python.org> wrote:
> This is what leads me to think that having a proxy to keep them in sync and 
> relaxing the read-only restriction is the path forward, even if writing 
> __package__ doesn’t make sense.  It also seems like the easier way to keep 
> backward compatibility, rather than enforcing read-only on __package__ to 
> match __spec__.parent.
>
> So the question is less about whether this is useful than whether it will 
> break things if they write to it.

I don't see any significant problem with making spec.parent writable.
It's read-only now only because it is computed from spec.name and any
other value doesn't make sense (which read-only communicates).  My
preference would be to make __package__ read-only instead. :)
However, I doubt it will make a difference in practice either way, so
I'm fine either way.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to