Skip to content

Commit 6514a09

Browse files
committed
Revert "[3.12] pythongh-126417: Register multiprocessing proxy types to an appropriate collections.abc class (python#126419) (python#126436)"
This reverts commit 47d48b6.
1 parent 49d69f2 commit 6514a09

File tree

4 files changed

+0
-17
lines changed

4 files changed

+0
-17
lines changed

Lib/multiprocessing/managers.py

-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import threading
1919
import signal
2020
import array
21-
import collections.abc
2221
import queue
2322
import time
2423
import types
@@ -1161,8 +1160,6 @@ def __imul__(self, value):
11611160
return self
11621161

11631162

1164-
collections.abc.MutableSequence.register(BaseListProxy)
1165-
11661163
DictProxy = MakeProxyType('DictProxy', (
11671164
'__contains__', '__delitem__', '__getitem__', '__iter__', '__len__',
11681165
'__setitem__', 'clear', 'copy', 'get', 'items',
@@ -1172,7 +1169,6 @@ def __imul__(self, value):
11721169
'__iter__': 'Iterator',
11731170
}
11741171

1175-
collections.abc.MutableMapping.register(DictProxy)
11761172

11771173
ArrayProxy = MakeProxyType('ArrayProxy', (
11781174
'__len__', '__getitem__', '__setitem__'

Lib/test/_test_multiprocessing.py

-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import functools
1818
import signal
1919
import array
20-
import collections.abc
2120
import socket
2221
import random
2322
import logging
@@ -2460,10 +2459,6 @@ def test_list(self):
24602459
a.append('hello')
24612460
self.assertEqual(f[0][:], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'hello'])
24622461

2463-
def test_list_isinstance(self):
2464-
a = self.list()
2465-
self.assertIsInstance(a, collections.abc.MutableSequence)
2466-
24672462
def test_list_iter(self):
24682463
a = self.list(list(range(10)))
24692464
it = iter(a)
@@ -2504,10 +2499,6 @@ def test_dict(self):
25042499
self.assertEqual(sorted(d.values()), [chr(i) for i in indices])
25052500
self.assertEqual(sorted(d.items()), [(i, chr(i)) for i in indices])
25062501

2507-
def test_dict_isinstance(self):
2508-
a = self.dict()
2509-
self.assertIsInstance(a, collections.abc.MutableMapping)
2510-
25112502
def test_dict_iter(self):
25122503
d = self.dict()
25132504
indices = list(range(65, 70))

Misc/ACKS

-1
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,6 @@ Emily Morehouse
12591259
Derek Morr
12601260
James A Morrison
12611261
Martin Morrison
1262-
Stephen Morton
12631262
Derek McTavish Mounce
12641263
Alessandro Moura
12651264
Pablo Mouzo

Misc/NEWS.d/next/Library/2024-11-04-16-40-02.gh-issue-126417.OWPqn0.rst

-3
This file was deleted.

0 commit comments

Comments
 (0)