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 barry
Recipients barry
Date 2021-10-20.17:11:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634749883.54.0.793446044283.issue45540@roundup.psfhosted.org>
In-reply-to
Content
TL;DR module.__spec__.parent is read-only but module.__package__ is r/w despite documentation that implies that these two attributes should be identical, and various issues that focus on migrating from direct module attributes to ModuleSpec attributes.

bpo-33277 and bpo-21762

Maybe we should relax the restriction on module.__spec__.parent so that it's writeable just like module.__package__.

See also: 

https://docs.python.org/3/reference/import.html?highlight=__loader__#package__

https://docs.python.org/3/library/types.html?highlight=__loader__#types.ModuleType.__package__
History
Date User Action Args
2021-10-20 17:11:23barrysetrecipients: + barry
2021-10-20 17:11:23barrysetmessageid: <1634749883.54.0.793446044283.issue45540@roundup.psfhosted.org>
2021-10-20 17:11:23barrylinkissue45540 messages
2021-10-20 17:11:23barrycreate