got autobahn/autobahn-18.7.1 working on Python 3.7
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
AUX autobahn-18.3.1-Fix-cs-test-955.patch 3736 BLAKE2B eece2b356181b4dac4849dacf555b5c64499f8484ca959c402cd124badccb8d5e8aea20d2310c8f5920d3dbde8854dcdf2c2abd93dd9e0effa8808eed3c78ea0 SHA512 380e3641d5b203a0f9dbdeca21dd7dc0802bf8675271a847824a5059c3867cd92a5f51db90414e74c0749337db191df9693a9d36562b16ed090bb9a508c7b66b
|
||||
DIST autobahn-18.7.1.tar.gz 222236 BLAKE2B e3436bccc33a157e092e601f7f23f48d4c6679085c3444956a17222905a76ff2e682340735dd71c195b666d69975586cdfe567950c6ca6bc1fa631109ce6d637 SHA512 334716e9c85b8934170bfc1fc589f9f7f2765231d7a7ac25e308dbb457f63119061af5cba58367ed0a82401c8a706dd875ce4826e717367e3d5ca6da72ea5975
|
||||
EBUILD autobahn-18.7.1.ebuild 2182 BLAKE2B 124c9137a85b1d2534e10f0164775faad93a6b56a8cfdcd41691f269bef6a483f9684f04a72c58a6013d2efd6f7cf0b7625cb1be2dc1941debe569162effadd2 SHA512 80e36443cdcceddf94630095382541f36a5a34a258148058510e0cb2a5453106f3f5187ac1fffa3fb04637cb0cf7e8f4b0430313aeaf738dd983d3ec926004c6
|
||||
EBUILD autobahn-18.7.1.ebuild 2062 BLAKE2B 9598a358264e324d934b11518b4ddfb32b327a5385d6ed7cb01587111311ed7d25176720e1ad10b8dd54cb723b256f5c733d30d402e5e683884c66dfbf76857e SHA512 6f89370b08cb6b23b797303fcf89041fbda554626f166b309d7c14d5b5a96a44f961eb252fe920c8cffdd3b035b7051a176aa32a973317cf3e35a5aa35358fc9
|
||||
MISC metadata.xml 321 BLAKE2B 2a222ee5e7e6a2a90a44b834a4b7d430938813786c7179fe3fe273456b501feba4c20da2fe3b9671092085a991fd35c736a5b64c179a08f54fddd029ac5bd731 SHA512 fd00829f66750d3d54b7bfb472179639fbe453840e7c3056b406af546acb952d3fb8d4552973a68ff0966f25bead8dfd4501888cbd68721e54207b5a7628ac36
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8} )
|
||||
|
||||
inherit distutils-r1 versionator
|
||||
|
||||
MY_P="${PN}-$(replace_version_separator 3 -)"
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="WebSocket and WAMP for Twisted and Asyncio"
|
||||
HOMEPAGE="https://pypi.org/project/autobahn/
|
||||
https://crossbar.io/autobahn/
|
||||
https://github.com/crossbario/autobahn-python"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="MIT"
|
||||
@@ -37,7 +35,7 @@ RDEPEND="
|
||||
>=dev-python/pyopenssl-16.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytrie-0.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyqrcode-1.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/PyQRCode-1.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/service_identity-16.0.0
|
||||
)
|
||||
"
|
||||
@@ -50,11 +48,7 @@ DEPEND="${RDEPEND}
|
||||
>=dev-python/pyqrcode-1.1.0[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-Fix-cs-test-955.patch"
|
||||
)
|
||||
|
||||
S="${WORKDIR}"/${MY_P}
|
||||
S="${WORKDIR}/${P}"
|
||||
|
||||
python_test() {
|
||||
echo "Testing all, cryptosign using twisted"
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
From 604bc53a3beec173020c944ce9cb38afca2a9126 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Oberstein <tobias.oberstein@crossbario.com>
|
||||
Date: Fri, 9 Mar 2018 10:37:31 +0100
|
||||
Subject: [PATCH] Fix cs test (#955)
|
||||
|
||||
* encode test string
|
||||
|
||||
* already an instance
|
||||
|
||||
* add extra deps (encryption)
|
||||
|
||||
* add extra deps
|
||||
|
||||
* deactivate py 3.3, tx < 15.4
|
||||
|
||||
* systematic version coverage
|
||||
|
||||
* fix coverage (hopefully)
|
||||
|
||||
* another try
|
||||
|
||||
* actually need to yield, as a future is returned
|
||||
---
|
||||
.travis.yml | 58 ++++++++++++++++++++++++++++++++---
|
||||
Makefile | 3 ++
|
||||
autobahn/asyncio/rawsocket.py | 2 +-
|
||||
autobahn/wamp/test/test_cryptosign.py | 18 +++++++++--
|
||||
tox.ini | 32 ++++++++++---------
|
||||
5 files changed, 89 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/autobahn/asyncio/rawsocket.py b/autobahn/asyncio/rawsocket.py
|
||||
index 130a8e41..bbb83337 100644
|
||||
--- a/autobahn/asyncio/rawsocket.py
|
||||
+++ b/autobahn/asyncio/rawsocket.py
|
||||
@@ -408,7 +408,7 @@ class WampRawSocketClientProtocol(WampRawSocketMixinGeneral, WampRawSocketMixinA
|
||||
@property
|
||||
def serializer_id(self):
|
||||
if not hasattr(self, '_serializer'):
|
||||
- self._serializer = self.factory._serializer()
|
||||
+ self._serializer = self.factory._serializer
|
||||
return self._serializer.RAWSOCKET_SERIALIZER_ID
|
||||
|
||||
def get_channel_id(self, channel_id_type=u'tls-unique'):
|
||||
diff --git a/autobahn/wamp/test/test_cryptosign.py b/autobahn/wamp/test/test_cryptosign.py
|
||||
index 700ca3cc..78f8d556 100644
|
||||
--- a/autobahn/wamp/test/test_cryptosign.py
|
||||
+++ b/autobahn/wamp/test/test_cryptosign.py
|
||||
@@ -25,9 +25,21 @@
|
||||
###############################################################################
|
||||
|
||||
from __future__ import absolute_import
|
||||
+
|
||||
import hashlib
|
||||
+import os
|
||||
+
|
||||
from mock import Mock
|
||||
|
||||
+import txaio
|
||||
+
|
||||
+if os.environ.get('USE_TWISTED', False):
|
||||
+ txaio.use_twisted()
|
||||
+elif os.environ.get('USE_ASYNCIO', False):
|
||||
+ txaio.use_asyncio()
|
||||
+else:
|
||||
+ raise Exception('no networking framework selected')
|
||||
+
|
||||
from autobahn.wamp.cryptosign import _makepad, HAS_CRYPTOSIGN
|
||||
from autobahn.wamp import types
|
||||
from autobahn.wamp.auth import create_authenticator
|
||||
@@ -59,14 +71,14 @@ def setUp(self):
|
||||
self.key = SigningKey.from_ssh_data(keybody)
|
||||
self.privkey_hex = self.key._key.encode(encoder=HexEncoder)
|
||||
m = hashlib.sha256()
|
||||
- m.update("some TLS message")
|
||||
+ m.update("some TLS message".encode())
|
||||
self.channel_id = m.digest()
|
||||
|
||||
def test_valid(self):
|
||||
session = Mock()
|
||||
session._transport.get_channel_id = Mock(return_value=self.channel_id)
|
||||
challenge = types.Challenge(u"ticket", dict(challenge="ff" * 32))
|
||||
- signed = self.key.sign_challenge(session, challenge)
|
||||
+ signed = yield self.key.sign_challenge(session, challenge)
|
||||
self.assertEqual(
|
||||
u'9b6f41540c9b95b4b7b281c3042fa9c54cef43c842d62ea3fd6030fcb66e70b3e80d49d44c29d1635da9348d02ec93f3ed1ef227dfb59a07b580095c2b82f80f9d16ca518aa0c2b707f2b2a609edeca73bca8dd59817a633f35574ac6fd80d00',
|
||||
signed.result,
|
||||
@@ -81,7 +93,7 @@ def test_authenticator(self):
|
||||
session = Mock()
|
||||
session._transport.get_channel_id = Mock(return_value=self.channel_id)
|
||||
challenge = types.Challenge(u"cryptosign", dict(challenge="ff" * 32))
|
||||
- reply = authenticator.on_challenge(session, challenge)
|
||||
+ reply = yield authenticator.on_challenge(session, challenge)
|
||||
self.assertEqual(
|
||||
reply.result,
|
||||
u'9b6f41540c9b95b4b7b281c3042fa9c54cef43c842d62ea3fd6030fcb66e70b3e80d49d44c29d1635da9348d02ec93f3ed1ef227dfb59a07b580095c2b82f80f9d16ca518aa0c2b707f2b2a609edeca73bca8dd59817a633f35574ac6fd80d00',
|
||||
Reference in New Issue
Block a user