mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
[3.13] gh-126417: Register multiprocessing proxy types to an appropriate collections.abc class (#126419) (#126435)
Co-authored-by: Stephen Morton <github@tungol.org>
This commit is contained in:
parent
cba17e4d92
commit
c1e708ab07
4 changed files with 16 additions and 0 deletions
|
@ -18,6 +18,7 @@ import sys
|
|||
import threading
|
||||
import signal
|
||||
import array
|
||||
import collections.abc
|
||||
import queue
|
||||
import time
|
||||
import types
|
||||
|
@ -1167,6 +1168,7 @@ class ListProxy(BaseListProxy):
|
|||
|
||||
__class_getitem__ = classmethod(types.GenericAlias)
|
||||
|
||||
collections.abc.MutableSequence.register(BaseListProxy)
|
||||
|
||||
_BaseDictProxy = MakeProxyType('DictProxy', (
|
||||
'__contains__', '__delitem__', '__getitem__', '__iter__', '__len__',
|
||||
|
@ -1179,6 +1181,7 @@ _BaseDictProxy._method_to_typeid_ = {
|
|||
class DictProxy(_BaseDictProxy):
|
||||
__class_getitem__ = classmethod(types.GenericAlias)
|
||||
|
||||
collections.abc.MutableMapping.register(_BaseDictProxy)
|
||||
|
||||
ArrayProxy = MakeProxyType('ArrayProxy', (
|
||||
'__len__', '__getitem__', '__setitem__'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue