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

codecs.encode/decode documentation inconsistency #65687

Closed
Ouaouaron mannequin opened this issue May 12, 2014 · 13 comments
Closed

codecs.encode/decode documentation inconsistency #65687

Ouaouaron mannequin opened this issue May 12, 2014 · 13 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@Ouaouaron
Copy link
Mannequin

Ouaouaron mannequin commented May 12, 2014

BPO 21488
Nosy @brettcannon, @ncoghlan, @vstinner, @berkerpeksag
Files
  • issue21488.diff
  • codecs_decode_encode_kw.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 = None
    closed_at = <Date 2014-05-14.15:11:44.701>
    created_at = <Date 2014-05-12.23:37:30.372>
    labels = ['type-bug', 'docs']
    title = 'codecs.encode/decode documentation inconsistency'
    updated_at = <Date 2014-05-14.21:37:35.650>
    user = 'https://bugs.python.org/Ouaouaron'

    bugs.python.org fields:

    activity = <Date 2014-05-14.21:37:35.650>
    actor = 'python-dev'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2014-05-14.15:11:44.701>
    closer = 'vstinner'
    components = ['Documentation']
    creation = <Date 2014-05-12.23:37:30.372>
    creator = 'Ouaouaron'
    dependencies = []
    files = ['35240', '35250']
    hgrepos = []
    issue_num = 21488
    keywords = ['patch']
    message_count = 13.0
    messages = ['218380', '218464', '218506', '218510', '218511', '218512', '218529', '218539', '218541', '218542', '218543', '218544', '218574']
    nosy_count = 7.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'vstinner', 'docs@python', 'python-dev', 'berker.peksag', 'Ouaouaron']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue21488'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    @Ouaouaron
    Copy link
    Mannequin Author

    Ouaouaron mannequin commented May 12, 2014

    The documentation page for codecs (https://docs.python.org/2/library/codecs.html) shows keyword arguments for codecs.encode and codecs.decode, but they throw an error if keyword arguments are used. codecs.decode.__doc__ reports 'decode(obj, [encoding[,errors]]) -> object.

    This happens on both 2.7.6 and 3.4.0.

    @Ouaouaron Ouaouaron mannequin added the performance Performance or resource usage label May 12, 2014
    @Ouaouaron Ouaouaron mannequin assigned docspython May 12, 2014
    @Ouaouaron Ouaouaron mannequin added the docs Documentation in the Doc dir label May 12, 2014
    @berkerpeksag berkerpeksag added type-bug An unexpected behavior, bug, or error and removed performance Performance or resource usage labels May 13, 2014
    @brettcannon
    Copy link
    Member

    Berker's patch LGTM, so assigning to him to commit.

    @ncoghlan
    Copy link
    Contributor

    Brett, if you granted Berker commit privileges, you forgot to update the developer log and issue tracker...

    That said, the patch LGTM too.

    @vstinner
    Copy link
    Member

    For Python 3.5, I would prefer to patch the code to support keywords instead.

    @vstinner
    Copy link
    Member

    I sent a review on Rietveld.

    @vstinner
    Copy link
    Member

    codecs_decode_encode_kw.patch: Patch for Python 3.5 adding support of keyword arguments on codecs.encode and codecs.decode.

    @brettcannon
    Copy link
    Member

    Nope, I forgot Berker had triage rights but not commit rights.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 14, 2014

    New changeset cc5e3b93c35a by Victor Stinner in branch '2.7':
    Issue bpo-21488: Fix doc of codecs.decode() and codecs.encode(), no keyword support.
    http://hg.python.org/cpython/rev/cc5e3b93c35a

    New changeset 2e116176a81f by Victor Stinner in branch '3.4':
    Issue bpo-21488: Fix doc of codecs.decode() and codecs.encode(), no keyword support.
    http://hg.python.org/cpython/rev/2e116176a81f

    New changeset 889896471498 by Victor Stinner in branch 'default':
    Merge 3.4: ignore change specific to 3.4 for bpo-21488, I had a different patch for Python 3.5
    http://hg.python.org/cpython/rev/889896471498

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 14, 2014

    New changeset 6ceedbd88b5f by Victor Stinner in branch '3.4':
    Issue bpo-21488: Add support of keyword arguments for codecs.encode and codecs.decode
    http://hg.python.org/cpython/rev/6ceedbd88b5f

    @vstinner
    Copy link
    Member

    I applied all patches and added Brad Aylsworth to Misc/ACKS. Thanks Brad!

    Note: I adapted the change for Python 2.7: the default encoding is ASCII, not UTF-8.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 14, 2014

    New changeset 0d38044c0b02 by Victor Stinner in branch 'default':
    Issue bpo-21488: Add support of keyword arguments for codecs.encode and codecs.decode
    http://hg.python.org/cpython/rev/0d38044c0b02

    @vstinner
    Copy link
    Member

    Ooops, I applied codecs_decode_encode_kw.patch to the branch 3.4 instead of default :-/ I should now be fixed.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 14, 2014

    New changeset 0a6f0aaeb96a by Victor Stinner in branch '2.7':
    Issue bpo-21488: Oops, the patch for codecs.encode/decode doc was written by
    http://hg.python.org/cpython/rev/0a6f0aaeb96a

    New changeset 91dca6b9ef0f by Victor Stinner in branch '3.4':
    Issue bpo-21488: Oops, the patch for codecs.encode/decode doc was written by
    http://hg.python.org/cpython/rev/91dca6b9ef0f

    @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

    4 participants