-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
isort-py: MutableSet has long been moved to collections.abc
Use upstream patch so that this runs when any py310 uses this code. See #1160
- Loading branch information
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
10.9-libcxx/stable/main/finkinfo/libs/pythonmods/isort-py-pr757.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From 234b3f65a20a52ba73139d9db1f07eb4df411578 Mon Sep 17 00:00:00 2001 | ||
From: Jon Dufresne <[email protected]> | ||
Date: Sat, 27 Oct 2018 11:01:13 -0700 | ||
Subject: [PATCH] Import from collections.abc to avoid deprecation warning | ||
|
||
Fixes #756 | ||
--- | ||
isort/pie_slice.py | 8 +++++++- | ||
1 file changed, 7 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/isort/pie_slice.py b/isort/pie_slice.py | ||
index 10758bfbd..52cc24eca 100644 | ||
--- a/isort/pie_slice.py | ||
+++ b/isort/pie_slice.py | ||
@@ -24,6 +24,12 @@ | ||
import collections | ||
import sys | ||
|
||
+try: | ||
+ from collections.abc import MutableSet | ||
+except ImportError: | ||
+ # Python 2.7 | ||
+ from collections import MutableSet | ||
+ | ||
__version__ = "1.1.0" | ||
|
||
PY2 = sys.version_info[0] == 2 | ||
@@ -381,7 +387,7 @@ def cache_clear(): | ||
from functools import lru_cache # noqa: F401 | ||
|
||
|
||
-class OrderedSet(collections.MutableSet): | ||
+class OrderedSet(MutableSet): | ||
|
||
def __init__(self, iterable=None): | ||
self.end = end = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters