branch: externals/plz
commit e802cf270b58fab29b83dc78692af4865b789257
Author: Adam Porter <a...@alphapapa.net>
Commit: Adam Porter <a...@alphapapa.net>

    Remove: (plz-timeout) Option
    
    Specifying a default value for PLZ's :TIMEOUT argument was a mistake.
---
 README.org |  4 ++++
 plz.el     | 13 ++-----------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/README.org b/README.org
index 84a7111795..47c16ab5db 100644
--- a/README.org
+++ b/README.org
@@ -194,6 +194,10 @@ You may also clear a queue with ~plz-clear~, which cancels 
any active or queued
 
 + The minimum supported Emacs version is now 27.1.  (It is no longer practical 
to test ~plz~ with Emacs versions older than 27.1.  For Emacs 26.3, an earlier 
version of ~plz~ may be used, or this version might be compatible, with or 
without minor changes, which the maintainer cannot offer support for.)
 
+*Changes*
+
++ Option ~plz-timeout~ is removed.  (It was the default value for ~plz~'s 
~:timeout~ argument, which is passed to Curl as its ~--max-time~ argument, 
limiting the total duration of a request operation.  This argument should be 
unset by default, because larger or slower downloads might not finish within a 
certain duration, and it is surprising to the user to have this option set by 
default, potentially causing requests to timeout unnecessarily.)
+
 *Fixes*
 
 + Improve workaround for Emacs's process sentinel-related issues.  (Don't try 
to process response a second time if Emacs calls the sentinel after ~plz~ has 
returned for a synchronous request.  See 
[[https://github.com/alphapapa/plz.el/issues/53][#53]].  Thanks to 
[[https://github.com/josephmturner][Joseph Turner]] for extensive help 
debugging, and to [[https://ushin.org/][USHIN]] for sponsoring some of this 
work.)
diff --git a/plz.el b/plz.el
index be61e1bcc8..f5d8d5b16a 100644
--- a/plz.el
+++ b/plz.el
@@ -244,15 +244,6 @@ This limits how long the connection phase may last (the
 \"--connect-timeout\" argument to curl)."
   :type 'number)
 
-(defcustom plz-timeout 60
-  ;; TODO(v0.9): Remove the `plz-timeout' option.  Requests shouldn't
-  ;; have a "max-time" timeout by default, anyway.
-  "Default request timeout in seconds.
-This limits how long an entire request may take, including the
-connection phase and waiting to receive the response (the
-\"--max-time\" argument to curl)."
-  :type 'number)
-
 ;;;; Macros
 
 (require 'warnings)
@@ -331,10 +322,10 @@ Compatibility function for Emacs versions <28.1."
 
 ;;;;; Public
 
-(cl-defun plz (method url &rest rest &key headers body else filter finally 
noquery
+(cl-defun plz (method url &rest rest &key headers body else filter finally 
noquery timeout
                       (as 'string) (then 'sync)
                       (body-type 'text) (decode t decode-s)
-                      (connect-timeout plz-connect-timeout) (timeout 
plz-timeout))
+                      (connect-timeout plz-connect-timeout))
   "Request METHOD from URL with curl.
 Return the curl process object or, for a synchronous request, the
 selected result.

Reply via email to