classification
Title: Add context manager support to xmlrpc.client.ServerProxy
Type: enhancement Stage: commit review
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: Claudiu.Popa, brett.cannon, eric.araujo, jesstess, python-dev
Priority: normal Keywords: patch

Created on 2014-02-14 16:19 by brett.cannon, last changed 2014-03-21 15:25 by Claudiu.Popa. This issue is now closed.

Files
File name Uploaded Description Edit
xmlrpc.patch Claudiu.Popa, 2014-02-16 20:45 review
issue20627.patch jesstess, 2014-03-09 19:48 review
issue20627_1.patch Claudiu.Popa, 2014-03-12 13:09 review
issue20627_2.patch Claudiu.Popa, 2014-03-12 19:14 review
issue20627_2.patch Claudiu.Popa, 2014-03-12 19:19 Grammar. review
Messages (15)
msg211221 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-02-14 16:19
Otherwise have to call client('close')() to close a server proxy and that's just ugly.
msg211359 - (view) Author: Claudiu Popa (Claudiu.Popa) * Date: 2014-02-16 20:45
Hi. Here's a simple patch for this.
msg211388 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-02-17 02:37
Thanks for the patch, Cladiu! Since the 3.5 branch is not open yet it might not be until late March or April when I can look at this patch and get it committed, but I will get to it.
msg212981 - (view) Author: Jessica McKellar (jesstess) * Date: 2014-03-09 19:48
Thanks for the patch, Claudiu.Popa! I noticed one tiny thing, which is that it introduced some trailing whitespace. I've uploaded a trivial change to your patch that removes the whitespace.

* The patch applies cleanly.
* The docs build cleanly with the patch.
* test_xmlrpc passes with the patch.
* I visually inspected the changes in the built HTML docs and they look good. I also ran the modified example code from the docs and confirmed that it runs as expected.

=> needs review
msg212983 - (view) Author: Claudiu Popa (Claudiu.Popa) * Date: 2014-03-09 20:20
Cool, thanks, Jessica!
msg213205 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-03-12 06:34
Looks good to me; left some comments on Rietveld.
msg213257 - (view) Author: Claudiu Popa (Claudiu.Popa) * Date: 2014-03-12 13:09
Thanks for the review, Éric! I uploaded a new version of the patch, which addresses your comments.
msg213279 - (view) Author: Claudiu Popa (Claudiu.Popa) * Date: 2014-03-12 19:14
Patch updated with fixes suggested by Éric.
msg213285 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-03-12 20:06
This looks ready to me.  Thanks Claudiu!
msg213287 - (view) Author: Claudiu Popa (Claudiu.Popa) * Date: 2014-03-12 20:07
My pleasure. Thanks for the reviews, too!
msg213839 - (view) Author: Claudiu Popa (Claudiu.Popa) * Date: 2014-03-17 07:08
Now that the 3.5 branch is the default, can this feature be committed?
msg213862 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-03-17 13:54
Yes it can. I do my Python work typically on Fridays so I will get to it then.
msg214376 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-21 15:24
New changeset 395904f70d6a by Brett Cannon in branch 'default':
Issue #20627: xmlrpc.client.ServerProxy is now a context manager.
http://hg.python.org/cpython/rev/395904f70d6a
msg214377 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-03-21 15:25
Thanks for the patch!
msg214378 - (view) Author: Claudiu Popa (Claudiu.Popa) * Date: 2014-03-21 15:25
My pleasure!
History
Date User Action Args
2014-03-21 15:25:59Claudiu.Popasetmessages: + msg214378
2014-03-21 15:25:00brett.cannonsetstatus: open -> closed
resolution: fixed
messages: + msg214377
2014-03-21 15:24:27python-devsetnosy: + python-dev
messages: + msg214376
2014-03-17 13:54:41brett.cannonsetmessages: + msg213862
2014-03-17 07:08:56Claudiu.Popasetmessages: + msg213839
2014-03-12 20:07:45Claudiu.Popasetmessages: + msg213287
2014-03-12 20:06:48eric.araujosetkeywords: - needs review

messages: + msg213285
stage: patch review -> commit review
2014-03-12 19:19:54Claudiu.Popasetfiles: + issue20627_2.patch
2014-03-12 19:14:59Claudiu.Popasetfiles: + issue20627_2.patch

messages: + msg213279
2014-03-12 13:09:17Claudiu.Popasetfiles: + issue20627_1.patch
keywords: + patch
messages: + msg213257
2014-03-12 06:34:58eric.araujosetmessages: + msg213205
2014-03-09 20:20:46Claudiu.Popasetmessages: + msg212983
2014-03-09 19:48:41jesstesssetfiles: + issue20627.patch

nosy: + jesstess
messages: + msg212981

keywords: + needs review, - patch, easy
stage: needs patch -> patch review
2014-02-17 02:37:11brett.cannonsetassignee: brett.cannon
messages: + msg211388
2014-02-16 20:45:14Claudiu.Popasetfiles: + xmlrpc.patch

nosy: + Claudiu.Popa
messages: + msg211359

keywords: + patch
2014-02-14 18:20:22eric.araujosetnosy: + eric.araujo

stage: test needed -> needs patch
2014-02-14 16:23:29serhiy.storchakasetkeywords: + easy
2014-02-14 16:19:42brett.cannoncreate