
Hi all, I reorganized Python's dynamic load/import code over the past few days. Gudio provided some feedback, I did some more mods, and now it is checked into CVS. The new loading behavior has been tested on Linux, IRIX, and Solaris (and probably Windows by now). For people with CVS access, I'd like to ask that you grab an updated copy and shake out the new code. There have been updates to the "configure" process, so you'll need to run configure again. Make sure that you alter your Modules/Setup to build some shared modules, and then try it out. Here are some of the platforms that I believe need specific testing: - NetBSD, FreeBSD, OpenBSD, ... - AIX - HP/UX - BeOS - NeXT - Mac - OS/2 - Win16 I believe it should work for most people, but we may be looking for the wrong "init<module>" symbol on some platforms. We might even be selecting the wrong import mechanism (or missing it altogether!) on some platforms. If you get a chance to test this, then please drop me a note with your platform and whether it succeeded or failed (and how it failed). Thanx! -g p.s. you can tell if dynamic loading is missing by watching for DYNLOADFILE in the configure process and seeing if it used dynload_stub. alternatively, you can import the "imp" module and see if "load_dynamic" is missing. -- Greg Stein, http://www.lyra.org/

On Thu, 23 Dec 1999, Harri Pasanen wrote:
Harri - With the new code structure, it is much easier to maintain Python's loading code. Each platform has its own file (e.g. dynload_aix.c) rather than being all jammed together into importdl.c. This isn't a huge win by itself, but does increase readability/maintainability. The big improvement, however, is when you are adding support for new platforms or loading mechanisms. A new dynload_*.c can be written and one line added to configure.in, and you're done. No need to make importdl.c even uglier. (actually, importdl.c no longer contains *any* platform specific code; it has all been moved to the dynload_*.c files) Cheers, -g -- Greg Stein, http://www.lyra.org/

On 23 Dec 99, at 10:26, Greg Stein wrote:
FYI, I downloaded the import stuff from CVS and used it in my port of Python to NetWare. Good timing, as I was just tackling dynamic loading on NetWare when I saw your message. The new scheme is much better, and works for me. Though I do need to add some special "un-import" code similar to what BEOS does. Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements

Greg Stein wrote:
Great work Greg!
AFAICT, the AIX version works perfectly okay. -- Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252

On Thu, 23 Dec 1999, Harri Pasanen wrote:
Harri - With the new code structure, it is much easier to maintain Python's loading code. Each platform has its own file (e.g. dynload_aix.c) rather than being all jammed together into importdl.c. This isn't a huge win by itself, but does increase readability/maintainability. The big improvement, however, is when you are adding support for new platforms or loading mechanisms. A new dynload_*.c can be written and one line added to configure.in, and you're done. No need to make importdl.c even uglier. (actually, importdl.c no longer contains *any* platform specific code; it has all been moved to the dynload_*.c files) Cheers, -g -- Greg Stein, http://www.lyra.org/

On 23 Dec 99, at 10:26, Greg Stein wrote:
FYI, I downloaded the import stuff from CVS and used it in my port of Python to NetWare. Good timing, as I was just tackling dynamic loading on NetWare when I saw your message. The new scheme is much better, and works for me. Though I do need to add some special "un-import" code similar to what BEOS does. Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements

Greg Stein wrote:
Great work Greg!
AFAICT, the AIX version works perfectly okay. -- Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252
participants (4)
-
Brad Clements
-
Greg Stein
-
Harri Pasanen
-
Vladimir Marangozov