forked from pool/python-PyJWT
Accepting request 671226 from home:frispete:python
- update to version 1.7.1: * Update test dependencies with pinned ranges * Fix pytest deprecation warnings - update to version v1.7.0: * Remove CRLF line endings #353 * Update usage.rst #360 * Support for Python 3.7 #375 #379 #384 - removed pyjwt-pytest390.patch (fixed upstream) - removed pyjwt-python37.patch (fixed upstream) - removed dos2unix conversion of jwt/__main__.py (fixed upstream) - add test build conditional OBS-URL: https://build.opensuse.org/request/show/671226 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyJWT?expand=0&rev=41
This commit is contained in:
committed by
Git OBS Bridge
parent
b48752ab8b
commit
8a13e4125d
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ee413b357d53fd3fb44704577afac88e72e878716116270d722723d65b42176
|
||||
size 41694
|
3
PyJWT-1.7.1.tar.gz
Normal file
3
PyJWT-1.7.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96
|
||||
size 41979
|
@@ -1,24 +0,0 @@
|
||||
diff -Nru PyJWT-1.6.4.orig/tests/test_api_jws.py PyJWT-1.6.4/tests/test_api_jws.py
|
||||
--- PyJWT-1.6.4.orig/tests/test_api_jws.py 2018-03-03 15:45:20.000000000 +0100
|
||||
+++ PyJWT-1.6.4/tests/test_api_jws.py 2018-11-27 12:48:14.393379717 +0100
|
||||
@@ -294,7 +294,7 @@
|
||||
jws.decode, example_jws, key=example_secret,
|
||||
options={'verify_signature': False},
|
||||
)
|
||||
- except AssertionError:
|
||||
+ except pytest.fail.Exception:
|
||||
pass
|
||||
else:
|
||||
assert False, "Unexpected DeprecationWarning raised."
|
||||
diff -Nru PyJWT-1.6.4.orig/tests/test_api_jwt.py PyJWT-1.6.4/tests/test_api_jwt.py
|
||||
--- PyJWT-1.6.4.orig/tests/test_api_jwt.py 2018-03-18 14:35:35.000000000 +0100
|
||||
+++ PyJWT-1.6.4/tests/test_api_jwt.py 2018-11-27 12:48:24.217463350 +0100
|
||||
@@ -516,7 +516,7 @@
|
||||
pytest.deprecated_call(
|
||||
jwt.decode, jwt_message, secret, verify=False,
|
||||
)
|
||||
- except AssertionError:
|
||||
+ except pytest.fail.Exception:
|
||||
pass
|
||||
else:
|
||||
assert False, "Unexpected DeprecationWarning raised."
|
@@ -1,32 +0,0 @@
|
||||
From 2122f94432d160a23e79a4771c05d71132dc6db9 Mon Sep 17 00:00:00 2001
|
||||
From: kreutz-hs <43569762+kreutz-hs@users.noreply.github.com>
|
||||
Date: Fri, 2 Nov 2018 12:24:18 +0100
|
||||
Subject: [PATCH] Support Python 3.7 (#375)
|
||||
|
||||
* Import collection ABC's from correct module
|
||||
They were moved into collections.abc in 3.3 and will be deprecated
|
||||
from collections in 3.8.
|
||||
---
|
||||
CHANGELOG.md | 2 ++
|
||||
jwt/api_jwt.py | 6 +++++-
|
||||
tox.ini | 2 +-
|
||||
3 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/jwt/api_jwt.py b/jwt/api_jwt.py
|
||||
index 6caeecf..0836ec0 100644
|
||||
--- a/jwt/api_jwt.py
|
||||
+++ b/jwt/api_jwt.py
|
||||
@@ -1,8 +1,12 @@
|
||||
import json
|
||||
import warnings
|
||||
from calendar import timegm
|
||||
-from collections import Iterable, Mapping
|
||||
from datetime import datetime, timedelta
|
||||
+try:
|
||||
+ # Importing ABCs from collections will be removed in PY3.8
|
||||
+ from collections.abc import Iterable, Mapping
|
||||
+except ImportError:
|
||||
+ from collections import Iterable, Mapping
|
||||
try:
|
||||
# import required by mypy to perform type checking, not used for normal execution
|
||||
from typing import Callable, Dict, List, Optional, Union # NOQA
|
@@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 4 20:05:58 UTC 2019 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- update to version 1.7.1:
|
||||
* Update test dependencies with pinned ranges
|
||||
* Fix pytest deprecation warnings
|
||||
|
||||
- update to version v1.7.0:
|
||||
* Remove CRLF line endings #353
|
||||
* Update usage.rst #360
|
||||
* Support for Python 3.7 #375 #379 #384
|
||||
|
||||
- removed pyjwt-pytest390.patch (fixed upstream)
|
||||
- removed pyjwt-python37.patch (fixed upstream)
|
||||
- removed dos2unix conversion of jwt/__main__.py (fixed upstream)
|
||||
- add test build conditional
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 4 12:52:21 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-PyJWT
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,23 +16,21 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without test
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-PyJWT
|
||||
Version: 1.6.4
|
||||
Version: 1.7.1
|
||||
Release: 0
|
||||
Summary: JSON Web Token implementation in Python
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/progrium/pyjwt
|
||||
Source: https://files.pythonhosted.org/packages/source/P/PyJWT/PyJWT-%{version}.tar.gz
|
||||
Patch0: pyjwt-python37.patch
|
||||
# fix testsuite with pytest >= 3.9.0, see: https://github.com/jpadilla/pyjwt/issues/382
|
||||
Patch1: pyjwt-pytest390.patch
|
||||
BuildRequires: %{python_module cryptography >= 1.4}
|
||||
BuildRequires: %{python_module ecdsa}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-cryptography >= 1.4
|
||||
@@ -48,10 +46,6 @@ A Python implementation of JSON Web Token draft 01.
|
||||
|
||||
%prep
|
||||
%setup -q -n PyJWT-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
dos2unix jwt/__main__.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -71,8 +65,10 @@ find ./ -type f -name "*.py" -perm 644 -exec sed -i -e '1{\@^#!%{_bindir}/env py
|
||||
%postun
|
||||
%python_uninstall_alternative pyjwt
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%{python_expand PYTHONPATH=%{buildroot}%{python_sitelib} py.test-%{$python_version} -o addopts="" -k "not test_verify_false_deprecated" }
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
|
Reference in New Issue
Block a user