diff --git a/devel/py-python-bugzilla/Makefile b/devel/py-python-bugzilla/Makefile index 42db2a632006..35eb957c3a9d 100644 --- a/devel/py-python-bugzilla/Makefile +++ b/devel/py-python-bugzilla/Makefile @@ -1,25 +1,26 @@ PORTNAME= python-bugzilla PORTVERSION= 3.2.0 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= lwhsu@FreeBSD.org COMMENT= Bugzilla XMLRPC access module WWW= https://github.com/python-bugzilla/python-bugzilla LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0,1:devel/py-pytest@${PY_FLAVOR} USES= python USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes do-test: cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -rs -v .include diff --git a/devel/py-python-bugzilla/files/patch-bugzilla___session.py b/devel/py-python-bugzilla/files/patch-bugzilla___session.py new file mode 100644 index 000000000000..bf9849a0eef2 --- /dev/null +++ b/devel/py-python-bugzilla/files/patch-bugzilla___session.py @@ -0,0 +1,23 @@ +--- bugzilla/_session.py ++++ bugzilla/_session.py +@@ -98,14 +98,14 @@ def request(self, *args, **kwargs): + if "timeout" not in kwargs: + kwargs["timeout"] = timeout + +- response = self._session.request(*args, **kwargs) ++ try: ++ response = self._session.request(*args, **kwargs) + +- if self._is_xmlrpc: +- # Yes this still appears to matter for properly decoding unicode +- # code points in bugzilla.redhat.com content +- response.encoding = "UTF-8" ++ if self._is_xmlrpc: ++ # This still appears to matter for properly decoding unicode ++ # code points in bugzilla.redhat.com content ++ response.encoding = "UTF-8" + +- try: + response.raise_for_status() + except requests.HTTPError as e: + # Scrape the api key out of the returned exception string