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:
Miss Islington (bot) 2021-07-01 21:35:31 -07:00 committed by GitHub
parent 67e394562d
commit 8aa45de6c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 2 deletions

View file

@ -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