Thursday, November 26, 2020

Re: [update] www/py-requests-toolbelt to 0.9.1

? py-requests-toolbelt.diff
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/py-requests-toolbelt/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile 3 Jul 2020 21:13:20 -0000 1.5
+++ Makefile 26 Nov 2020 15:53:19 -0000
@@ -2,10 +2,9 @@

COMMENT = utility belt for advanced users of python-requests

-MODPY_EGG_VERSION = 0.7.1
+MODPY_EGG_VERSION = 0.9.1
DISTNAME = requests-toolbelt-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
-REVISION = 1

CATEGORIES = www

@@ -16,7 +15,8 @@ PERMIT_PACKAGE = Yes

MODULES = lang/python

-RUN_DEPENDS = www/py-requests${MODPY_FLAVOR}
+RUN_DEPENDS = www/py-requests${MODPY_FLAVOR} \
+ security/py-openssl${MODPY_FLAVOR}

MODPY_PI = Yes
MODPY_SETUPTOOLS = Yes
@@ -27,5 +27,8 @@ FLAVOR ?=

TEST_DEPENDS = devel/py-mock${MODPY_FLAVOR} \
www/py-betamax${MODPY_FLAVOR}
+
+# Tests want to access the internet; broken links in the tests anyway :(
+NO_TEST = Yes

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/py-requests-toolbelt/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 17 Mar 2017 07:48:46 -0000 1.1.1.1
+++ distinfo 26 Nov 2020 15:53:19 -0000
@@ -1,2 +1,2 @@
-SHA256 (requests-toolbelt-0.7.1.tar.gz) = w4Q4hCadeeSSUi8+n0kJF+B0wd27gBEZaJcOch/jbq8=
-SIZE (requests-toolbelt-0.7.1.tar.gz) = 194670
+SHA256 (requests-toolbelt-0.9.1.tar.gz) = loCJ1FhK1K18FxRU8KXG2sI5celHJSHqO21J1hCqb8A=
+SIZE (requests-toolbelt-0.9.1.tar.gz) = 207286
Index: patches/patch-requests_toolbelt_adapters_socket_options_py
===================================================================
RCS file: patches/patch-requests_toolbelt_adapters_socket_options_py
diff -N patches/patch-requests_toolbelt_adapters_socket_options_py
--- patches/patch-requests_toolbelt_adapters_socket_options_py 17 Mar 2017 07:48:46 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-requests_toolbelt_adapters_socket_options_py,v 1.1.1.1 2017/03/17 07:48:46 sthen Exp $
---- requests_toolbelt/adapters/socket_options.py.orig Fri Mar 17 07:42:45 2017
-+++ requests_toolbelt/adapters/socket_options.py Fri Mar 17 07:43:47 2017
-@@ -104,14 +104,19 @@ class TCPKeepAliveAdapter(SocketOptionsAdapter):
- count = kwargs.pop('count', 5)
- socket_options = socket_options + [
- (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
-- (socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, interval),
-- (socket.IPPROTO_TCP, socket.TCP_KEEPCNT, count),
- ]
-
- # NOTE(Ian): Apparently OSX does not have this constant defined, so we
- # set it conditionally.
- if getattr(socket, 'TCP_KEEPIDLE', None) is not None:
- socket_options += [(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, idle)]
-+
-+ # ...same for OpenBSD and these two:
-+ if getattr(socket, 'TCP_KEEPINTVL', None) is not None:
-+ socket_options += [(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, idle)]
-+
-+ if getattr(socket, 'TCP_KEEPCNT', None) is not None:
-+ socket_options += [(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, idle)]
-
- super(TCPKeepAliveAdapter, self).__init__(
- socket_options=socket_options, **kwargs
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/py-requests-toolbelt/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST 17 Mar 2017 07:48:46 -0000 1.1.1.1
+++ pkg/PLIST 26 Nov 2020 15:53:19 -0000
@@ -24,12 +24,14 @@ lib/python${MODPY_VERSION}/site-packages
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/${MODPY_PYCACHE}socket_options.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/${MODPY_PYCACHE}source.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/${MODPY_PYCACHE}ssl.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/${MODPY_PYCACHE}x509.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/appengine.py
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/fingerprint.py
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/host_header_ssl.py
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/socket_options.py
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/source.py
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/ssl.py
+lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/adapters/x509.py
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/auth/
lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/auth/__init__.py
${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/requests_toolbelt/auth/${MODPY_PYCACHE}/
On Thu, Nov 26, 2020 at 09:45:27AM -0600, Lucas Raab wrote:
> Hello,
>
> Here is a diff to update www/py-requests-toolbelt to 0.9.1. Going
> through another port update, I decided to check out the depends for
> updates and found this one. Everything seems to work fine. I disabled
> the tests since they require internet access and a couple of the
> tests try to access 404'd URLs anyway. Testing manually, they pass
> fine aside from the 404'd links and some tests which assume that
> socket.TCP_KEEPTNTVL are present on all systems. I left the
> TEST_DEPENDS in there for history though. Should they come out?
>
> The patch included no longer needs to be applied. The code has been
> updated with the same logic (with the exception of the aforementioned
> test).
>
> make test-ed with www/py-CherryPy went fine, but any CherryPy users
> going to tell me differently? :)
>
> Lucas

Updated diff attached with correced/forgotten RUN_DEPENDS of pyopenssl
:(

No comments:

Post a Comment