File: 0001-support-python-3.10.patch

package info (click to toggle)
python-memoize 1.0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 112 kB
  • sloc: python: 324; makefile: 3
file content (24 lines) | stat: -rw-r--r-- 694 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 6d45df49908cfe5cc6a81535cb494d6d167ba9f1 Mon Sep 17 00:00:00 2001
From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Date: Mon, 14 Dec 2020 05:07:28 +0000
Subject: [PATCH] Import ABC from collections.abc for Python 3.9 compatibility.

---
 memoize/options.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/memoize/options.py b/memoize/options.py
index afbab9f..d75e9f7 100644
--- a/memoize/options.py
+++ b/memoize/options.py
@@ -1,5 +1,9 @@
 from functools import partial
-from collections import Callable
+
+try:
+    from collections.abc import Callable
+except ImportError:
+    from collections import Callable
 
 
 def call_or_pass(value, args, kwargs):