This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author knepley
Recipients
Date 2005-02-19.09:20:13
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
1) A C extension module (foo.so) is imported

      import foo

2) The library foo.so is rebuilt with changes

3) We reload the module

      foo = reload(foo)

The reload() method calls imp.load_dynamic() which
eventually gets down to _PyImport_GetDynLoadFunc().
This just calls dlopen(), which returns the old filehandle.

This problem can be fixed by augmenting imp with
unload_dynamic(), which could easily be implemented in
a _PyImport_GetDynUnloadFunc(), which would just
consult its handles[] array, and call dlclose() on the
appropriate handle. This will work if Python was the
only program to dlopen() foo.so.
History
Date User Action Args
2008-01-20 09:57:31adminlinkissue1144263 messages
2008-01-20 09:57:31admincreate