[IronPython] IronPython 2 Bug: Module Name Lookup Broken
Curt Hagenlocher
curt at hagenlocher.org
Wed Nov 19 13:58:36 CET 2008
You're using the version in the IronPython_2_0 folder, yes?
On Wed, Nov 19, 2008 at 4:55 AM, Michael Foord <fuzzyman at voidspace.org.uk>wrote:
> Hello guys,
>
> It looks like in source code drop 43712 module name lookup is broken if the
> name is also a .NET member name (presumably of Script or ScriptScope) and
> clr has not been imported.
>
> To reproduce have a pure python module called 'check.py' containing:
>
> def check(module):
> print module.Keys
>
> If you also have a 'stuff.py' module containing:
>
> Keys = 3
>
> You get the following exception:
>
> >>> import stuff
> >>> from check import check
> >>> check(stuff)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "C:\Dev\buildshare\Ipy2-43712-binaries\check.py", line 2, in check
> AttributeError: 'module' object has no attribute 'Keys'
>
> (Interestingly 'Keys' does appear in the dir of the module.)
>
> This is causing us problems in the use of unittest that does module
> introspection. It isn't blocking us as adding 'import clr' causes the
> problem to go away, but could well cause us other problems (we are still
> working our way through our last remaining 50 unit test failures in our
> IronPython 2 port.)
>
> I have raised this as issue number 19656 on Codeplex:
>
> http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19656
>
> All the best,
>
> Michael Foord & Glenn Jones
> Resolver Systems
>
> --
> http://www.ironpythoninaction.com/
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20081119/64a1bb8b/attachment.html>
More information about the Ironpython-users
mailing list