Updates:
Summary: If a library implemented as a directory is in execution directory, importing it can result in corrupted library with Python 2.5 and 2.6
        Status: Done
        Labels: -Priority-High Priority-Medium Interpreter-Python

Comment #19 on issue 979 by pekka.klarck: If a library implemented as a directory is in execution directory, importing it can result in corrupted library with Python 2.5 and 2.6
http://code.google.com/p/robotframework/issues/detail?id=979

I have cleaned up importing logic and also investigated this problem a bit more. The current situation and findings are explained below:

1) The problem that deleting module from sys.modules resulted with a corrupted module doesn't occur with Python 2.7 or any version of Jython or IronPython. I suspect that is actually a CPython bug that has now been fixed. That lowers the priority of this issue.

2) The original problem does not occur anymore with any version. If you specify a library like `Library MyLib` it is always imported as a module name and not as path. To import a library implemented as a directory as a path, you must add trailing slash like `Library MyLib/` (this is how it should have always been).

3) It is still possible to get a corrupted library when importing library by path with Python 2.5 or 2.6. That can probably be prevented in some cases, but that's out of the scope of this issue.

I consider this issue done.

Reply via email to