Message404556
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. |
|
Date |
User |
Action |
Args |
2021-10-21 00:24:06 | barry | set | recipients:
+ barry, brett.cannon, rhettinger, ncoghlan, pitrou, pmpp, eric.snow, FFY00, iritkatriel |
2021-10-21 00:24:06 | barry | link | issue33277 messages |
2021-10-21 00:24:06 | barry | create | |
|