Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store code object inside of node #15

Closed
xoviat opened this issue May 7, 2021 · 2 comments · May be fixed by #17
Closed

store code object inside of node #15

xoviat opened this issue May 7, 2021 · 2 comments · May be fixed by #17

Comments

@xoviat
Copy link

xoviat commented May 7, 2021

In PyInstaller, we may parse the code object of a module, for later manipulation and extraction. To avoid duplicating work, we typically store the code object inside of the BaseNode object. Is this acceptable?

@ronaldoussoren
Copy link
Owner

The current API is to use extension_attributes dict for that, that dict won't be used by the package itself.

When I (finally) get around to use modulegraph2 in py2app the API might change, I'm keeping the API fairly minimal with additions where needed to keep the library easy to use and where users need to poke into private details (unlike the older modulegraph library that has a bigger and unclear API surface which makes development too hard).

I'm open for adding an API to access the code object for a node, for those nodes that can have one. The library already loads and processes those code objects, storing them in the graph would be easy enough.

@ronaldoussoren
Copy link
Owner

Version 2.2 introduced a code attribute on nodes that can have associated code. I'm not adding a code attribute to BaseNode because that makes it unclear as to which node types can have associated code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants