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

Moto doesn't have a __version__ dict #353

Closed
rallytime opened this issue May 26, 2015 · 2 comments
Closed

Moto doesn't have a __version__ dict #353

rallytime opened this issue May 26, 2015 · 2 comments

Comments

@rallytime
Copy link

>>> import moto
>>> moto.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '__version__'

I ran across this bug when trying to implement some unit tests using boto and moto, and I need to check for a specific version of each before running some of my tests. I need some of the functionality in moto >= 0.3.7. It would be nice to be able to use moto.__version__ to use with LooseVersion or something like that, like you can with other packages, like boto, for example:

def _has_required_boto():
    '''
    Returns True/False boolean depending on if Boto is installed and correct version.
    '''
    if not HAS_BOTO:
        return False
    elif LooseVersion(boto.__version__) < LooseVersion(required_boto_version):
        return False
    else:
        return True
@spulec
Copy link
Collaborator

spulec commented May 30, 2015

Thanks for opening! I have added this and it should be available for the next version.

@rallytime
Copy link
Author

Wonderful! Thanks so much for the quick fix. :)

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

No branches or pull requests

2 participants