aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-10-22 19:24:35 +0300
committerKevin Daudt <kdaudt@alpinelinux.org>2019-11-04 05:47:54 +0000
commitd21aacbfa9eef7c67341ea07c5014e2cc5344536 (patch)
treed1be8acb190346f2ae573ff7d997331ec57b023d
parent420495eb514ae98f55d5cfd8dd9410480be4f0fc (diff)
downloadaports-d21aacbfa9eef7c67341ea07c5014e2cc5344536.tar.bz2
aports-d21aacbfa9eef7c67341ea07c5014e2cc5344536.tar.xz
testing/py3-oscrypto: upgrade to 1.1.0
Signed-off-by: prspkt <prspkt@protonmail.com> Closes !653
-rw-r--r--testing/py3-oscrypto/0001-Fix-compatibility-with-Python-3.7.patch113
-rw-r--r--testing/py3-oscrypto/APKBUILD16
2 files changed, 8 insertions, 121 deletions
diff --git a/testing/py3-oscrypto/0001-Fix-compatibility-with-Python-3.7.patch b/testing/py3-oscrypto/0001-Fix-compatibility-with-Python-3.7.patch
deleted file mode 100644
index 136b791e70..0000000000
--- a/testing/py3-oscrypto/0001-Fix-compatibility-with-Python-3.7.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From df9875ee0fd840facd744108aa9151da34d1fb4c Mon Sep 17 00:00:00 2001
-From: wbond <will@wbond.net>
-Date: Sat, 1 Sep 2018 07:07:40 -0400
-Subject: [PATCH] Fix compatibility with Python 3.7
-
----
- oscrypto/_openssl/tls.py | 9 +++++++--
- oscrypto/_osx/tls.py | 9 +++++++--
- oscrypto/_win/tls.py | 9 +++++++--
- 3 files changed, 21 insertions(+), 6 deletions(-)
-
-diff --git a/oscrypto/_openssl/tls.py b/oscrypto/_openssl/tls.py
-index 0b5097c..57034dd 100644
---- a/oscrypto/_openssl/tls.py
-+++ b/oscrypto/_openssl/tls.py
-@@ -41,6 +41,11 @@ from ..trust_list import get_path
- if sys.version_info < (3,):
- range = xrange # noqa
-
-+if sys.version_info < (3, 7):
-+ Pattern = re._pattern_type
-+else:
-+ Pattern = re.Pattern
-+
-
- __all__ = [
- 'TLSSession',
-@@ -845,7 +850,7 @@ class TLSSocket(object):
- A byte string of the data read, including the marker
- """
-
-- if not isinstance(marker, byte_cls) and not isinstance(marker, re._pattern_type):
-+ if not isinstance(marker, byte_cls) and not isinstance(marker, Pattern):
- raise TypeError(pretty_message(
- '''
- marker must be a byte string or compiled regex object, not %s
-@@ -855,7 +860,7 @@ class TLSSocket(object):
-
- output = b''
-
-- is_regex = isinstance(marker, re._pattern_type)
-+ is_regex = isinstance(marker, Pattern)
-
- while True:
- if len(self._decrypted_bytes) > 0:
-diff --git a/oscrypto/_osx/tls.py b/oscrypto/_osx/tls.py
-index da03ed1..796361c 100644
---- a/oscrypto/_osx/tls.py
-+++ b/oscrypto/_osx/tls.py
-@@ -62,6 +62,11 @@ from ..keys import parse_certificate
- if sys.version_info < (3,):
- range = xrange # noqa
-
-+if sys.version_info < (3, 7):
-+ Pattern = re._pattern_type
-+else:
-+ Pattern = re.Pattern
-+
-
- __all__ = [
- 'TLSSession',
-@@ -1116,7 +1121,7 @@ class TLSSocket(object):
- A byte string of the data read, including the marker
- """
-
-- if not isinstance(marker, byte_cls) and not isinstance(marker, re._pattern_type):
-+ if not isinstance(marker, byte_cls) and not isinstance(marker, Pattern):
- raise TypeError(pretty_message(
- '''
- marker must be a byte string or compiled regex object, not %s
-@@ -1126,7 +1131,7 @@ class TLSSocket(object):
-
- output = b''
-
-- is_regex = isinstance(marker, re._pattern_type)
-+ is_regex = isinstance(marker, Pattern)
-
- while True:
- if len(self._decrypted_bytes) > 0:
-diff --git a/oscrypto/_win/tls.py b/oscrypto/_win/tls.py
-index 9a85555..0a8ff70 100644
---- a/oscrypto/_win/tls.py
-+++ b/oscrypto/_win/tls.py
-@@ -61,6 +61,11 @@ if sys.version_info < (3,):
- else:
- socket_error_cls = WindowsError
-
-+if sys.version_info < (3, 7):
-+ Pattern = re._pattern_type
-+else:
-+ Pattern = re.Pattern
-+
-
- __all__ = [
- 'TLSSession',
-@@ -1180,7 +1185,7 @@ class TLSSocket(object):
- A byte string of the data read
- """
-
-- if not isinstance(marker, byte_cls) and not isinstance(marker, re._pattern_type):
-+ if not isinstance(marker, byte_cls) and not isinstance(marker, Pattern):
- raise TypeError(pretty_message(
- '''
- marker must be a byte string or compiled regex object, not %s
-@@ -1190,7 +1195,7 @@ class TLSSocket(object):
-
- output = b''
-
-- is_regex = isinstance(marker, re._pattern_type)
-+ is_regex = isinstance(marker, Pattern)
-
- while True:
- if len(self._decrypted_bytes) > 0:
diff --git a/testing/py3-oscrypto/APKBUILD b/testing/py3-oscrypto/APKBUILD
index 20d4afc8e2..3376dd60b2 100644
--- a/testing/py3-oscrypto/APKBUILD
+++ b/testing/py3-oscrypto/APKBUILD
@@ -2,16 +2,15 @@
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=py3-oscrypto
_pkgname=${pkgname##py3-}
-pkgver=0.19.1
+pkgver=1.1.0
pkgrel=0
pkgdesc="Python crypto library backed by the OS"
url="https://github.com/wbond/oscrypto"
arch="noarch"
license="MIT"
-depends="python3 py3-setuptools py3-asn1crypto"
+depends="python3 py3-setuptools py3-asn1crypto>=1.0.0"
subpackages="$pkgname-doc"
-source="$pkgname-$pkgver.tar.gz::https://github.com/wbond/$_pkgname/archive/$pkgver.tar.gz
- 0001-Fix-compatibility-with-Python-3.7.patch"
+source="$pkgname-$pkgver.tar.gz::https://github.com/wbond/oscrypto/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
@@ -19,8 +18,10 @@ build() {
}
check() {
- # Hardcoded FTP server used in the test is down.
- python3 run.py tests '^(?!test_tls_error_ftp)$'
+ cd "$builddir"/tests
+ python3 setup.py build
+ cd "$builddir"
+ PYTHONPATH="$builddir"/tests/build/lib python3 -m oscrypto_tests
}
package() {
@@ -31,5 +32,4 @@ package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
-sha512sums="ed43e572b431decdab12bd8832403a439da4adae5715af5c1674c8868ac4a46e51aae6e39f40b8271cb78f936022c844ecf8383e04a05bd6a0f95cc43e93d800 py3-oscrypto-0.19.1.tar.gz
-dbd82157997ac418d6e9b3c3be67b5332b7194badb664a3e65bf59562f3e4b3927de61bc1dbd35a7b5547be984d22f01a24a9d37ba83a1f5c268fa298144906b 0001-Fix-compatibility-with-Python-3.7.patch"
+sha512sums="4c3d229eb57bf4f7f4f668fa43671d04898aa7ffddd8957e2207e6d1f11a9688a4615e336078932ffde7a4dfc9746907187f5c2ae8f34c6cc6102631c16c2737 py3-oscrypto-1.1.0.tar.gz"