[ python-Bugs-1650903 ] PyFloat_FromString deprecated form

SourceForge.net noreply at sourceforge.net
Sun Mar 18 19:35:28 CET 2007


Bugs item #1650903, was opened at 2007-02-02 19:41
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1650903&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 3000
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Nobody/Anonymous (nobody)
Summary: PyFloat_FromString deprecated form

Initial Comment:
PyFloat_FromString takes two arguments, and the only purpose of the second is to avoid changing the API.

Extracts from Tim's 2000 comment:


Since we can't change the interface of a public API function, pend is still supported but now *officially* useless:  if pend is not NULL, *pend is set to NULL.


----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2007-03-18 18:35

Message:
Logged In: YES 
user_id=849994
Originator: NO

Okay, I fixed this case in rev. 54433.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2007-03-18 03:55

Message:
Logged In: YES 
user_id=6380
Originator: NO

I think I should relax that statement a bit. IMO it's OK to change the
signature (for Py3k) since the compiler will report an error if you call it
with the old signature.  What's *not* OK is to keep the signature (or to
keep it compatible anyway) but change the *behavior*, as that would cause
bugs that are only caught (if at all) at runtime, and will hence be hard to
debug.  Examples of bad changes would be changing the reference count
behavior of an API, changing the type of object returned (if a specific
type was previously documented) or making it possible to return NULL where
this was previous not possible.

----------------------------------------------------------------------

Comment By: Jim Jewett (jimjjewett)
Date: 2007-03-07 00:06

Message:
Logged In: YES 
user_id=764593
Originator: YES

I didn't realize that a decision had been made about the C API stability.

I would indeed propose changing it, but probably not if it the rest of the
API (even for strings and unicode?) is supposed to stay stable.

----------------------------------------------------------------------

Comment By: Georg Brandl (gbrandl)
Date: 2007-03-06 18:54

Message:
Logged In: YES 
user_id=849994
Originator: NO

(cont'd)
C API functions shouldn't even change signature in Py 3000. Therefore, a
new name would be needed...

----------------------------------------------------------------------

Comment By: Georg Brandl (gbrandl)
Date: 2007-03-06 18:53

Message:
Logged In: YES 
user_id=849994
Originator: NO

What do you propose to do?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1650903&group_id=5470


More information about the Python-bugs-list mailing list