[Python-Dev] Deprecating PyOS_ascii_formatd

Eric Smith eric at trueblade.com
Fri Apr 24 23:15:13 CEST 2009

Eric Smith wrote:
> Assuming that Mark's and my changes in the py3k-short-float-repr branch 
> get checked in shortly, I'd like to deprecate PyOS_ascii_formatd. Its 
> functionality is largely being replaced by PyOS_double_to_string, which 
> we're introducing on our branch.

We've checked the changes in, and everything looks good as far as I can 

> My proposal is to deprecate PyOS_ascii_formatd in 3.1 and remove it in 3.2.

Having heard no dissent, I'd like to go ahead and deprecate this API. 
What are the mechanics of deprecating this? Just documentation, or is 
there something I should do in the code to generate a warning? Any 
pointers to examples would be great.

> The 2.7 situation is tricker, because we're not planning on backporting 
> the short-float-repr work back to 2.7. In 2.7 I guess we'll leave 
> PyOS_ascii_formatd around, unfortunately.

I backported the new API to 2.7, so I'll also deprecate 
PyOS_ascii_formatd there.


More information about the Python-Dev mailing list