STINNER Victor <vstin...@redhat.com> added the comment:

> The definitive solution to this problem would theoretically be to have all 
> these interconnected functions pass fds instead of "paths" but of course that 
> is hardly possible.

I agree that it's the way to go.

Python makes little difference between a path and file descriptor. For example, 
os.stat() accepts both a filename (string) or a file descriptor (integer).

Even if we cannot fix everything, it makes sense to me to try to fix at least 
shutil.copyfile(). Even we cannot modify existing other public copy*() 
functions to handle file descriptors, maybe we can add private helper functions 
accepting file descriptors, and modify existing public functions to reuse them?

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30400>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to