Classes in extension modules do not have full paths for name of module (__module__ attribute)
See original GitHub issueNuitka: 0.6.6
Python: 3.6.9 (default, Nov 23 2019, 06:41:34)
Executable: /usr/local/bin/python
OS: Linux
Arch: x86_64
Nuitka was installed with pip install nuitka
I am using the following to generate modules:
python -m nuitka --module --python-flag=-OO --remove-output --full-compat --lto --output-dir={} {}
All seems to work fine, but I have noticed a difference between the original code and the compiled version, when running the following code:
from app import pipelines
import inspect
for member in inspect.getmembers(pipelines, inspect.isclass):
print(member[1].__module__)
The original code returns app.pipelines.Pipeline
, while the compiled one returns Pipeline
.
Is this expected behaviour?
Thank you,
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
python - Is module __file__ attribute absolute or relative?
From what I understand, __file__ returns the absolute path from which the module was loaded. I'm having problem producing this: I have a...
Read more >importlib — The implementation of import — Python 3.11.1 ...
An abstract method that is to return the value of __file__ for the specified module. If no path is available, ImportError is raised....
Read more >Extension Methods - Visual Basic | Microsoft Learn
The Extension attribute can only be applied to a Visual Basic Module , Sub , or Function . If you apply it to...
Read more >JAR File Specification
A non-modular JAR file deployed on the module path is an automatic module. If the JAR file has a main attribute Automatic-Module-Name (see...
Read more >CommonJS modules | Node.js v19.3.0 Documentation
The module.exports property can be assigned a new value (such as a ... Files with an extension that is not .mjs , .cjs...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is now on the develop branch, and awaits release.
Check it out http://nuitka.net/doc/factory.html