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

Allow placeholder functions to compile #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewminer
Copy link

The various "placeholder" functions in mamba/init.py don't
actually match the signatures they will eventually have (e.g., they
don't accept a tag), and don't return values which can be used in a
with statement (i.e., no __enter__ or __exit__ methods). This
causes fatal errors when trying to load a *_spec.py file as a
standalone module.

This change stubs out the placeholder functions enough so that spec
files load properly without actually doing anything.

@andrewminer
Copy link
Author

As a little more color on why I want this... I'm currently working on some code which uses introspection to serialize objects. I've got a bunch of test classes defined in my _spec.py which don't load properly because the "placeholder" functions never get replaced when loading the _spec.py file as a stand-alone module. This change makes it so that I can load the _spec.py file as a module, and therefore load that module as part of my test.

The various "placeholder" functions in mamba/__init__.py don't
actually match the signatures they will eventually have (e.g., they
don't accept a `tag`), and don't return values which can be used in a
`with` statement (i.e., no `__enter__` or `__exit__` methods). This
causes fatal errors when trying to load a `*_spec.py` file as a
standalone module.

This change stubs out the placeholder functions enough so that spec
files load properly without actually doing anything.
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 this pull request may close these issues.

1 participant