mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341) (GH-26989)
Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
(cherry picked from commit 85b920498b
)
Co-authored-by: finefoot <33361833+finefoot@users.noreply.github.com>
This commit is contained in:
parent
67e394562d
commit
8aa45de6c6
4 changed files with 15 additions and 2 deletions
|
@ -959,7 +959,7 @@ def MakeProxyType(name, exposed, _cache={}):
|
|||
|
||||
|
||||
def AutoProxy(token, serializer, manager=None, authkey=None,
|
||||
exposed=None, incref=True):
|
||||
exposed=None, incref=True, manager_owned=False):
|
||||
'''
|
||||
Return an auto-proxy for `token`
|
||||
'''
|
||||
|
@ -979,7 +979,7 @@ def AutoProxy(token, serializer, manager=None, authkey=None,
|
|||
|
||||
ProxyType = MakeProxyType('AutoProxy[%s]' % token.typeid, exposed)
|
||||
proxy = ProxyType(token, serializer, manager=manager, authkey=authkey,
|
||||
incref=incref)
|
||||
incref=incref, manager_owned=manager_owned)
|
||||
proxy._isauto = True
|
||||
return proxy
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue