Message48426
I own bug #780354. The problem is that socket.makefile() no
longer returns a true file. This breaks code that had assumed
it did. The marshal module is one such instance.
In the above bug's corresponce Martin stated:
Instead, I think the C modules that expect file objects need
to be fixed.
Later on Martin stated that he thought it would be fine to simply
document the limitation for the marshal module. I ignored that
and fixed it in the attached patch. It includes modified docs and
an updated test suite.
It's obviously somewhat slower than the current version when
reading/writing true files. That's to be expected. I wanted to
get it right first. I imagine something can be done to speed
things up in the common case (run PyFile_Check() and make
calls to stdio functions if it is a true file).
Even if this patch is rejected, the modified test_marshal.py
should probably be kept (with suitable deletions), as it refactors
the individual tests into helper functions, thus avoiding a lot
of code duplication and potential future cut-n-paste errors.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:43:12 | admin | link | issue1214879 messages |
2007-08-23 15:43:12 | admin | create | |
|