forked from pool/python-PyJWT
- Add patch to build with python 3.7:
* pyjwt-python37.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyJWT?expand=0&rev=36
This commit is contained in:
committed by
Git OBS Bridge
parent
89834d5056
commit
d2ea07281f
32
pyjwt-python37.patch
Normal file
32
pyjwt-python37.patch
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
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,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 14 13:51:54 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add patch to build with python 3.7:
|
||||||
|
* pyjwt-python37.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Jul 7 17:24:24 UTC 2018 - arun@gmx.de
|
Sat Jul 7 17:24:24 UTC 2018 - arun@gmx.de
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@@ -25,6 +25,7 @@ License: MIT
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/progrium/pyjwt
|
URL: https://github.com/progrium/pyjwt
|
||||||
Source: https://files.pythonhosted.org/packages/source/P/PyJWT/PyJWT-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/P/PyJWT/PyJWT-%{version}.tar.gz
|
||||||
|
Patch0: pyjwt-python37.patch
|
||||||
BuildRequires: %{python_module cryptography >= 1.4}
|
BuildRequires: %{python_module cryptography >= 1.4}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module ecdsa}
|
BuildRequires: %{python_module ecdsa}
|
||||||
@@ -46,6 +47,8 @@ A Python implementation of JSON Web Token draft 01.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n PyJWT-%{version}
|
%setup -q -n PyJWT-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
dos2unix jwt/__main__.py
|
dos2unix jwt/__main__.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Reference in New Issue
Block a user