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

Document PyFloat_AsString and PyFloat_AsReprString as deprecated and unsafe #51417

Closed
ericvsmith opened this issue Oct 19, 2009 · 4 comments
Closed
Assignees
Labels
docs Documentation in the Doc dir

Comments

@ericvsmith
Copy link
Member

BPO 7168
Nosy @birkenfeld, @ericvsmith
Files
  • issue7168.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/ericvsmith'
    closed_at = <Date 2009-10-19.14:41:03.244>
    created_at = <Date 2009-10-19.00:59:58.818>
    labels = ['docs']
    title = 'Document PyFloat_AsString and PyFloat_AsReprString as deprecated and unsafe'
    updated_at = <Date 2009-10-19.14:41:03.242>
    user = 'https://github.com/ericvsmith'

    bugs.python.org fields:

    activity = <Date 2009-10-19.14:41:03.242>
    actor = 'eric.smith'
    assignee = 'eric.smith'
    closed = True
    closed_date = <Date 2009-10-19.14:41:03.244>
    closer = 'eric.smith'
    components = ['Documentation']
    creation = <Date 2009-10-19.00:59:58.818>
    creator = 'eric.smith'
    dependencies = []
    files = ['15166']
    hgrepos = []
    issue_num = 7168
    keywords = ['patch']
    message_count = 4.0
    messages = ['94230', '94235', '94237', '94238']
    nosy_count = 2.0
    nosy_names = ['georg.brandl', 'eric.smith']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue7168'
    versions = ['Python 2.7']

    @ericvsmith
    Copy link
    Member Author

    These functions are unsafe and I'd like to delete them. They've already
    been deleted in py3k, per PEP-3100. They are no longer used internally
    to the interpreter.

    They should be documented as deprecated and as unsafe. They write to a
    char* parameter, but don't take a length, so they could overwrite the
    passed-in buffer.

    There's some argument to be made that we should also document
    PyFloat_AsStringEx, which is also deprecated and unsafe. But it is not
    in a .h file in 2.4, 2.5, or 2.6, so I'd like to just delete it for 2.7.

    @ericvsmith ericvsmith added the docs Documentation in the Doc dir label Oct 19, 2009
    @ericvsmith ericvsmith assigned ericvsmith and unassigned birkenfeld Oct 19, 2009
    @ericvsmith
    Copy link
    Member Author

    Proposed patch attached.

    @ericvsmith
    Copy link
    Member Author

    Updated patch based on Georg's input.

    @ericvsmith
    Copy link
    Member Author

    A slightly improved version checked in as r75510.

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

    No branches or pull requests

    2 participants