Re: requests.{get,post} timeout

2017-08-23 Thread dieter
Skip Montanaro writes: > ... > Given the semantics of timeouts which percolate up from the socket > level, I agree with Chris. It has a particular meaning, that > implemented by the underlying socket layer. Unfortunately, the word > "timeout" can take on related (but different) meanings, depending

Re: requests.{get,post} timeout

2017-08-23 Thread Jon Ribbens
On 2017-08-22, Chris Angelico wrote: > On Wed, Aug 23, 2017 at 5:06 AM, Jon Ribbens > wrote: >> I have no idea what you mean here. The only sane way to implement the >> request timeout is to provide both types of timeout. > > You could provide both, but since one of them can be handled > externa

Re: SCons 3.0.0.alpha.20170821 is available for your testing

2017-08-23 Thread Steve D'Aprano
On Tue, 22 Aug 2017 09:51 am, Bill Deegan wrote: > All, > > You can install via: (PLEASE ONLY DO IN A VIRTUALENV AS THIS IS PRERELEASE) > > pip install --index-url https://test.pypi.org/simple/ > scons==3.0.0.alpha.20170821 What is scons and why should we be interested in it? Thanks, --

Re: Proposed new syntax

2017-08-23 Thread Steve D'Aprano
On Tue, 22 Aug 2017 11:42 pm, Ian Kelly wrote: > The last line is the reason why the rich comparison methods should > have been designed to raise NotImplementedException rather than return > NotImplemented, but it's too late to change that. Only if you want operators to be slow as molasses. *win

Re: requests.{get,post} timeout

2017-08-23 Thread Chris Angelico
On Wed, Aug 23, 2017 at 9:10 PM, Jon Ribbens wrote: > On 2017-08-22, Chris Angelico wrote: >> On Wed, Aug 23, 2017 at 5:06 AM, Jon Ribbens >> wrote: >>> I have no idea what you mean here. The only sane way to implement the >>> request timeout is to provide both types of timeout. >> >> You could

Re: requests.{get,post} timeout

2017-08-23 Thread Jon Ribbens
On 2017-08-23, Chris Angelico wrote: > On Wed, Aug 23, 2017 at 9:10 PM, Jon Ribbens > wrote: >> I am interested to learn what you mean by "with a thread". How would >> one execute a requests, er, request in a thread with a proper timeout? > > Assuming that by "proper timeout" you mean "limit the

Re: requests.{get,post} timeout

2017-08-23 Thread Chris Angelico
On Wed, Aug 23, 2017 at 10:52 PM, Jon Ribbens wrote: > On 2017-08-23, Chris Angelico wrote: >> On Wed, Aug 23, 2017 at 9:10 PM, Jon Ribbens >> wrote: >>> I am interested to learn what you mean by "with a thread". How would >>> one execute a requests, er, request in a thread with a proper timeou

Re: requests.{get,post} timeout

2017-08-23 Thread Marko Rauhamaa
Jon Ribbens : > Yes, what I was interested to learn was how the monitoring thread can > "cut off" the requesting thread. In general, that cannot be done. Often, you resort to a dirty trick whereby the monitoring thread closes the I/O object requesting thread is waiting on, triggering an immediate

Re: requests.{get,post} timeout

2017-08-23 Thread Jon Ribbens
On 2017-08-23, Chris Angelico wrote: > On Wed, Aug 23, 2017 at 10:52 PM, Jon Ribbens > wrote: >> Yes, what I was interested to learn was how the monitoring thread can >> "cut off" the requesting thread. > > Ah, I see. That partly depends on your definition of "cut off", and > how it needs to int

Re: Proposed new syntax

2017-08-23 Thread Stephan Houben
Op 2017-08-23, Ben Finney schreef : > Could you be convinced to instead do:: > > import functools > import itertools > > generate_id = functools.partial(next, itertools.count()) I certainly could be, but I was so far unaware of the desirability to do so. Stephan -- https://mail.pytho

Re: requests.{get,post} timeout

2017-08-23 Thread Chris Angelico
On Thu, Aug 24, 2017 at 12:52 AM, Jon Ribbens wrote: > OK cool, so circling back to where you were - which is the same place > that the 'requests' developers are - which is the claim that requests > does not need to provide an "overall timeout" feature because you > can cancel the request yourself

Re: SCons 3.0.0.alpha.20170821 is available for your testing

2017-08-23 Thread Bill Deegan
What is SCons? SCons is an Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SC

Re: requests.{get,post} timeout

2017-08-23 Thread Marko Rauhamaa
Chris Angelico : > But also, this honestly isn't as big an issue as you might think. If > the user thinks a program has been running for too long, s/he can hit > Ctrl-C. Voila! Signal is sent, which aborts a socket read, Well, no, it doesn't. First run: ==

Re: SCons 3.0.0.alpha.20170821 is available for your testing

2017-08-23 Thread Marko Rauhamaa
Bill Deegan : > What is SCons? > > SCons is an Open Source software construction tool—that is, a > next-generation build tool. Think of SCons as an improved, > cross-platform substitute for the classic Make utility with integrated > functionality similar to autoconf/automake and compiler caches su

Re: requests.{get,post} timeout

2017-08-23 Thread Chris Angelico
On Thu, Aug 24, 2017 at 2:59 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> But also, this honestly isn't as big an issue as you might think. If >> the user thinks a program has been running for too long, s/he can hit >> Ctrl-C. Voila! Signal is sent, which aborts a socket read, > > Well, no, i

Re: requests.{get,post} timeout

2017-08-23 Thread Marko Rauhamaa
Chris Angelico : > What I said was that you don't need threading or alarms because most > of the time you can let the user use SIGINT. And without the (utterly > totally useless) threading that you have here, it works flawlessly: > Ctrl-C instantly breaks the recv call. Oh, if you give up threadi

Re: requests.{get,post} timeout

2017-08-23 Thread Jon Ribbens
On 2017-08-23, Chris Angelico wrote: > Yes and no. If requests provided a 'cancel query' feature, it would > play nicely with everything else, but (a) the entire concept here is > that the request has stalled, so you COULD just ignore the pending > query and pretend it's failed without actually ca

Re: requests.{get,post} timeout

2017-08-23 Thread Chris Angelico
On Thu, Aug 24, 2017 at 8:54 AM, Jon Ribbens wrote: > On 2017-08-23, Chris Angelico wrote: >> Yes and no. If requests provided a 'cancel query' feature, it would >> play nicely with everything else, but (a) the entire concept here is >> that the request has stalled, so you COULD just ignore the p

Re: SCons 3.0.0.alpha.20170821 is available for your testing

2017-08-23 Thread Ben Finney
Bill Deegan writes: > What is SCons? Thank you for the explanation. That's information that is normally in every release announcement: what is it, and why is it relevant to the forum. You might like to add it to the template for future release announcements. -- \ “I distrust those peop

Re: Proposed new syntax

2017-08-23 Thread Steve D'Aprano
On Tue, 22 Aug 2017 07:41 pm, Marko Rauhamaa wrote: > BTW, the main take of the metamathematical "fiasco" was that you can't > get rid of the meta-level. There's no consistent logical system that is > closed and encompasses everything including itself. You will always have > to step outside your f