You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
The imported nupic module in python used to have a __version__ attribute. This was assumed to be a part of the public API, so nupic.studio depends on it. At some point in the last few months, this attribute has gone missing.
> python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nupic
>>> nupic
<module 'nupic' from '/Users/mtaylor/Library/Python/2.7/lib/python/site-packages/nupic.bindings-0.1.5-py2.7-macosx-10.9-intel.egg/nupic/__init__.pyc'>
>>> nupic.__version__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '__version__'
Because of module 'nupic' from '/Users/mtaylor/Library/Python/2.7/lib/python/site-packages/nupic.bindings-0.1.5-py2.7-macosx-10.9-intel.egg/nupic/__init__.pyc', I believe this change might have occurred during the C++ move from nupic into nupic.core. That means the change we're looking for is in one of these pull requests:
Unless someone thinks otherwise, I feel like this should be treated as an inadvertent API breakage and labeled priority:1. Especially because it was reported on the mailing list.
It should be pretty easy to add back, hopefully?
The text was updated successfully, but these errors were encountered:
@rhyolight - This was an intentional change. The issue is that nupic is a namespace package so we can't put anything in nupic/__init__.py. @oxtopus - Do you know any way around this?
There is no official API for tracking versions, and if nupic.__version__ is/was part of any official public API, it's not documented anywhere. A better, and arguably more correct, way to track versions is using the native setuptools utilities, defining the version in the call to setup() (see https://github.com/numenta/nupic/blob/master/setup.py#L73). This is the mechanism used by pip and friends. For example, this allows you to do the following:
I disagree that this is a P1, and that it's a bug. init.py files in namespace packages can't have anything beyond the declare_namespace() call or else you get unexpected results when you have multiple packages that share the namespace.
As noted in the SO link above, the __version__ attr is only a convention, and explicitly NOT an official API. https://www.python.org/dev/peps/pep-0396/ is in a deferred state, rather than accepted.
The imported
nupic
module in python used to have a__version__
attribute. This was assumed to be a part of the public API, sonupic.studio
depends on it. At some point in the last few months, this attribute has gone missing.Because of
module 'nupic' from '/Users/mtaylor/Library/Python/2.7/lib/python/site-packages/nupic.bindings-0.1.5-py2.7-macosx-10.9-intel.egg/nupic/__init__.pyc'
, I believe this change might have occurred during the C++ move from nupic into nupic.core. That means the change we're looking for is in one of these pull requests:Unless someone thinks otherwise, I feel like this should be treated as an inadvertent API breakage and labeled
priority:1
. Especially because it was reported on the mailing list.It should be pretty easy to add back, hopefully?
The text was updated successfully, but these errors were encountered: