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

Possible name conflict with moo.otypes #36

Open
2 tasks
brettviren opened this issue Mar 3, 2022 · 0 comments
Open
2 tasks

Possible name conflict with moo.otypes #36

brettviren opened this issue Mar 3, 2022 · 0 comments

Comments

@brettviren
Copy link
Owner

The moo.otypes module will construct types from schema. A type is constructed in the moo.otypes module namespace and then a Python module path is constructed/imported matching the schema path and the type is added there.

Phil reports some name collision when moo.otypes.load_types() is called in user code which also does an from ... import ConflictingName where that name is also used in a loaded-from-schema type. This imported type seems to replace the moo.otypes.ConflictingName despite this name not obviously existing nor referenced.

A work around is to do like from ... import ConflictingName as UniqueName but this should not be required.

Why this happens is not clear as nothing in moo.otypes "should" be populating the user module namespace.

  • reproduce it with a small test
  • fix it!
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

1 participant