Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add context manager support to xmlrpc.client.ServerProxy #64826

Closed
brettcannon opened this issue Feb 14, 2014 · 15 comments
Closed

Add context manager support to xmlrpc.client.ServerProxy #64826

brettcannon opened this issue Feb 14, 2014 · 15 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@brettcannon
Copy link
Member

brettcannon commented Feb 14, 2014

BPO 20627
Nosy @brettcannon, @merwok, @PCManticore, @serhiy-storchaka
PRs
  • bpo-30627: Fix error message when keyword arguments are used #2115
  • Files
  • xmlrpc.patch
  • issue20627.patch
  • issue20627_1.patch
  • issue20627_2.patch
  • issue20627_2.patch: Grammar.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/brettcannon'
    closed_at = <Date 2014-03-21.15:25:00.081>
    created_at = <Date 2014-02-14.16:19:42.429>
    labels = ['type-feature', 'library']
    title = 'Add context manager support to xmlrpc.client.ServerProxy'
    updated_at = <Date 2017-06-15.15:09:09.740>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2017-06-15.15:09:09.740>
    actor = 'serhiy.storchaka'
    assignee = 'brett.cannon'
    closed = True
    closed_date = <Date 2014-03-21.15:25:00.081>
    closer = 'brett.cannon'
    components = ['Library (Lib)']
    creation = <Date 2014-02-14.16:19:42.429>
    creator = 'brett.cannon'
    dependencies = []
    files = ['34107', '34313', '34374', '34378', '34379']
    hgrepos = []
    issue_num = 20627
    keywords = ['patch']
    message_count = 15.0
    messages = ['211221', '211359', '211388', '212981', '212983', '213205', '213257', '213279', '213285', '213287', '213839', '213862', '214376', '214377', '214378']
    nosy_count = 6.0
    nosy_names = ['brett.cannon', 'eric.araujo', 'jesstess', 'Claudiu.Popa', 'python-dev', 'serhiy.storchaka']
    pr_nums = ['2115']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'commit review'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue20627'
    versions = ['Python 3.5']

    @brettcannon
    Copy link
    Member Author

    brettcannon commented Feb 14, 2014

    Otherwise have to call client('close')() to close a server proxy and that's just ugly.

    @brettcannon brettcannon added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Feb 14, 2014
    @PCManticore
    Copy link
    Mannequin

    PCManticore mannequin commented Feb 16, 2014

    Hi. Here's a simple patch for this.

    @brettcannon
    Copy link
    Member Author

    brettcannon commented Feb 17, 2014

    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.

    @brettcannon brettcannon self-assigned this Feb 17, 2014
    @jesstess
    Copy link
    Member

    jesstess commented Mar 9, 2014

    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

    @jesstess jesstess removed the easy label Mar 9, 2014
    @PCManticore
    Copy link
    Mannequin

    PCManticore mannequin commented Mar 9, 2014

    Cool, thanks, Jessica!

    @merwok
    Copy link
    Member

    merwok commented Mar 12, 2014

    Looks good to me; left some comments on Rietveld.

    @PCManticore
    Copy link
    Mannequin

    PCManticore mannequin commented Mar 12, 2014

    Thanks for the review, Éric! I uploaded a new version of the patch, which addresses your comments.

    @PCManticore
    Copy link
    Mannequin

    PCManticore mannequin commented Mar 12, 2014

    Patch updated with fixes suggested by Éric.

    @merwok
    Copy link
    Member

    merwok commented Mar 12, 2014

    This looks ready to me. Thanks Claudiu!

    @PCManticore
    Copy link
    Mannequin

    PCManticore mannequin commented Mar 12, 2014

    My pleasure. Thanks for the reviews, too!

    @PCManticore
    Copy link
    Mannequin

    PCManticore mannequin commented Mar 17, 2014

    Now that the 3.5 branch is the default, can this feature be committed?

    @brettcannon
    Copy link
    Member Author

    brettcannon commented Mar 17, 2014

    Yes it can. I do my Python work typically on Fridays so I will get to it then.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 21, 2014

    New changeset 395904f70d6a by Brett Cannon in branch 'default':
    Issue bpo-20627: xmlrpc.client.ServerProxy is now a context manager.
    http://hg.python.org/cpython/rev/395904f70d6a

    @brettcannon
    Copy link
    Member Author

    brettcannon commented Mar 21, 2014

    Thanks for the patch!

    @PCManticore
    Copy link
    Mannequin

    PCManticore mannequin commented Mar 21, 2014

    My pleasure!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants