From 8da7e89bdc6e60a8dc916d2a1b00233f660fd780 Mon Sep 17 00:00:00 2001 From: Leo Date: Mon, 25 Nov 2019 15:56:28 +0100 Subject: testing/py3-passlib: upgrade to 1.7.2 --- testing/py3-passlib/0002-Fix-for-Python-3-8.patch | 48 ----------------------- 1 file changed, 48 deletions(-) delete mode 100644 testing/py3-passlib/0002-Fix-for-Python-3-8.patch (limited to 'testing/py3-passlib/0002-Fix-for-Python-3-8.patch') diff --git a/testing/py3-passlib/0002-Fix-for-Python-3-8.patch b/testing/py3-passlib/0002-Fix-for-Python-3-8.patch deleted file mode 100644 index 3fd19a9d56..0000000000 --- a/testing/py3-passlib/0002-Fix-for-Python-3-8.patch +++ /dev/null @@ -1,48 +0,0 @@ -# HG changeset patch -# User Alan Pevec -# Date 1562888158 -7200 -# Fri Jul 12 01:35:58 2019 +0200 -# Branch stable -# Node ID 98c08467d15759acc3b0f88d2661f6e530147c33 -# Parent 27866c441d18c7ce42e3f7afe824f89da4f8d21b -Fix for Python 3.8 - -This was a deprecation when running in Python 3.7: - -DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working - if isinstance(source, collections.Sequence): - -diff --git a/passlib/utils/__init__.py b/passlib/utils/__init__.py ---- a/passlib/utils/__init__.py -+++ b/passlib/utils/__init__.py -@@ -6,7 +6,12 @@ - # core - from binascii import b2a_base64, a2b_base64, Error as _BinAsciiError - from base64 import b64encode, b64decode --import collections -+try: -+ from collections.abc import Sequence -+ from collections.abc import Iterable -+except ImportError: -+ from collections import Sequence -+ from collections import Iterable - from codecs import lookup as _lookup_codec - from functools import update_wrapper - import itertools -@@ -276,14 +281,14 @@ - """ - if size < 1: - raise ValueError("size must be positive integer") -- if isinstance(source, collections.Sequence): -+ if isinstance(source, Sequence): - end = len(source) - i = 0 - while i < end: - n = i + size - yield source[i:n] - i = n -- elif isinstance(source, collections.Iterable): -+ elif isinstance(source, Iterable): - itr = iter(source) - while True: - chunk_itr = itertools.islice(itr, size) -- cgit v1.2.3