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 FFY00, barry, brett.cannon, eric.snow, iritkatriel, ncoghlan, pitrou, pmpp, rhettinger
Date 2021-10-21.00:24:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <9DA8E456-CBD6-4413-BE0C-5F3462CE14A9@python.org>
In-reply-to <1634743700.56.0.0230444450409.issue33277@roundup.psfhosted.org>
Content
On Oct 20, 2021, at 08:28, Eric Snow <report@bugs.python.org> wrote:
> 
> The only catch I see is where the module's code sets one of the attrs.  Would the proxy (or import machinery) pick those up, or maybe for some of them emit a warning or fail?
> 
> We could also skip the proxy and add the properties to ModuleType directly, no?

My initial idea was to proxy from the ModuleType to the ModuleSpec and I started down that path, but hacking in C is much more painful than experimenting in Python, so that’s why I did my WIP branch (i.e. just to play with the feasibility of it).

Thus I had planned to keep the actual attribute values in the ModuleSpec and essentially implement a getattro and setattro in the ModuleType that proxied sets and gets to the ModuleSpec.
History
Date User Action Args
2021-10-21 00:24:06barrysetrecipients: + barry, brett.cannon, rhettinger, ncoghlan, pitrou, pmpp, eric.snow, FFY00, iritkatriel
2021-10-21 00:24:06barrylinkissue33277 messages
2021-10-21 00:24:06barrycreate