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
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!
The text was updated successfully, but these errors were encountered:
The
moo.otypes
module will construct types from schema. A type is constructed in themoo.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 anfrom ... import ConflictingName
where that name is also used in a loaded-from-schema type. This imported type seems to replace themoo.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.The text was updated successfully, but these errors were encountered: