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
11 changed files with 51 additions and 53 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
@ -63,7 +63,6 @@ jobs:
run: | run: |
sudo apt-get -yq update sudo apt-get -yq update
DEBIAN_FRONTEND=noninteractive sudo apt-get -yq install gnutls-bin sharutils dirmngr libreadline-dev libcurl4-openssl-dev virtualenv DEBIAN_FRONTEND=noninteractive sudo apt-get -yq install gnutls-bin sharutils dirmngr libreadline-dev libcurl4-openssl-dev virtualenv
DEBIAN_FRONTEND=noninteractive sudo apt-get -yq install python3.8-minimal python3.8-distutils python3.8-venv
- uses: actions/cache@v2 - uses: actions/cache@v2
id: cache-cask-packages id: cache-cask-packages

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

@ -26,12 +26,11 @@
Install Install
======= =======
Alas, you'll need Cask_. Then, **As of 06 July 2021, authentication behavior at Reddit changed** such that nnreddit versions previous to 0.2.0 no longer work. Delete ``$HOME/.local/share/nnreddit/refresh-token``, and install the latest nnreddit.
:: **As of 24 May 2020, to stay apace with the** PRAW_ **backend, nnreddit no longer supports python2.** If your system keeps python 3.x in a separate alias such as ``python3``, you should ``M-x customize-variable RET nnreddit-python-command`` to it.
git clone https://github.com/dickmao/nnreddit.git We are trying to push ELPASO_ as the preferred package installer. Alternatively, directly clone this repo and ``make install``.
PYTHON=python3.8 make install
Also see Troubleshooting_. Also see Troubleshooting_.
@ -77,6 +76,10 @@ You can subscribe to it via the ``u`` keybinding from the ``*Group*`` buffer [1]
Gnus beginners may find the interface bewildering. In particular, subreddits with no unread articles do not display. Use ``L`` to bring them out of hiding. Gnus beginners may find the interface bewildering. In particular, subreddits with no unread articles do not display. Use ``L`` to bring them out of hiding.
Troubleshooting
===============
Clone this repo. Then install Cask_. Then try ``make test-run-interactive``.
| |
.. [1] Gnus users are familiar with the tragedy of ``u`` doing double duty as subscriber and unsubscriber. ``u`` is really a toggle even though the attached command is ``gnus-group-unsubscribe-current-group`` |---| if that doesn't trigger your UX sensibility, then never mind I mentioned it. .. [1] Gnus users are familiar with the tragedy of ``u`` doing double duty as subscriber and unsubscriber. ``u`` is really a toggle even though the attached command is ``gnus-group-unsubscribe-current-group`` |---| if that doesn't trigger your UX sensibility, then never mind I mentioned it.

View File

@ -1,5 +1,6 @@
|build-status| |melpa-dev| |build-status| |melpa-dev|
A Gnus backend for Reddit.
.. |build-status| .. |build-status|
image:: https://github.com/dickmao/nnreddit/workflows/CI/badge.svg?branch=dev image:: https://github.com/dickmao/nnreddit/workflows/CI/badge.svg?branch=dev
@ -25,12 +26,11 @@
Install Install
======= =======
Alas, you'll need Cask_. Then, **As of 06 July 2021, authentication behavior at Reddit changed** such that nnreddit versions previous to 0.2.0 no longer work. Delete ``$HOME/.local/share/nnreddit/refresh-token``, and install the latest nnreddit.
:: **As of 24 May 2020, to stay apace with the** PRAW_ **backend, nnreddit no longer supports python2.** If your system keeps python 3.x in a separate alias such as ``python3``, you should ``M-x customize-variable RET nnreddit-python-command`` to it.
git clone https://github.com/dickmao/nnreddit.git We are trying to push ELPASO_ as the preferred package installer. Alternatively, directly clone this repo and ``make install``.
PYTHON=python3.8 make install
Also see Troubleshooting_. Also see Troubleshooting_.
@ -76,6 +76,10 @@ You can subscribe to it via the ``u`` keybinding from the ``*Group*`` buffer [1]
Gnus beginners may find the interface bewildering. In particular, subreddits with no unread articles do not display. Use ``L`` to bring them out of hiding. Gnus beginners may find the interface bewildering. In particular, subreddits with no unread articles do not display. Use ``L`` to bring them out of hiding.
Troubleshooting
===============
Clone this repo. Then install Cask_. Then try ``make test-run-interactive``.
| |
.. [1] Gnus users are familiar with the tragedy of ``u`` doing double duty as subscriber and unsubscriber. ``u`` is really a toggle even though the attached command is ``gnus-group-unsubscribe-current-group`` |---| if that doesn't trigger your UX sensibility, then never mind I mentioned it. .. [1] Gnus users are familiar with the tragedy of ``u`` doing double duty as subscriber and unsubscriber. ``u`` is really a toggle even though the attached command is ``gnus-group-unsubscribe-current-group`` |---| if that doesn't trigger your UX sensibility, then never mind I mentioned it.

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 (setq nnreddit--groups
(or nnreddit--groups (append (nnreddit-rpc-call server nil "user_subreddits")
(setq nnreddit--groups (nnreddit--test-supports-inbox
(append (nnreddit-rpc-call server nil "user_subreddits") (list (nnreddit--inbox-realname)))))))
(nnreddit--test-supports-inbox
(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)
@ -1023,10 +1024,9 @@ relics of the 1990s."
nnreddit-el-dir))) nnreddit-el-dir)))
(python-shell-extra-pythonpaths (list nnreddit-py-dir)) (python-shell-extra-pythonpaths (list nnreddit-py-dir))
(process-environment (process-environment
(cons (concat "PATH=" (getenv "PATH")) (funcall (if (fboundp 'python-shell--calculate-process-environment)
(funcall (if (fboundp 'python-shell--calculate-process-environment) (symbol-function 'python-shell--calculate-process-environment)
(symbol-function 'python-shell--calculate-process-environment) (symbol-function 'python-shell-calculate-process-environment))))
(symbol-function 'python-shell-calculate-process-environment)))))
(python-executable (if nnreddit-venv (python-executable (if nnreddit-venv
(format "%s/bin/python" nnreddit-venv) (format "%s/bin/python" nnreddit-venv)
(executable-find nnreddit-python-command))) (executable-find nnreddit-python-command)))
@ -1482,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

@ -29,6 +29,5 @@ setup(
"jsonrpyc>=1.1.0", "jsonrpyc>=1.1.0",
"rtv>=1.26.0", "rtv>=1.26.0",
"praw>=7.3.0", "praw>=7.3.0",
"urllib3<=2.2.3",
], ],
) )

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)