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

configparser read_file now iterates over f, docs still say it calls readline #55879

Closed
larryhastings opened this issue Mar 25, 2011 · 9 comments
Assignees
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@larryhastings
Copy link
Contributor

larryhastings commented Mar 25, 2011

BPO 11670
Nosy @rhettinger, @larryhastings, @ambv
Files
  • issue11670.patch
  • 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/ambv'
    closed_at = <Date 2011-04-27.16:14:36.291>
    created_at = <Date 2011-03-25.10:08:18.271>
    labels = ['type-bug', 'docs']
    title = 'configparser read_file now iterates over f, docs still say it calls readline'
    updated_at = <Date 2017-01-29.23:48:17.244>
    user = 'https://github.com/larryhastings'

    bugs.python.org fields:

    activity = <Date 2017-01-29.23:48:17.244>
    actor = 'python-dev'
    assignee = 'lukasz.langa'
    closed = True
    closed_date = <Date 2011-04-27.16:14:36.291>
    closer = 'python-dev'
    components = ['Documentation']
    creation = <Date 2011-03-25.10:08:18.271>
    creator = 'larry'
    dependencies = []
    files = ['21547']
    hgrepos = []
    issue_num = 11670
    keywords = ['patch']
    message_count = 9.0
    messages = ['132075', '132076', '132105', '132115', '133087', '134592', '134593', '134666', '286457']
    nosy_count = 5.0
    nosy_names = ['rhettinger', 'larry', 'docs@python', 'lukasz.langa', 'python-dev']
    pr_nums = []
    priority = 'low'
    resolution = 'accepted'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue11670'
    versions = ['Python 3.2', 'Python 3.3']

    @larryhastings
    Copy link
    Contributor Author

    larryhastings commented Mar 25, 2011

    The documentation for configparser.RawConfigParser.read_file() states:

    "Read and parse configuration data from the file or file-like object in f (only the readline() method is used)."

    This was true in Python 3.1 and before. However in 3.2 the implementation of read_file changed. It no longer calls readline(). Instead, it iterates over the file object. Whoever made this change neglected to

    • fix the docs, or apparently
    • tell anybody.

    I've got the commit bit, so I'd be happy to fix this.

    I'd like to add it to the What's New In Python 3.2 as well; there's a section about configparser changes that would be perfect. Is it permissible to change the What's New document ex post facto like this? (Adding rhettinger so he can answer this.)

    @larryhastings larryhastings added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Mar 25, 2011
    @larryhastings
    Copy link
    Contributor Author

    larryhastings commented Mar 25, 2011

    By the same token, readfp is now deprecate in favor of the new spelling read_file. That change *is* mentioned in configparser. If I'm touching What's New In Python 3.2, mind if I add a mention of that too?

    @rhettinger
    Copy link
    Contributor

    rhettinger commented Mar 25, 2011

    I don't think this is worthy of being in whatsnew.
    Feel free to update the other docs though.

    @merwok merwok assigned ambv and unassigned docspython Mar 25, 2011
    @ambv
    Copy link
    Contributor

    ambv commented Mar 25, 2011

    Ouch, this would be my fault. I agree with Raymond, at this point I think we should only update the docs.

    @ambv
    Copy link
    Contributor

    ambv commented Apr 5, 2011

    How about this? (available for review: http://codereview.appspot.com/4358054)

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Apr 27, 2011

    New changeset 6f937d6369b6 by Łukasz Langa in branch '3.2':
    Closes bpo-11670: configparser read_file now iterates over f.
    http://hg.python.org/cpython/rev/6f937d6369b6

    New changeset 9da06f771a57 by Łukasz Langa in branch 'default':
    Merged bpo-11670 from 3.2
    http://hg.python.org/cpython/rev/9da06f771a57

    @python-dev python-dev mannequin closed this as completed Apr 27, 2011
    @ambv
    Copy link
    Contributor

    ambv commented Apr 27, 2011

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Apr 28, 2011

    New changeset 1bbda00bbe78 by Łukasz Langa in branch '3.2':
    Style updates for the bpo-11670 solution after post-commit review by Ezio Melotti:
    http://hg.python.org/cpython/rev/1bbda00bbe78

    New changeset 339cd1d9b21a by Łukasz Langa in branch 'default':
    Merged styling updates for bpo-11670 from 3.2.
    http://hg.python.org/cpython/rev/339cd1d9b21a

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 29, 2017

    New changeset e70882558a96 by Martin Panter in branch '3.5':
    Issue bpo-11670: readfp(fp) parameter name is different to read_file(f)
    https://hg.python.org/cpython/rev/e70882558a96

    New changeset e06de6f9cfe5 by Martin Panter in branch '3.6':
    Issues bpo-11670: Merge configparser doc from 3.5
    https://hg.python.org/cpython/rev/e06de6f9cfe5

    New changeset 6db0a62b6aa6 by Martin Panter in branch 'default':
    Issues bpo-11670: Merge configparser doc from 3.6
    https://hg.python.org/cpython/rev/6db0a62b6aa6

    @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
    docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants