summaryrefslogtreecommitdiff
path: root/rdflib/compat.py
diff options
context:
space:
mode:
authorIwan Aucamp <aucampia@gmail.com>2023-04-09 21:47:26 +0200
committerGitHub <noreply@github.com>2023-04-09 21:47:26 +0200
commit6e544f5afc365b8e0fc8ad7f98c4c27b9daa755d (patch)
tree62d395919752b8fea68069794a2ab13f48e9760c /rdflib/compat.py
parent4940798d09b282d47370606ede94fd16e4cb235f (diff)
downloadrdflib-6e544f5afc365b8e0fc8ad7f98c4c27b9daa755d.tar.gz
refactor: eliminate unneeded `rdflib.compat` imports (#2336)
Compatibility handling for `collections.abc.Mapping` and `collections.abc.MutableMapping` is not needed as RDFLib currently only support Python 3.7 and newer, and those classes are available from `collections.abc` in Python 3.7.
Diffstat (limited to 'rdflib/compat.py')
-rw-r--r--rdflib/compat.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/rdflib/compat.py b/rdflib/compat.py
index cba3a569..1cc4adac 100644
--- a/rdflib/compat.py
+++ b/rdflib/compat.py
@@ -97,10 +97,3 @@ def decodeUnicodeEscape(escaped: str) -> str:
# Most of times, there are no backslashes in strings.
return escaped
return _turtle_escape_pattern.sub(_turtle_escape_subber, escaped)
-
-
-# Migration to abc in Python 3.8
-try:
- from collections.abc import Mapping, MutableMapping
-except:
- from collections import Mapping, MutableMapping