From nobody Fri Mar 10 19:07:53 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PYFtf2gWWz3xpyp; Fri, 10 Mar 2023 19:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PYFtf1WsGz4HD4; Fri, 10 Mar 2023 19:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678475274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=acidC/JJ+s617AYnNvpW1+q7etHexOYbgQOFecG0MgQ=; b=psVDbP3U3EEWOsz4lZ7FOxNz0WJgRoPMFox5xx+OUzIEDk0zoZiGWh0Leg+4Z7JC+bJg8A FT5GSKl2NmLI91O/vasRgNbxhIyfQGV39kCaKg3NBiRr1b5Pq33Ju8nyyvlETpweHjLZ/9 rfoXY/5WNOgQD4MQnVON/HZ39uNKo9mwAzftjbkxJVnyGwqmx83h+jtzrF9SNCnUdGwEYO 5/VYQeJoQAWh0I4UtlTEb0CMAGKqUAa1KDWB02RCOK9NMEhBGp4SBUOIFGoAsNMDfGyz9B qUOuthLuK/F4s47OlMJlW+F3ni4BAdNZiGXpXxOHMb6z1owQk3BeJb7Gt9uJGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678475274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=acidC/JJ+s617AYnNvpW1+q7etHexOYbgQOFecG0MgQ=; b=ZQfyR1veC6yh/aGmNus0aYOmgkwgFigWCLRyYtcnj2MV8bw6M6PhEytKcfm27IK3sVi2Vg guOvUm5c28gX3shrh8su9EVrmkxDKHr/G7dAiGwvehm9Rw9N60OP2LoCR5+9k7hJIhq1/L qUEjZnUuMJWmmCjqnWZ2cz2XaZYIb9jY4y+C9T5IDIRaoRx4xnMH2KaDIQ3fLDA+4XDDL4 1G+5iqaeyuSwK8PI5uVlRlQWjNZ83xDO+dc7WBKOKbbwBumTSL1WC1e5eSev9G1BKGnohf AF5lXCg/n2e79+CoEsiamXzyelqal2ENRELhSiPWu4vcqVAoWue1bUSe/LnN6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678475274; a=rsa-sha256; cv=none; b=gejN3X05mRQ1ctVVTaGL77NQwdva2EGIml5EJcslnjKj8R/+bp1i8mg+wWIuxAZDY5aTv/ TNMhcnrmuy5Vl6GgIXChh0bHNwk81Zcw5WFe/8cpC+DPZaE5t5WivRHNiSCR/P0gFIl7Fr +sTyr/K7PQyMn0YdHXnm/rCbpXI6pknVzeK0CvUdrcHiGl07HsPaTCsFLQx/4P7WCi1qPG pFfb8t4nUz7hlc7J3JRFs8sCkNpxu0+BxHVIn5JWjGnC7UXutJ2Rg5Sw4kbWNCM8Eotyor akxuqyWkaFfrNwDPQBYulH8OEzlJbDaJCfplCUk8bJ8TZjAbPjDrehJ+BgzO+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PYFtd6qNrz10qD; Fri, 10 Mar 2023 19:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32AJ7rtQ049176; Fri, 10 Mar 2023 19:07:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32AJ7rXl049175; Fri, 10 Mar 2023 19:07:53 GMT (envelope-from git) Date: Fri, 10 Mar 2023 19:07:53 GMT Message-Id: <202303101907.32AJ7rXl049175@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 97475545b13a - main - irc/py-limnoria: Update version 2019.09.08=>2021.11.18 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97475545b13a85402ac0c90a349a6cc3c4c4d247 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=97475545b13a85402ac0c90a349a6cc3c4c4d247 commit 97475545b13a85402ac0c90a349a6cc3c4c4d247 Author: Simeon Simeonov AuthorDate: 2023-03-10 19:05:26 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2023-03-10 19:07:46 +0000 irc/py-limnoria: Update version 2019.09.08=>2021.11.18 Changelog: https://github.com/progval/Limnoria/releases/tag/master-2021-11-18 PR: 260166 --- irc/py-limnoria/Makefile | 31 ++-- irc/py-limnoria/distinfo | 6 +- irc/py-limnoria/files/patch-plugins_Web_plugin.py | 179 ---------------------- 3 files changed, 15 insertions(+), 201 deletions(-) diff --git a/irc/py-limnoria/Makefile b/irc/py-limnoria/Makefile index ee4be7f9b27d..211d4a01c6c7 100644 --- a/irc/py-limnoria/Makefile +++ b/irc/py-limnoria/Makefile @@ -1,5 +1,5 @@ PORTNAME= limnoria -PORTVERSION= 2019.09.08 +PORTVERSION= 2021.11.18 CATEGORIES= irc python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -16,14 +16,15 @@ TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}feedparser>=0:textproc/py-feedparser@${PY_F ${PYTHON_PKGNAMEPREFIX}pytz>=0:devel/py-pytz@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR} -USES= cpe python:3.6-3.9 +USES= cpe python:3.6+ CPE_VENDOR= ${PORTNAME}_project USE_GITHUB= yes -USE_PYTHON= autoplist concurrent distutils - GH_ACCOUNT= ProgVal GH_PROJECT= Limnoria -GH_TAGNAME= master-2019-09-08 +GH_TAGNAME= master-2021-11-18 +USE_PYTHON= autoplist concurrent distutils + +NO_ARCH= yes OPTIONS_DEFINE= ECDSA PROXY OPTIONS_DEFAULT= ECDSA ENCODING RSS TIME @@ -34,35 +35,27 @@ OPTIONS_GROUP_EXTRAS= ENCODING GPG RSS TIME OPTIONS_RADIO= AKA OPTIONS_RADIO_AKA= SQLITE SQLALCHEMY -EXTRAS_DESC= Plugin Extras AKA_DESC= AKA Plugin: SQL Backend (none = plugin disabled) - ECDSA_DESC= ECDSA SASL authentication -PROXY_DESC= SOCKS Proxy connections - ENCODING_DESC= Web Plugin: Better encoding detection (via chardet) +EXTRAS_DESC= Plugin Extras GPG_DESC= GPG Plugin: GnuPG Authentication +PROXY_DESC= SOCKS Proxy connections RSS_DESC= RSS Plugin: Feed parsing (via feedparser) -TIME_DESC= Time Plugin: Extra time features (via dateutil/pytz) - SQLALCHEMY_DESC= SQLAlchemy database support +TIME_DESC= Time Plugin: Extra time features (via dateutil/pytz) ECDSA_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ecdsa>0:security/py-ecdsa@${PY_FLAVOR} -PROXY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pysocks>=0:net/py-pysocks@${PY_FLAVOR} - ENCODING_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}chardet>=0:textproc/py-chardet@${PY_FLAVOR} GPG_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-gnupg>=0:security/py-python-gnupg@${PY_FLAVOR} +PROXY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pysocks>=0:net/py-pysocks@${PY_FLAVOR} RSS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}feedparser>=0:textproc/py-feedparser@${PY_FLAVOR} +SQLALCHEMY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlalchemy10>0:databases/py-sqlalchemy10@${PY_FLAVOR} +SQLITE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} TIME_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dateutil>=0:devel/py-dateutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytz>=0:devel/py-pytz@${PY_FLAVOR} -SQLITE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} -SQLALCHEMY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlalchemy10>0:databases/py-sqlalchemy10@${PY_FLAVOR} - -NO_ARCH= yes - # Needs to be installed first to work. - do-test: @cd ${WRKSRC} && ${PYTHON_CMD} ${LOCALBASE}/bin/supybot-test \ --no-network \ diff --git a/irc/py-limnoria/distinfo b/irc/py-limnoria/distinfo index ea8209f19522..c5e19787110e 100644 --- a/irc/py-limnoria/distinfo +++ b/irc/py-limnoria/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1569902980 -SHA256 (ProgVal-Limnoria-2019.09.08-master-2019-09-08_GH0.tar.gz) = e7b8dec6befa6381d6f1ce75c240e132a0c020bbef15bb0e7b943a01d6790875 -SIZE (ProgVal-Limnoria-2019.09.08-master-2019-09-08_GH0.tar.gz) = 966922 +TIMESTAMP = 1678474534 +SHA256 (ProgVal-Limnoria-2021.11.18-master-2021-11-18_GH0.tar.gz) = f7f1dbf35aaf7937cd46d040d066440cd52651c3970980fe15338995bf393950 +SIZE (ProgVal-Limnoria-2021.11.18-master-2021-11-18_GH0.tar.gz) = 1094394 diff --git a/irc/py-limnoria/files/patch-plugins_Web_plugin.py b/irc/py-limnoria/files/patch-plugins_Web_plugin.py deleted file mode 100644 index ec9f5a736f18..000000000000 --- a/irc/py-limnoria/files/patch-plugins_Web_plugin.py +++ /dev/null @@ -1,179 +0,0 @@ -# https://github.com/ProgVal/Limnoria/pull/1371 -# https://github.com/ProgVal/Limnoria/issues/1362 -# https://github.com/ProgVal/Limnoria/issues/1359 - -From 7cf91ad703ab324e38c37fa2976626505f1d569a Mon Sep 17 00:00:00 2001 -From: Rodrigo -Date: Fri, 27 Sep 2019 01:48:36 -0300 -Subject: [PATCH 1/3] make clear in logs about charade dep|make behave the same - way in py3 or py2 without errors in any case (e.g. without charade installed) - ---- - plugins/Web/plugin.py | 44 +++++++++++++++++-------------------------- - 1 file changed, 17 insertions(+), 27 deletions(-) - -diff --git plugins/Web/plugin.py plugins/Web/plugin.py -index 1ac362714..0bdb68a4a 100644 ---- plugins/Web/plugin.py -+++ plugins/Web/plugin.py -@@ -150,37 +150,27 @@ def getTitle(self, irc, url, raiseErrors): - size = conf.supybot.protocols.http.peekSize() - timeout = self.registryValue('timeout') - (target, text) = utils.web.getUrlTargetAndContent(url, size=size, -- timeout=timeout) -- try: -- text = text.decode(utils.web.getEncoding(text) or 'utf8', -- 'replace') -- except UnicodeDecodeError: -- pass -- if minisix.PY3 and isinstance(text, bytes): -- if raiseErrors: -- irc.error(_('Could not guess the page\'s encoding. (Try ' -- 'installing python-charade.)'), Raise=True) -- else: -- return None -+ timeout=timeout) -+ encoding = utils.web.getEncoding(text) -+ if encoding is None: # Condition if charade not installed -+ self.log.info('Web plugin TitleSnarfer: Could not guess the page\'s' -+ ' encoding. (Try installing python-charade.)') -+ encoding = 'utf-8' # Assume UTF-8 and replace unknown chars to the UTF-8 codec for U+FFFD in the next hop - try: -+ text = text.decode(utils.web.getEncoding(text) or 'utf-8', 'replace') - parser = Title() - parser.feed(text) -- except UnicodeDecodeError: -- # Workaround for Python 2 -- # https://github.com/ProgVal/Limnoria/issues/1359 -- parser = Title() -- parser.feed(text.encode('utf8')) -- parser.close() -- title = utils.str.normalizeWhitespace(''.join(parser.data).strip()) -- if title: -- return (target, title) -- elif raiseErrors: -- if len(text) < size: -- irc.error(_('That URL appears to have no HTML title.'), -- Raise=True) -+ parser.close() -+ title = utils.str.normalizeWhitespace(''.join(parser.data).strip()) -+ if title: -+ return (target, title) - else: -- irc.error(format(_('That URL appears to have no HTML title ' -- 'within the first %S.'), size), Raise=True) -+ if len(text) < size: -+ self.log.info('Web plugin TitleSnarfer: ' -+ 'That URL appears to have no HTML title.') -+ except raiseErrors: # Can use raiseErrors here ? -+ irc.error(_('Web plugin TitleSnarfer encoding errors'), -+ Raise=True) - - @fetch_sandbox - def titleSnarfer(self, irc, msg, match): - -From 16247c5caf59f307b3d6910e31832fe30d0d583a Mon Sep 17 00:00:00 2001 -From: Rodrigo -Date: Fri, 27 Sep 2019 20:12:00 -0300 -Subject: [PATCH 2/3] more python2 compatibility - ---- - plugins/Web/plugin.py | 18 +++++++++++------- - 1 file changed, 11 insertions(+), 7 deletions(-) - -diff --git plugins/Web/plugin.py plugins/Web/plugin.py -index 0bdb68a4a..85c129de3 100644 ---- plugins/Web/plugin.py -+++ plugins/Web/plugin.py -@@ -150,16 +150,20 @@ def getTitle(self, irc, url, raiseErrors): - size = conf.supybot.protocols.http.peekSize() - timeout = self.registryValue('timeout') - (target, text) = utils.web.getUrlTargetAndContent(url, size=size, -- timeout=timeout) -+ timeout=timeout) - encoding = utils.web.getEncoding(text) -- if encoding is None: # Condition if charade not installed -+ if encoding is None: # Condition if charade not installed - self.log.info('Web plugin TitleSnarfer: Could not guess the page\'s' - ' encoding. (Try installing python-charade.)') -- encoding = 'utf-8' # Assume UTF-8 and replace unknown chars to the UTF-8 codec for U+FFFD in the next hop -+ encoding = 'utf-8' # Assume UTF-8 and replace unknown chars to the UTF-8 codec for U+FFFD in the next hop - try: -- text = text.decode(utils.web.getEncoding(text) or 'utf-8', 'replace') -+ text = text.decode(utils.web.getEncoding(text) or 'utf-8','replace') - parser = Title() -- parser.feed(text) -+ try: -+ parser.feed(text) -+ except: -+ parser = Title() -+ parser.feed(bytes(text)) # Explicitly pack to bytes in encoding errors for (more) python2 compatibility - parser.close() - title = utils.str.normalizeWhitespace(''.join(parser.data).strip()) - if title: -@@ -168,9 +172,9 @@ def getTitle(self, irc, url, raiseErrors): - if len(text) < size: - self.log.info('Web plugin TitleSnarfer: ' - 'That URL appears to have no HTML title.') -- except raiseErrors: # Can use raiseErrors here ? -+ except: - irc.error(_('Web plugin TitleSnarfer encoding errors'), -- Raise=True) -+ Raise=True) - - @fetch_sandbox - def titleSnarfer(self, irc, msg, match): - -From 5cac4a3cbda26186a330709901da2633914de415 Mon Sep 17 00:00:00 2001 -From: Rodrigo -Date: Sat, 28 Sep 2019 23:40:44 -0300 -Subject: [PATCH 3/3] Include '(target, text) = - utils.web.getUrlTargetAndContent(url, size=size,timeout=timeout)' in - try/catch block to avoid thread blocking | send http errors to log - ---- - plugins/Web/plugin.py | 23 +++++++++++------------ - 1 file changed, 11 insertions(+), 12 deletions(-) - -diff --git plugins/Web/plugin.py plugins/Web/plugin.py -index 85c129de3..e67944f29 100644 ---- plugins/Web/plugin.py -+++ plugins/Web/plugin.py -@@ -149,14 +149,13 @@ def noIgnore(self, irc, msg): - def getTitle(self, irc, url, raiseErrors): - size = conf.supybot.protocols.http.peekSize() - timeout = self.registryValue('timeout') -- (target, text) = utils.web.getUrlTargetAndContent(url, size=size, -- timeout=timeout) -- encoding = utils.web.getEncoding(text) -- if encoding is None: # Condition if charade not installed -- self.log.info('Web plugin TitleSnarfer: Could not guess the page\'s' -- ' encoding. (Try installing python-charade.)') -- encoding = 'utf-8' # Assume UTF-8 and replace unknown chars to the UTF-8 codec for U+FFFD in the next hop - try: -+ (target, text) = utils.web.getUrlTargetAndContent(url, size=size,timeout=timeout) -+ encoding = utils.web.getEncoding(text) -+ if encoding is None: # Condition if charade not installed -+ self.log.info('Web plugin TitleSnarfer: Could not guess the page\'s' -+ ' encoding. (Try installing python-charade.)') -+ encoding = 'utf-8' # Assume UTF-8 and replace unknown chars to the UTF-8 codec for U+FFFD in the next hop - text = text.decode(utils.web.getEncoding(text) or 'utf-8','replace') - parser = Title() - try: -@@ -170,11 +169,11 @@ def getTitle(self, irc, url, raiseErrors): - return (target, title) - else: - if len(text) < size: -- self.log.info('Web plugin TitleSnarfer: ' -- 'That URL appears to have no HTML title.') -- except: -- irc.error(_('Web plugin TitleSnarfer encoding errors'), -- Raise=True) -+ self.log.info('Web plugin TitleSnarfer: <' + url + '> appears to have no HTML title.') -+ else: -+ self.log.info('Web plugin TitleSnarfer: Could not retrieve title of <' + url + '>') -+ except Exception as e: -+ self.log.info('Web plugin TitleSnarfer: <' + str(e) + '> while trying to process <' + url +'>') - - @fetch_sandbox - def titleSnarfer(self, irc, msg, match):