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.

Author akira
Recipients akira, asvetlov, christian.heimes, giampaolo.rodola, josh.r, josiah.carlson, neologix, pitrou, rosslagerwall
Date 2014-04-23.18:21:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> I really don't like the use_fallback argument ..

I initially also thought so. But I've suggested the parameter to replace `(was_os_sendfile_used, os_sendfile_error)` returned value as a *trade off* between a slight complexity in the interface vs. allowing to detect performance bugs easily e.g., when someone passed a file-like object incompatible with os.sendfile by accident (it is not enough to have a valid fileno. What mmap-like means?).

> .. as a user, I don't care if it's using sendfile/splice/whatever WIndows uses.
> .. what do this bring?

The reason sendfile exists is performance. Otherwise socket.makefile and shutil.copyfileobj could be used instead.

use_fallback parameter provides a way to assert that an ineffective fallback is not used by accident. It may be ignored by most users.

An alternative is a new separate public method that doesn't use the fallback.
Date User Action Args
2014-04-23 18:21:35akirasetrecipients: + akira, pitrou, giampaolo.rodola, christian.heimes, josiah.carlson, asvetlov, neologix, rosslagerwall, josh.r
2014-04-23 18:21:35akirasetmessageid: <>
2014-04-23 18:21:35akiralinkissue17552 messages
2014-04-23 18:21:35akiracreate