[Twisted-Python] some bugs(?)
Hi, I encountered what seem to be some bugs: 1. In twisted/scripts/trial.py, line 276: the module's contents are not executed if the lines are terminated with "\r\n". I suggest using "r" instead of "rb" when reading the file. Additionally, I would compile() the source before executing it in order to associate it with its filename. This will make debugging (at least with winpdb) much easier (currently the filename is "<string>", which prevents winpdb from finding the source). 2. In twisted/plugin.py, line 135: paths are skipped if they don't exist, but there is also the possibility that they're misspelled. This gives rise to WindowsError 123, which I think should also be ignored, or at least an informative message should be provided. It took me a very long time to find out my PYTHONPATH was missing a ";". Cheers, Antony Kummel __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On 05/09/05, Antony Kummel <antonykummel@yahoo.com> wrote:
Hi,
I encountered what seem to be some bugs:
1. In twisted/scripts/trial.py, line 276: the module's contents are not executed if the lines are terminated with "\r\n". I suggest using "r" instead of "rb" when reading the file. Additionally, I would compile() the source before executing it in order to associate it with its filename. This will make debugging (at least with winpdb) much easier (currently the filename is "<string>", which prevents winpdb from finding the source).
Hi Antony, Thanks for filing these bugs. Particularly since they are win32 bugs (most of us use some form of UNIX, and thus love it when someone _else_ tests on Windows.) I've committed a fix for the first bug, as well as a couple of unit tests to avoid it happening again. I'd appreciate it if you could confirm that this indeed fixes your problem. For future reference, the best place to file bugs is with the Twisted issue tracker[1], rather than on the mailing list. cheers, jml [1] http://www.twistedmatrix.com/bugs/.
--- Jonathan Lange <jonathan.lange@gmail.com> wrote:
Hi,
I encountered what seem to be some bugs:
1. In twisted/scripts/trial.py, line 276: the module's contents are not executed if the lines are terminated with "\r\n". I suggest using "r" instead of "rb" when reading the file. Additionally, I would compile()
On 05/09/05, Antony Kummel <antonykummel@yahoo.com> wrote: the
source before executing it in order to associate it with its filename. This will make debugging (at least with winpdb) much easier (currently the filename is "<string>", which prevents winpdb from finding the source).
Hi Antony,
I've committed a fix for the first bug, as well as a couple of unit tests to avoid it happening again. I'd appreciate it if you could confirm that this indeed fixes your problem.
It does, thanks. Antony Kummel ______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/
participants (2)
-
Antony Kummel
-
Jonathan Lange