mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341)
Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
This commit is contained in:
parent
a7e251b07a
commit
85b920498b
4 changed files with 15 additions and 2 deletions
|
@ -967,7 +967,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`
|
||||
'''
|
||||
|
@ -987,7 +987,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