Add upstream patch to avoid DeprecationWarning. Fixes bug #1648583
This commit is contained in:
parent
5c07f3f332
commit
d5ab35638c
29
d74c3f1d34d07a001656453823a153ea0c865449.patch
Normal file
29
d74c3f1d34d07a001656453823a153ea0c865449.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From d74c3f1d34d07a001656453823a153ea0c865449 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Fri, 29 Jun 2018 18:03:21 +0200
|
||||
Subject: [PATCH] Avoid DeprecationWarning
|
||||
|
||||
Using or importing the ABCs from 'collections' instead of from
|
||||
'collections.abc' is deprecated, and in 3.8 it will stop working.
|
||||
|
||||
Preserves Python 2 compatibility.
|
||||
---
|
||||
socks.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/socks.py b/socks.py
|
||||
index 1b55295..80b6876 100644
|
||||
--- a/socks.py
|
||||
+++ b/socks.py
|
||||
@@ -55,7 +55,10 @@
|
||||
"""
|
||||
|
||||
from base64 import b64encode
|
||||
-from collections import Callable
|
||||
+try:
|
||||
+ from collections.abc import Callable
|
||||
+except ImportError:
|
||||
+ from collections import Callable
|
||||
from errno import EOPNOTSUPP, EINVAL, EAGAIN
|
||||
import functools
|
||||
from io import BytesIO
|
@ -24,14 +24,14 @@
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 1.6.8
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: %{sum}
|
||||
|
||||
License: BSD
|
||||
URL: https://github.com/Anorov/%{pypi_name}
|
||||
Source0: %pypi_source
|
||||
BuildArch: noarch
|
||||
|
||||
Patch0: https://github.com/Anorov/PySocks/commit/d74c3f1d34d07a001656453823a153ea0c865449.patch
|
||||
|
||||
%global _description \
|
||||
A fork of SocksiPy with bug fixes and extra features.\
|
||||
@ -171,6 +171,9 @@ rm -rfv test/bin
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Nov 11 2018 Kevin Fenzi <kevin@scrye.com> - 1.6.8-6
|
||||
- Add upstream patch to avoid DeprecationWarning. Fixes bug #1648583
|
||||
|
||||
* Wed Oct 03 2018 Raphael Groner <projects.rg@smart.ms> - 1.6.8-5
|
||||
- add python3_other subpackage for epel7
|
||||
- prepare removal of python2 subpackage in Fedora
|
||||
|
Loading…
Reference in New Issue
Block a user