Skip to content

Commit

Permalink
Remove url-queue support
Browse files Browse the repository at this point in the history
  • Loading branch information
federicotdn committed Apr 1, 2024
1 parent 5ce0975 commit ac6c0ca
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 29 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Verb Changelog
## **main** (MELPA)
- Added support for `Verb-Proxy` heading property.
- Removed support for the `url-queue` backend.

## **2.16.0** - 2024-03-02 (MELPA Stable)
- Fixed LF being used instead of CRLF in multipart boundaries.
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Verb requires at least Emacs version 26 to work.
- Integrates with Babel and EWW.
- Includes mouse support (menu bar and mode line).
- Supports file uploads.
- Optionally uses `url-queue` backend.
- Has no dependencies!
- Easy to use! (hopefully).

Expand Down
1 change: 0 additions & 1 deletion extra/verb-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ All hooks, variables, functions and classes starting with `verb-` but not starti
- User Option: **verb-tag**
- User Option: **verb-show-timeout-warning**
- User Option: **verb-code-tag-delimiters**
- User Option: **verb-url-retrieve-function**
- User Option: **verb-json-max-pretty-print-size**
- User Option: **verb-json-use-mode**
- User Option: **verb-babel-timeout**
Expand Down
8 changes: 0 additions & 8 deletions ob-verb.el
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,6 @@ variable.
Called when :op `send' is passed to `org-babel-execute:verb'. An
optional argument may follow `send'."
(when (eq verb-url-retrieve-function #'url-queue-retrieve)
;; TODO: url-queue isn't working here because of the use of
;; `sleep-for'. Maybe we could use `ert-run-idle-timers' but that
;; sounds like a bad idea.
(user-error "%s"
(concat "Using `url-queue-retrieve' with"
" Babel is currently not supported\n"
"Please try again using `url-retrieve'")))
(when (and part (not (member part '("get-body" "get-headers"))))
(user-error "Invalid send argument: %s" part))
(let* ((start (time-to-seconds))
Expand Down
9 changes: 1 addition & 8 deletions test/verb-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -1871,9 +1871,7 @@
(let ((inhibit-message t))
(with-current-buffer (verb-send-request-on-point nil)
(while (eq verb-http-response t)
(sleep-for req-sleep-time)
(when (eq verb-url-retrieve-function #'url-queue-retrieve)
(ert-run-idle-timers)))
(sleep-for req-sleep-time))
,@body))))

(defun clear-log ()
Expand Down Expand Up @@ -2051,11 +2049,6 @@
(should-not (verb--object-of-class-p nil 'verb-response))
(should-not (verb--object-of-class-p 42 'verb-response)))

(ert-deftest test-server-basic-queue ()
(let ((verb-url-retrieve-function #'url-queue-retrieve))
(server-test "basic"
(should (string= (buffer-string) "Hello, World!")))))

(ert-deftest test-server-basic ()
(server-test "basic"
(should (string= (buffer-string) "Hello, World!"))
Expand Down
23 changes: 12 additions & 11 deletions verb.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
(require 'eieio)
(require 'subr-x)
(require 'url)
(require 'url-queue)
(require 'mm-util)
(require 'json)
(require 'js)
Expand Down Expand Up @@ -196,6 +195,9 @@ info node `(url)Retrieving URLs'."
(function-item
:tag "url-queue-retrieve from url-queue.el"
url-queue-retrieve)))
(make-obsolete-variable 'verb-url-retrieve-function
"this feature is no longer supported."
"2024-04-02")

(defcustom verb-json-max-pretty-print-size (* 1 1024 1024)
"Max JSON file size (bytes) to automatically prettify when received.
Expand Down Expand Up @@ -2098,16 +2100,15 @@ loaded into."

;; Send the request!
(condition-case err
(funcall verb-url-retrieve-function
url
#'verb--request-spec-callback
(list rs
response-buf
start-time
timeout-timer
where
num)
t verb-inhibit-cookies)
(url-retrieve url
#'verb--request-spec-callback
(list rs
response-buf
start-time
timeout-timer
where
num)
t verb-inhibit-cookies)
(error (progn
;; Cancel timer
(when timeout-timer
Expand Down

0 comments on commit ac6c0ca

Please sign in to comment.