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 eric.snow
Recipients barry, brett.cannon, eric.snow
Date 2021-10-21.16:52:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CALFfu7DV1GdGDSWY19TSiSVX5UsYFGQEs0VhxSOwVH0JG0KEHw@mail.gmail.com>
In-reply-to <18C8915B-689A-49E5-BE0B-33C389540A87@python.org>
Content
On Wed, Oct 20, 2021 at 6:11 PM Barry A. Warsaw <report@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.
History
Date User Action Args
2021-10-21 16:52:50eric.snowsetrecipients: + eric.snow, barry, brett.cannon
2021-10-21 16:52:50eric.snowlinkissue45540 messages
2021-10-21 16:52:50eric.snowcreate