1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Update to 1.2.1 and unbreak this port

This commit is contained in:
Sunpoet Po-Chuan Hsieh 2020-02-11 17:56:46 +00:00
parent 02b46d3b8a
commit bab81f11bb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=525876
6 changed files with 77 additions and 9 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= xcaplib
PORTVERSION= 1.2.0
PORTVERSION= 1.2.1
CATEGORIES= devel python
MASTER_SITES= http://download.ag-projects.com/XCAP/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -11,16 +11,15 @@ DISTNAME= python-${PORTNAME}-${PORTVERSION}
MAINTAINER= python@FreeBSD.org
COMMENT= Python XCAP client library
BROKEN= unfetchable
LICENSE= LGPL20+
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}application>=1.1.5:devel/py-application@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}lxml>=2.1.2:devel/py-lxml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}lxml>=0:devel/py-lxml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}twisted>=0:devel/py-twisted@${PY_FLAVOR}
NO_ARCH= yes
USES= python
USE_PYTHON= autoplist distutils
USE_PYTHON= autoplist concurrent distutils
NO_ARCH= yes
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1503492165
SHA256 (python-xcaplib-1.2.0.tar.gz) = 81807546fe433dbe21437475717d1a1af344d5322eb74df24d2a4856960a2f27
SIZE (python-xcaplib-1.2.0.tar.gz) = 22163
TIMESTAMP = 1581415302
SHA256 (python-xcaplib-1.2.1.tar.gz) = 0ff3417fb8fb78b84950b473f833dc9e2dab9b1a691f7f30fdfa28c69f852f2f
SIZE (python-xcaplib-1.2.1.tar.gz) = 22440

View File

@ -0,0 +1,27 @@
--- xcaplib/client.py.orig 2016-01-12 11:22:06 UTC
+++ xcaplib/client.py
@@ -175,7 +175,7 @@ class XCAPClient(XCAPClientBase):
"""
try:
self.get(application, **kwargs)
- except HTTPError, ex:
+ except HTTPError as ex:
if ex.status == 404:
# how to ensure insert?
# 1. make openxcap to supply fixed tag into 404, like ETag: "none"
@@ -203,13 +203,13 @@ class XCAPClient(XCAPClientBase):
document = self.get(application, None, etag, **kwargs)
try:
self.get(application, node, document.etag, **kwargs)
- except HTTPError, ex:
+ except HTTPError as ex:
if etag is None and ex.status == 412:
continue
elif ex.status == 404:
try:
return self.put(application, resource, node, document.etag, **kwargs)
- except HTTPError, ex:
+ except HTTPError as ex:
if etag is None and ex.status == 412:
continue
else:

View File

@ -0,0 +1,11 @@
--- xcaplib/httpclient.py.orig 2016-01-12 11:22:06 UTC
+++ xcaplib/httpclient.py
@@ -164,7 +164,7 @@ class HTTPClient(object):
return HTTPResponse.from_addinfourl(response)
else:
raise RuntimeError('urllib2.open returned %r' % response)
- except urllib2.HTTPError, e:
+ except urllib2.HTTPError as e:
# Workaround for bug in urllib2 which doesn't reset the retry count
# when a negative, but different that 401 or 407, response is
# received. -Luci

View File

@ -0,0 +1,20 @@
--- xcaplib/xcapclient.py.orig 2016-01-12 11:22:06 UTC
+++ xcaplib/xcapclient.py
@@ -304,7 +304,7 @@ def run_completion(option, raise_ex=False):
finally:
for x in result:
log(x)
- print x
+ print(x)
def complete_xpath(options, app, selector, action):
client = make_xcapclient(options)
@@ -517,7 +517,7 @@ def main():
try:
result = client_request(client, action, options, node_selector)
- except (urllib2.URLError, HTTPException), ex:
+ except (urllib2.URLError, HTTPException) as ex:
sys.exit('FATAL: %s: %s' % (type(ex).__name__, ex))
if result.status==401 and not options.password and interactive():
authreq = result.headers.get('www-authenticate')

View File

@ -0,0 +1,11 @@
--- xcaplib/xpath_completion.py.orig 2016-01-12 11:22:06 UTC
+++ xcaplib/xpath_completion.py
@@ -50,7 +50,7 @@ def fix_namespace_prefix(selector, prefix = 'default')
steps.append(prefix + ':' + step)
return '/'.join(steps)
-def path_element((prefix, name)):
+def path_element(prefix, name):
if prefix:
return prefix + ':' + name
else: