[IronPython] Setting builtin_module_names

Dino Viehland dinov at exchange.microsoft.com
Wed Oct 17 20:29:45 CEST 2007


You're right - I think the logic might have been to reflect "new" built-in modules which are added externally, but it doesn't look like CPython does this (for example _socket isn't in the list).  I'll check-in a fix for this for the next release.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Sunday, October 14, 2007 9:32 PM
To: Discussion of IronPython
Subject: [IronPython] Setting builtin_module_names

Currently, sys.builtin_module_names is set in
IronPython.Runtime.SystemState.LoadBuiltins. But this method is called
multiple times with assemblies, by default IronPython.dll and
IronPython.Modules.dll.

Doesn't this belog to InitializeBuiltins method, after Builtins
dictionary is complete?

Especially, renaming nt to posix happens after builtin_module_names is
set, so this change isn't reflected there. And since os.py in the
standard library uses builtin_module_names to detect platform, os.py
is broken on Unix.

Here's my suggested fix:
https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/patches/latest/patch-initialize-builtins

--
Seo Sanghyeon
_______________________________________________
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