summaryrefslogtreecommitdiff
path: root/Lib/copy.py
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2022-12-23 23:17:24 +0300
committerGitHub <noreply@github.com>2022-12-23 14:17:24 -0600
commit745545b5bb847023f90505bf9caa983463413780 (patch)
tree1b6db7fc6c92542ac9bc56769524ee26ce9eb10e /Lib/copy.py
parentc5726b727e26b81a267933654cf26b760a90d9aa (diff)
downloadcpython-git-745545b5bb847023f90505bf9caa983463413780.tar.gz
gh-99482: remove `jython` compatibility parts from stdlib and tests (#99484)
Diffstat (limited to 'Lib/copy.py')
-rw-r--r--Lib/copy.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/Lib/copy.py b/Lib/copy.py
index 1b276afe08..6e8c19bc65 100644
--- a/Lib/copy.py
+++ b/Lib/copy.py
@@ -56,11 +56,6 @@ class Error(Exception):
pass
error = Error # backward compatibility
-try:
- from org.python.core import PyStringMap
-except ImportError:
- PyStringMap = None
-
__all__ = ["Error", "copy", "deepcopy"]
def copy(x):
@@ -120,9 +115,6 @@ d[dict] = dict.copy
d[set] = set.copy
d[bytearray] = bytearray.copy
-if PyStringMap is not None:
- d[PyStringMap] = PyStringMap.copy
-
del d, t
def deepcopy(x, memo=None, _nil=[]):
@@ -231,8 +223,6 @@ def _deepcopy_dict(x, memo, deepcopy=deepcopy):
y[deepcopy(key, memo)] = deepcopy(value, memo)
return y
d[dict] = _deepcopy_dict
-if PyStringMap is not None:
- d[PyStringMap] = _deepcopy_dict
def _deepcopy_method(x, memo): # Copy instance methods
return type(x)(x.__func__, deepcopy(x.__self__, memo))
@@ -301,4 +291,4 @@ def _reconstruct(x, memo, func, args,
y[key] = value
return y
-del types, weakref, PyStringMap
+del types, weakref