[IronPython] IronPython 2 Bug: Module Name Lookup Broken

Dino Viehland dinov at microsoft.com
Wed Nov 19 17:46:41 CET 2008


Yeah, that's pretty bad...  I've filed this as 19658 - http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19658.  Thanks for reporting this.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
Sent: Wednesday, November 19, 2008 5:00 AM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython 2 Bug: Module Name Lookup Broken

Curt Hagenlocher wrote:
> You're using the version in the IronPython_2_0 folder, yes?
Yes.

Michael
>
> On Wed, Nov 19, 2008 at 4:55 AM, Michael Foord
> <fuzzyman at voidspace.org.uk <mailto: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 <mailto:Users at lists.ironpython.com>
>     http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>


--
http://www.ironpythoninaction.com/

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list