[issue1267] Py3K cannot run as ``python -S``

Christian Heimes report at bugs.python.org
Sun Oct 21 06:40:47 CEST 2007


Christian Heimes added the comment:

> I think find_module() should return a file descriptor (fd), not a
> FILE*, but most of the rest of the code should call fdopen() on that
> fd. Only call_find_module() should use the fd to turn it into a Python
> file object. Then the amount of change should be pretty minimal.

I'd have to touch most functions in import.c and related files to change
find_module() to use a file descriptor. It's a PITA and I don't think
it's worse the effort for now.

The new patch adds PyFile_FromFd and removes the other PyFile_FromFile*
functions. It also changes some methods to use a file descriptor and
some documentation. Two minor changes aren't related to the bug but they
nagged me.

Added file: http://bugs.python.org/file8585/py3k_filefromfd.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1267>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: py3k_filefromfd.patch
Type: text/x-diff
Size: 10917 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-bugs-list/attachments/20071021/66c7a83e/attachment.patch 


More information about the Python-bugs-list mailing list