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.

作者 vstinner
收信人 vstinner
日期 2008-12-28.17:05:08
SpamBayes Score 1.6921113e-05
Marked as misclassified
Message-id <1230483910.01.0.94876871379.issue4762@psf.upfronthosting.co.za>
In-reply-to
内容
In my last patch to fix the issue #4705, I replaced PyFile_FromFd() by 
custom code which set correctly the file name.

PyFile_FromFd() is also used in:
 - _Py_DisplaySourceLine(): name is not used, only 
PyFile_GetLine(file)
 - call_find_module() (imp.find_module()): return the file object with 
the wrong name

Example with imp:

>>> file, filename, extra = imp.find_module("os")
>>> file
<io.TextIOWrapper object at 0xb7b6ea6c>
>>> file.name
4
>>> filename
'/home/SHARE/SVN/py3k/Lib/os.py'
历史
日期 用户 动作 参数
2008-12-28 17:05:10vstinner修改recipients: + vstinner
2008-12-28 17:05:10vstinner修改messageid: <1230483910.01.0.94876871379.issue4762@psf.upfronthosting.co.za>
2008-12-28 17:05:09vstinner链接issue4762 messages
2008-12-28 17:05:08vstinner创建