This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Document PyFloat_AsString and PyFloat_AsReprString as deprecated and unsafe
Type: Stage: resolved
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: eric.smith Nosy List: eric.smith, georg.brandl
Priority: normal Keywords: patch

Created on 2009-10-19 00:59 by eric.smith, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue7168.patch eric.smith, 2009-10-19 14:09
Messages (4)
msg94230 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2009-10-19 00:59
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.
msg94235 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2009-10-19 13:26
Proposed patch attached.
msg94237 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2009-10-19 14:09
Updated patch based on Georg's input.
msg94238 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2009-10-19 14:41
A slightly improved version checked in as r75510.
History
Date User Action Args
2022-04-11 14:56:54adminsetgithub: 51417
2009-10-19 14:41:03eric.smithsetstatus: open -> closed
resolution: accepted
messages: + msg94238

stage: patch review -> resolved
2009-10-19 14:15:33eric.smithsetfiles: - issue7168.patch
2009-10-19 14:09:46eric.smithsetfiles: + issue7168.patch

messages: + msg94237
2009-10-19 13:26:41eric.smithsetkeywords: + patch
files: + issue7168.patch
messages: + msg94235

stage: patch review
2009-10-19 12:56:43eric.smithsetassignee: georg.brandl -> eric.smith
2009-10-19 00:59:58eric.smithcreate