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

pyexpat patch for changing buffer_size #45478

achimgaedke mannequin opened this issue Sep 9, 2007 · 5 comments

pyexpat patch for changing buffer_size #45478

achimgaedke mannequin opened this issue Sep 9, 2007 · 5 comments


Copy link

achimgaedke mannequin commented Sep 9, 2007

BPO 1137
Nosy @akuchling
  • pyexpat_c_patch
  • pyexpat_test_patch
  • pyexpat_doc_patch
  • simpler_patch.txt: Simplified version
  • pyexpat-patch2.txt: Complete, simplified version
  • 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 = ''
    closed_at = <Date 2008-01-08.14:34:01.633>
    created_at = <Date 2007-09-09.16:40:11.825>
    labels = ['expert-XML']
    title = 'pyexpat patch for changing buffer_size'
    updated_at = <Date 2008-01-08.22:58:17.049>
    user = '' fields:

    activity = <Date 2008-01-08.22:58:17.049>
    actor = 'AchimGaedke'
    assignee = 'akuchling'
    closed = True
    closed_date = <Date 2008-01-08.14:34:01.633>
    closer = 'akuchling'
    components = ['XML']
    creation = <Date 2007-09-09.16:40:11.825>
    creator = 'AchimGaedke'
    dependencies = []
    files = ['8409', '8410', '8411', '9097', '9098']
    hgrepos = []
    issue_num = 1137
    keywords = ['patch']
    message_count = 5.0
    messages = ['55767', '59494', '59497', '59538', '59571']
    nosy_count = 2.0
    nosy_names = ['akuchling', 'AchimGaedke']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = ''
    versions = ['Python 2.6']

    Copy link
    Mannequin Author

    achimgaedke mannequin commented Sep 9, 2007


    Sometimes people have big amounts of text/data in xml files. To make
    processing more effective, they should be able to change the buffer size
    for collecting character data in one string.

    Here comes a patch that applies necessary changes in setattr method. It
    handles reallocation sufficiently efficient without introducing extra
    variables to the parser class.

    Also a documentation patch and some test cases are available.

    These patches and tests were done with debian etch python2.5, which is
    python-2.5.1 . This patch also works on python2.4 .

    @achimgaedke achimgaedke mannequin added the topic-XML label Sep 9, 2007
    @jafo jafo mannequin assigned akuchling Sep 17, 2007
    Copy link

    Here's a simpler, but still untested version of the patch that cuts out
    the various cases for reallocating when there's already buffered data
    and just does a flush every time.

    Copy link

    Here's another update of the simplified version, that also updated the
    documentation patch for reST and updates the test for the current code.

    Copy link

    Committed to the trunk in rev. 59853.

    AchimGaedke: thanks for your contribution! Also, please submit a signed
    copy of the
    contributor agreement when you can: see for details.

    Copy link
    Mannequin Author

    achimgaedke mannequin commented Jan 8, 2008

    Also the shortend version will bring better performance.

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

    No branches or pull requests

    1 participant