module level dunder names not appearing in __init__.py
See original GitHub issueBug Report
Python 3.10.2 | packaged by conda-forge | (main, Mar 8 2022, 16:02:23) [Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import opentimelineio as otio
>>> otio.__version__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'opentimelineio' has no attribute '__version__'
This is a regression from 0.14, see here: https://github.com/PixarAnimationStudios/OpenTimelineIO/issues/1224
Expected Behavior
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
python - What is __init__.py for? - Stack Overflow
It used to be a required part of a package (old, pre-3.3 "regular package", not newer 3.3+ "namespace package"). Here's the documentation. Python...
Read more >6. Modules — Python 3.11.1 documentation
These module names are listed in sys.builtin_module_names . If not found, it then searches for a file named spam.py in a list of...
Read more >What's __init__ for me? Designing for Python package imports
This will define what gets brought into the namespace with the import statement.
Read more >Package Initialization - Real Python
In this lesson, you'll learn about package initialization. If a file named __init__.py is present in a package directory, it is invoked when...
Read more >What is __init__.py? and what should I put in it?
Since this approach does not allow non-import code in the __init__.py , it seems to suffer from the namespace issue described in #1...
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 Free
Top 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
Pull request created, but without tests. Testing that would either require to have PySide installed or we would have to parse the files which I feel is dirty…
As part of a fix, let’s add a test if possible, that the module level dunder names exist.