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

str.encode('base64') add trailing new line character. It is not documented. #61914

Closed
alex75 mannequin opened this issue Apr 13, 2013 · 5 comments
Closed

str.encode('base64') add trailing new line character. It is not documented. #61914

alex75 mannequin opened this issue Apr 13, 2013 · 5 comments
Assignees
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@alex75
Copy link
Mannequin

alex75 mannequin commented Apr 13, 2013

BPO 17714
Nosy @ezio-melotti
Files
  • issue17714.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/ezio-melotti'
    closed_at = <Date 2013-05-07.08:16:56.248>
    created_at = <Date 2013-04-13.15:39:29.434>
    labels = ['type-feature', 'docs']
    title = "str.encode('base64') add trailing new line character. It is not documented."
    updated_at = <Date 2013-05-07.08:21:33.165>
    user = 'https://bugs.python.org/alex75'

    bugs.python.org fields:

    activity = <Date 2013-05-07.08:21:33.165>
    actor = 'python-dev'
    assignee = 'ezio.melotti'
    closed = True
    closed_date = <Date 2013-05-07.08:16:56.248>
    closer = 'ezio.melotti'
    components = ['Documentation']
    creation = <Date 2013-04-13.15:39:29.434>
    creator = 'alex.75'
    dependencies = []
    files = ['30069']
    hgrepos = []
    issue_num = 17714
    keywords = ['patch']
    message_count = 5.0
    messages = ['186734', '188091', '188632', '188633', '188634']
    nosy_count = 5.0
    nosy_names = ['ezio.melotti', 'docs@python', 'python-dev', 'alex.75', 'dmi.baranov']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue17714'
    versions = ['Python 2.7']

    @alex75
    Copy link
    Mannequin Author

    alex75 mannequin commented Apr 13, 2013

    str.encode() with 'base64' as argument add a trailing new line character to the returned string. This is the difference from base64.b64encode(str) (that is used internally).

    This is not documented in str.encode()
    http://docs.python.org/2/library/stdtypes.html?highlight=encode#str.encode

    Instead it is perfectly documented for base64.encodestring()
    http://docs.python.org/2/library/base64.html#base64.encodestring

    @alex75 alex75 mannequin changed the title str.encode('base64') add trailing new line character is not documented str.encode('base64') add trailing new line character. It is not documented. Apr 13, 2013
    @terryjreedy terryjreedy added the docs Documentation in the Doc dir label Apr 19, 2013
    @dmibaranov
    Copy link
    Mannequin

    dmibaranov mannequin commented Apr 29, 2013

    Added a patch

    @ezio-melotti ezio-melotti added the type-feature A feature request or enhancement label Apr 30, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 7, 2013

    New changeset 8b764c3521fa by Ezio Melotti in branch '2.7':
    bpo-17714: document that the base64 codec adds a trailing newline.
    http://hg.python.org/cpython/rev/8b764c3521fa

    @ezio-melotti
    Copy link
    Member

    The str.encode() doc is the wrong place where to document this, since the '\n' is added only for the base64 codec. I added a note about this in the codecs docs0.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 7, 2013

    New changeset cbb23e40e0d7 by Ezio Melotti in branch '3.3':
    bpo-17714: document that the base64 codec adds a trailing newline.
    http://hg.python.org/cpython/rev/cbb23e40e0d7

    New changeset b3e1be1493a5 by Ezio Melotti in branch 'default':
    bpo-17714: merge with 3.3.
    http://hg.python.org/cpython/rev/b3e1be1493a5

    @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-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants