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 arigo
Recipients arigo, giampaolo.rodola, gregory.p.smith, gvanrossum, koobs, neologix, pitrou, sbt, vstinner
Date 2013-12-01.02:15:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385864102.97.0.37491950954.issue18885@psf.upfronthosting.co.za>
In-reply-to
Content
Modules/socketmodule.c is using a simple style to implement socket timeouts using select().  If I were to naively copy this style over to pure Python, it would work in current Pythons; I'd get occasionally an OSError(EINTR), which I would have presumably been annoyed with and am now catching properly.  Now if my working code was made to run with a select() modified as proposed, an EINTR would instead cause the program to fail more obscurely: its sockets occasionally -- and apparently without reason -- time out much earlier.  In that situation I would have a hard time finding the reason, particularly if running on an OS where the system select() doesn't spuriously return early with a timeout ("man select" on Linux guarantees this, for example).

Similarly, an existing program might rely on select() with an infinite timeout to only return when one of the descriptors is ready, particularly if called with only one or two descriptors.

Overall, I would far prefer the status quo over a change in the logic from one slightly-subtle situation to another differently slightly-subtle one.  I believe this would end up with programs that need to take special care about both kinds of subtlenesses just to run on two versions of Python.  I may be wrong, in this case sorry to take your time. :-)
History
Date User Action Args
2013-12-01 02:15:03arigosetrecipients: + arigo, gvanrossum, gregory.p.smith, pitrou, vstinner, giampaolo.rodola, neologix, sbt, koobs
2013-12-01 02:15:02arigosetmessageid: <1385864102.97.0.37491950954.issue18885@psf.upfronthosting.co.za>
2013-12-01 02:15:02arigolinkissue18885 messages
2013-12-01 02:15:02arigocreate