Bump urllib3 from 1.25.8 to 1.26.5 #89

Open
dependabot[bot] wants to merge 0 commits from dependabot/pip/urllib3-1.26.5 into master
8 changed files with 33 additions and 39 deletions

View File

@ -18,12 +18,12 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest] os: [ubuntu-latest]
emacs_version: [27.2, 28.2, 29.3] emacs_version: [25.3, 26.3, 27.2, 28.2]
python_version: [3.8] python_version: [3.7]
include: include:
- os: macos-12 - os: macos-latest
emacs_version: 29.3 emacs_version: 28.1
python_version: 3.8 python_version: 3.7
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

2
.gitignore vendored
View File

@ -1,5 +1,3 @@
build
venv-nnreddit-test
.ecukes* .ecukes*
.cask .cask
.newsrc* .newsrc*

View File

@ -1,22 +1,16 @@
SHELL := /bin/bash SHELL := /bin/bash
EMACS ?= $(shell which emacs) EMACS ?= $(shell which emacs)
export PYTHON ?= python export PYTHON ?= python
ifeq ($(shell command -v $(PYTHON) 2>/dev/null),)
$(error $(PYTHON) not found)
endif
ifeq ($(shell expr $$($(PYTHON) --version 2>&1 | cut -d' ' -f2) \< 3),1) ifeq ($(shell expr $$($(PYTHON) --version 2>&1 | cut -d' ' -f2) \< 3),1)
$(error Set PYTHON to python3) $(error Set PYTHON to python3)
endif endif
ifeq ($(shell expr $$($(PYTHON) --version 2>&1 | cut -d'.' -f2) \< 11),0)
$(error Set PYTHON to an older python3)
endif
SRC=$(shell cask files) SRC=$(shell cask files)
PKBUILD=2.3 PKBUILD=2.3
ELCFILES = $(SRC:.el=.elc) ELCFILES = $(SRC:.el=.elc)
CASK_DIR := $(shell EMACS=$(EMACS) cask package-directory || exit 1) CASK_DIR := $(shell EMACS=$(EMACS) cask package-directory || exit 1)
export TEST_PYTHON ?= $(PYTHON) export TEST_PYTHON ?= python
ifeq ($(shell command -v $(TEST_PYTHON) 2>/dev/null),) ifeq ($(shell expr $$($(TEST_PYTHON) --version 2>&1 | cut -d'.' -f2) \< 9),0)
$(error $(TEST_PYTHON) not found) $(error Set TEST_PYTHON to an older python3)
endif endif
.DEFAULT_GOAL := test-compile .DEFAULT_GOAL := test-compile
@ -49,6 +43,7 @@ clean:
rm -f tests/log/* rm -f tests/log/*
rm -rf tests/test-install rm -rf tests/test-install
.PHONY: pylint .PHONY: pylint
ifeq ($(shell expr $$($(PYTHON) --version 2>&1 | cut -d'.' -f2) \> 9),1) ifeq ($(shell expr $$($(PYTHON) --version 2>&1 | cut -d'.' -f2) \> 9),1)
pylint: pylint:
@ -62,7 +57,7 @@ endif
.PHONY: test-compile .PHONY: test-compile
test-compile: cask autoloads pylint test-compile: cask autoloads pylint
sh -e tools/package-lint.sh lisp/nnreddit.el sh -e tools/package-lint.sh lisp/nnreddit.el
! (cask eval "(let ((byte-compile-error-on-warn t) (bytecomp--inhibit-lexical-cookie-warning t) (byte-compile--suppressed-warnings (quote ((obsolete define-package))))) (cask-cli/build))" 2>&1 | egrep -a "(Warning|Error):") ! (cask eval "(let ((byte-compile-error-on-warn t)) (cask-cli/build))" 2>&1 | egrep -a "(Warning|Error):")
cask clean-elc cask clean-elc
define SET_GITHUB_ACTOR = define SET_GITHUB_ACTOR =
@ -152,7 +147,7 @@ test-run: cask autoloads
--eval "(cl-assert nnreddit-processes)" --eval "(cl-assert nnreddit-processes)"
.PHONY: test-run-interactive .PHONY: test-run-interactive
test-run-interactive: cask autoloads test-run-interactive:
cask emacs -Q \ cask emacs -Q \
$(TESTRUN) \ $(TESTRUN) \
-f gnus -f gnus
@ -166,8 +161,6 @@ test: test-compile test-unit test-int
.PHONY: test-int .PHONY: test-int
test-int: test-int:
@>/dev/null expr $$($(TEST_PYTHON) --version 2>&1 | cut -d'.' -f2) \< 9 || { echo "need python less than 3.9" ; exit -1; }
rm -rf venv-nnreddit-test
$(TEST_PYTHON) -m venv venv-nnreddit-test $(TEST_PYTHON) -m venv venv-nnreddit-test
( \ ( \
source venv-nnreddit-test/bin/activate; \ source venv-nnreddit-test/bin/activate; \

View File

@ -103,11 +103,12 @@
(lambda (negate bogey) (lambda (negate bogey)
(nnreddit-test-wait-for (nnreddit-test-wait-for
(lambda () (lambda ()
(let ((says (s-contains? (s-replace "\\n" "\n" bogey) (buffer-string)))) (let* ((says (s-contains? (s-replace "\\n" "\n" bogey) (buffer-string))))
(revert-buffer :ignore-auto :noconfirm) (revert-buffer :ignore-auto :noconfirm)
(if negate (not says) says))) (if negate (not says) says)))
nil 5000 1000))) nil 5000 1000)))
;; (When "^I scuzz \"\\(.+\\)\"$" ;; (When "^I scuzz \"\\(.+\\)\"$"
;; (lambda (buffer) ;; (lambda (buffer)
;; (let ((v (vconcat [?\C-x ?b] (string-to-vector buffer)))) ;; (let ((v (vconcat [?\C-x ?b] (string-to-vector buffer))))

View File

@ -110,11 +110,15 @@ normal hashtables."
'puthash) 'puthash)
,string ,value ,hashtable)) ,string ,value ,hashtable))
(defcustom nnreddit-python-command "python3.8" (defcustom nnreddit-python-command (if (equal system-type 'windows-nt)
(or (executable-find "py")
(executable-find "pythonw")
"python")
"python")
"Python executable name." "Python executable name."
:type (append '(choice) :type (append '(choice)
(let (result) (let (result)
(dolist (py '("python3.7" "python3.8" "python3.9" "python3.10") (dolist (py '("python" "python3" "pythonw" "py")
result) result)
(setq result (append result `((const :tag ,py ,py)))))) (setq result (append result `((const :tag ,py ,py))))))
'((string :tag "Other"))) '((string :tag "Other")))
@ -505,9 +509,8 @@ So we cannot use `nnreddit--gate'."
"Disambiguate GROUP if it's empty and execute BODY." "Disambiguate GROUP if it's empty and execute BODY."
(declare (debug (form &rest form)) (declare (debug (form &rest form))
(indent 1)) (indent 1))
`(when-let ((group (or ,group (gnus-group-real-name gnus-newsgroup-name))) `(let* ((group (or ,group (gnus-group-real-name gnus-newsgroup-name)))
(gnus-newsgroup-name (unless (zerop (length group)) (gnus-newsgroup-name (gnus-group-full-name group "nnreddit:")))
(gnus-group-full-name group "nnreddit:"))))
,@body)) ,@body))
(defun nnreddit--get-header (article-number &optional group) (defun nnreddit--get-header (article-number &optional group)
@ -932,13 +935,11 @@ Used in the interleaving of submissions and comments."
(deffoo nnreddit-request-list (&optional server) (deffoo nnreddit-request-list (&optional server)
(nnreddit--normalize-server) (nnreddit--normalize-server)
(with-current-buffer nntp-server-buffer (with-current-buffer nntp-server-buffer
(let ((groups (delq (let ((groups (or nnreddit--groups
nil
(or nnreddit--groups
(setq nnreddit--groups (setq nnreddit--groups
(append (nnreddit-rpc-call server nil "user_subreddits") (append (nnreddit-rpc-call server nil "user_subreddits")
(nnreddit--test-supports-inbox (nnreddit--test-supports-inbox
(list (nnreddit--inbox-realname)))))))) (list (nnreddit--inbox-realname)))))))
(newsrc (cl-mapcan (lambda (info) (newsrc (cl-mapcan (lambda (info)
(when (and (equal "nnreddit:" (gnus-info-method info)) (when (and (equal "nnreddit:" (gnus-info-method info))
(<= (gnus-info-level info) (<= (gnus-info-level info)
@ -1481,8 +1482,7 @@ Written by John Wiegley (https://github.com/jwiegley/dot-emacs).")
(let* ((dont-ask (lambda (prompt) (let* ((dont-ask (lambda (prompt)
(when (cl-search "mpty article" prompt) t))) (when (cl-search "mpty article" prompt) t)))
(link-p (message-fetch-field "Link")) (link-p (message-fetch-field "Link"))
(message-shoot-gnksa-feet (if link-p t message-shoot-gnksa-feet)) (message-shoot-gnksa-feet (if link-p t message-shoot-gnksa-feet)))
(message-inhibit-body-encoding t))
(unwind-protect (unwind-protect
(progn (progn
(when link-p (when link-p

View File

@ -176,9 +176,11 @@ class AuthenticatedReddit(Reddit):
recording_end(cassette) recording_end(cassette)
return True return True
def random_subreddit(self, *, nsfw: bool=False): # pragma pylint: disable=arguments-differ
above = super().random_subreddit(nsfw=nsfw) def random_subreddit(self, nsfw=False):
above = super().random_subreddit(nsfw)
return above.display_name return above.display_name
# pragma pylint: enable=arguments-differ
def search(self, query, **generator_kwargs): def search(self, query, **generator_kwargs):
return [ x.display_name for x in self.subreddits.search(query, **generator_kwargs) ] return [ x.display_name for x in self.subreddits.search(query, **generator_kwargs) ]

View File

@ -5,4 +5,4 @@ vcrpy==2.0.1
betamax==0.8.1 betamax==0.8.1
betamax-serializers==0.2.0 betamax-serializers==0.2.0
pytest==4.5.0 pytest==4.5.0
urllib3==1.26.19 urllib3==1.26.5

View File

@ -50,6 +50,6 @@
(cl-letf (((symbol-function 'yes-or-no-p) (lambda (&rest args) t)) (cl-letf (((symbol-function 'yes-or-no-p) (lambda (&rest args) t))
((symbol-function 'y-or-n-p) (lambda (&rest args) t))) ((symbol-function 'y-or-n-p) (lambda (&rest args) t)))
(apply f args))))) (apply f args)))))
'(message-cancel-news message-send-news find-file-noselect)) '(message-cancel-news message-send-news))
(provide 'nnreddit-test) (provide 'nnreddit-test)